Repository navigation
Commit 223b438
Load quantized checkpoint weights per component (#733)
## Summary
- Add typed weight records, component-owned bundles, and the
Olive/GPTQ/AWQ codec registry.
- Load existing quantized checkpoint weights using independent component
layouts and per-projection HuggingFace source-name overrides and
exclusions; do not quantize floating-point checkpoint weights.
- Preserve Gemma4, Qwen3.5/QMoE, and T5 architecture-specific weight
adaptations, tied tables, and component sidecar routing, and validate
quantized parameter binding.
- Preserve default attention head dimensions and KV-head counts when
HuggingFace configuration overrides only a subset of layers.
- Keep Gemma4 per-layer inputs in `[batch, sequence, layers,
projection]` form between embedding and decoder components for OpenVINO;
other execution providers retain the flattened layout.
- Restore the seq2seq, vision-language, and speech independent-component
quantization matrix coverage lost during the earlier graph-test file
split.
## Loading correctness fixes
- Recognize canonical weights only as complete, shape-matching groups so
raw GPTQ/AWQ scales remain available to their codec; validate zero
points using each projection's effective symmetry.
- Normalize quantized embedding tables for two-dimensional
GatherBlockQuantized storage rather than treating them as linear
projections.
- Honor Qwen3.5-MoE's model-declared float exclusions and Whisper's
declared output head during both graph construction and loading.
- Preserve the distinction between an absent component mapping (legacy
global rules) and an explicitly empty mapping (float components).
- Defer Gemma4 component packing until projection overrides are
resolved. Restore T5 HuggingFace source aliases and separate
decoder-stack rules from the independently owned top-level LM head.
## Consolidation
Replaces #666, #669, and #670 and consolidates the related development
from `test/per-component-quantization-stack` into this single PR.
The branch starts directly from `main` at
`a471d3416e9c52d5508d28730962e18c8a1053d0`. The design (#664) and
canonical component manifests (#665) are already merged and are not
separate dependencies of this PR.
This includes all seven previously uncommitted Gemma4/config/EP files
from the old development worktree, not just the three original PR heads.
The committed old feature stack was also compared with main plus this
PR: production feature areas were retained, and its missing graph-layout
matrix tests were restored in the current split test modules.
## Review and CI follow-up
Addressed all eight inline review threads, including
duplicate/already-resolved reports, in `190eb8a5`:
- Literal module rules now respect path boundaries; the compatibility
normalizer rejects a missing task clearly. Redundant Protocol statements
and alias parentheses are removed.
- Fixed the Gemma3 split-tied loading regression, including its
previously floating-point scaled embedding. A shared scaled quantized
embedding preserves Gemma4 behavior, and actual embedding execution plus
unsupported-tie guards are covered.
- Corrected the LLaVA fixture's missing `vision_model` namespace without
relaxing target validation.
- Updated the stale GGUF integration expectation to the export contract
already established by #688; tokenizer-identity rejection and full
logit/generation comparisons remain intact.
The original full L4/L5 jobs hit their explicit one-hour limits after
recording failures. Those failed case IDs also occur on the exact base
`a471d341`, but cancellation lost exception details, so they are not
claimed to be infrastructure-only or fixed. No model selection,
tolerance, or timeout was weakened. Isolated GPT-2 diagnostics at the
original head each executed and passed exactly one selected case: L4
https://github.com/onnxruntime/mobius/actions/runs/34308638240 and L5
https://github.com/onnxruntime/mobius/actions/runs/34308638242 . These
single-case successes do not certify the all-model golden jobs.
Fresh full CI for the published follow-up:
https://github.com/onnxruntime/mobius/actions/runs/34309655380 .
## Validation
- **874 passed, 16 skipped, 4 deselected** in the focused
loading/config/model/CLI/graph suite, including the repaired CI
selectors and scaled quantized embedding execution.
- **1 passed** for the real pinned `smollm2-135m-instruct-f16` GGUF CLI
export/reload, full-logit, and generation integration case.
- Ruff lint and formatting passed for the changed Python files.
Independent review of this follow-up found no significant issues.
- Runs used the repository-required onnx-ir API through isolated
dependencies; the shared environment was not modified.
- The original seven-file pending patch remains consolidated in this PR.
Local evidence does not claim that the all-model golden jobs or physical
NPU execution are green.
---------
Signed-off-by: Xiaoyu Zhang <[email protected]>
Signed-off-by: xiaoyu-work <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>1 parent 45a477d commit 223b438
47 files changed
Lines changed: 4369 additions & 1369 deletions
File tree
- docs/design
- src/mobius
- _configs
- components
- functions
- integrations
- ort_genai
- transformers
- models
- tasks
- weights
- tests
- build_graph
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
41 | 80 | | |
42 | 81 | | |
43 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| |||
203 | 209 | | |
204 | 210 | | |
205 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
206 | 223 | | |
207 | 224 | | |
208 | 225 | | |
| |||
239 | 256 | | |
240 | 257 | | |
241 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
242 | 263 | | |
243 | 264 | | |
244 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
245 | 271 | | |
246 | 272 | | |
247 | 273 | | |
| |||
265 | 291 | | |
266 | 292 | | |
267 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
268 | 303 | | |
269 | 304 | | |
270 | 305 | | |
| |||
310 | 345 | | |
311 | 346 | | |
312 | 347 | | |
313 | | - | |
314 | | - | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
315 | 352 | | |
316 | 353 | | |
317 | 354 | | |
| |||
330 | 367 | | |
331 | 368 | | |
332 | 369 | | |
333 | | - | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
334 | 376 | | |
335 | 377 | | |
336 | 378 | | |
337 | 379 | | |
338 | | - | |
339 | | - | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
340 | 384 | | |
341 | 385 | | |
342 | 386 | | |
| |||
354 | 398 | | |
355 | 399 | | |
356 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
357 | 412 | | |
358 | 413 | | |
359 | | - | |
| 414 | + | |
| 415 | + | |
360 | 416 | | |
361 | 417 | | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
362 | 424 | | |
363 | 425 | | |
364 | 426 | | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
369 | 431 | | |
370 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
371 | 440 | | |
372 | 441 | | |
373 | 442 | | |
| |||
379 | 448 | | |
380 | 449 | | |
381 | 450 | | |
382 | | - | |
383 | | - | |
384 | | - | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
385 | 454 | | |
386 | 455 | | |
387 | 456 | | |
| |||
407 | 476 | | |
408 | 477 | | |
409 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
410 | 485 | | |
411 | 486 | | |
412 | 487 | | |
413 | | - | |
| 488 | + | |
414 | 489 | | |
415 | | - | |
| 490 | + | |
416 | 491 | | |
417 | 492 | | |
418 | 493 | | |
| |||
422 | 497 | | |
423 | 498 | | |
424 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
425 | 504 | | |
426 | 505 | | |
427 | 506 | | |
| |||
432 | 511 | | |
433 | 512 | | |
434 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
435 | 525 | | |
436 | 526 | | |
437 | 527 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
162 | 164 | | |
163 | 165 | | |
164 | 166 | | |
165 | | - | |
166 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
167 | 173 | | |
168 | 174 | | |
169 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
132 | 139 | | |
133 | 140 | | |
134 | 141 | | |
135 | | - | |
| 142 | + | |
136 | 143 | | |
137 | 144 | | |
138 | | - | |
| 145 | + | |
139 | 146 | | |
140 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
141 | 151 | | |
142 | 152 | | |
143 | 153 | | |
| |||
158 | 168 | | |
159 | 169 | | |
160 | 170 | | |
161 | | - | |
| 171 | + | |
162 | 172 | | |
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
166 | 176 | | |
167 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
168 | 183 | | |
169 | 184 | | |
170 | 185 | | |
| |||
0 commit comments