Skip to content

Commit 99cbb5a

Browse files
justinchubyCopilot
andauthored
Promote exact Qwen2 and LFM2 GGUF runtime evidence (#642)
## Summary Promotes two exact graph-supported GGUF routes to runtime-supported under the released `onnxruntime-genai==0.15.2` contract: - Qwen2.5-0.5B-Instruct Q8_0: `Qwen/Qwen2.5-0.5B-Instruct-GGUF@9217f5db79a29953eb74d5343926648285ec7e67`, `qwen2.5-0.5b-instruct-q8_0.gguf`, 675,710,816 bytes, SHA-256 `ca59ca7f13d0e15a8cfa77bd17e65d24f6844b554a7b6c12e07a5f89ff76844e`, 291 tensors (`F32=121`, `Q8_0=170`). - LFM2-350M F16: `LiquidAI/LFM2-350M-GGUF@8fdc9d526b7ed346b19257551b05816c7912ecc2`, `LFM2-350M-F16.gguf`, 711,482,304 bytes, SHA-256 `379ffdcbf08147c0313f6f1ce7ff558a2bc935eda633f4b46c52347032419c42`, 148 tensors (`F16=93`, `F32=55`). Evidence binds exact artifact, import route, tokenizer assets/revisions, graph identity, runtime-package identity, complete logits, 20-step decode, deterministic generation, replay/rollback/non-vacuous batch reorder, ModelPackage save/load, CLI publication, and OGA 0.15.2 execution. The inherited SmolLM runtime record was also refreshed after #641 changed its route identity, with exact real parity and OGA probes rather than accepting a structural fingerprint alone. ## Identities - Qwen route `f7391f2aac9a7617c1c10e397e91b6f31b80bb3c5f338966b46e7d3935246500`; graph `b0d1814ea69dddd405e30541e9009ba6fb73930f98538921d5c2eaa4a14f5d2c`; package `cb43c76e1bc3db07a6a3631c7a99e7c47b6891807fecffdb3b70fddd9c108173`. - LFM2 route `c961bba579ea33a2472a7c5d3f469c76f1f8c7aae8440a7eaa86bc6e878a42f4`; graph `2a15694cd5ff9f5c9f798feeca91cc41174842065ada80a18b288478725b3342`; package `87b8cdd1edc8c5be948716df3efe551f5fc8f96762d7ea3f99b27688ca9f24af`. - Qwen tokenizer `Qwen/Qwen2.5-0.5B-Instruct@a338b55dd21219a5f4da42bc11a9313d1a27d4cc`; LFM2 tokenizer `LiquidAI/LFM2-350M@73e3c253078a3b97c2e14b4c4665679f4d9b6d56`. ## Validation - Exact Qwen and LFM2 final-main probes: passed. - Refreshed SmolLM F16 parity/package and OGA 0.15.2 probes: passed. - Refreshed SmolLM2 F16 and Q4/dequantized route probes: passed. - Focused evidence/package/tokenizer/YAML gates: 626 passed, 9 deselected. - Broad serial non-integration: 8,305 passed, 57 skipped, 12 deselected. - Initialized all-files formatter and lint: passed. - Direct GPT-5.6 Sol medium evidence/security review: fixed overlapping HF/ORT/OGA lifetimes, added 2x free-space enforcement, tightened Hub-cache symlink containment including parent escapes, aligned the 16 GiB ceiling, and added explicit stale-route fail-closed coverage. ## Census and scope The documentation records the complete 90-route graph-supported census and attempted/blocked candidates. Larger and unsupported routes—including encoder/seq2seq registry gaps, GPT-2 combined-cache ABI, recurrent-state limitations, and candidates lacking an exact immutable <=16 GiB GGUF—remain deferred. No runtime claim is inferred from graph construction alone. Base: `fcd5b3bb42dbc2ca7ca4bc62e9ee502e8446085a` (#641). All named artifact, package, graph, and isolated Hub caches were deleted after evidence generation. --------- Signed-off-by: Justin Chu <[email protected]> Co-authored-by: Copilot App <[email protected]> Copilot-Session: 43bb31ac-c136-44bc-8cdf-70cbcedd4a42 Copilot-Session: af2b8208-9638-4f6e-9651-7d3da21c0af8
1 parent fcd5b3b commit 99cbb5a

13 files changed

Lines changed: 1090 additions & 93 deletions

‎docs/api/build_from_gguf.md‎

Lines changed: 56 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ from mobius import build_from_gguf
1515

1616
| Census | Total | Closure |
1717
|---|---:|---|
18-
| Architectures | 147 | graph verdicts: {'deferred': 55, 'rejected': 2, 'supported': 90}; importable: 89; quantized import: {'rejected': 31, 'supported': 116}; runtime: {'deferred': 144, 'rejected': 2, 'supported': 1} |
18+
| Architectures | 147 | graph verdicts: {'deferred': 55, 'rejected': 2, 'supported': 90}; importable: 89; quantized import: {'rejected': 31, 'supported': 116}; runtime: {'deferred': 142, 'rejected': 2, 'supported': 3} |
1919
| Active stored qtypes | 25 | 24 have an import route; 1 are explicitly deferred with no route |
2020
| Serialized projector strings | 60 | {'graph-importable': 5, 'runtime-supported': 0} |
2121
| Tokenizer pre identifiers | 87 | 56 semantic groups; all default to deferred and become materializable only from a validated embedded `tokenizer.huggingface.json` or an exact pinned source in runtime evidence |
@@ -24,6 +24,59 @@ from mobius import build_from_gguf
2424

2525
<!-- END GGUF CLOSURE SUMMARY -->
2626

27+
## Runtime artifact census (90 graph-supported routes)
28+
29+
The runtime-evidence pass based on Mobius
30+
`fcd5b3bb42dbc2ca7ca4bc62e9ee502e8446085a` screened every architecture that
31+
was graph-supported but runtime-deferred at that revision. The complete set was:
32+
`bitnet`, `deci`, `qwen3`, `dflash`, `eagle3`, `qwen2`, `qwen2moe`, `qwen3moe`, `dream`,
33+
`llada`, `llada-moe`, `rnd1`, `qwen35`, `qwen35moe`, `qwen3next`, `gemma`,
34+
`gemma2`, `gemma3`, `gemma4`, `phi3`, `plm`, `baichuan`, `chatglm`, `phi2`,
35+
`seed_oss`, `falcon`, `gpt2`, `mamba`, `mamba2`, `jamba`, `nemotron_h`,
36+
`nemotron_h_moe`, `granitehybrid`, `kimi-k3`, `kimi-linear`, `lfm2`,
37+
`lfm2moe`, `minimax-01`, `plamo2`, `falcon-h1`, `bert`, `modern-bert`,
38+
`eurobert`, `neo-bert`, `nomic-bert`, `jina-bert-v2`, `gemma-embedding`,
39+
`llama-embed`, `starcoder2`, `stablelm`,
40+
`internlm2`, `olmo`, `olmo2`, `olmoe`, `phimoe`, `granitemoe`, `bailingmoe`,
41+
`deepseek`, `dots1`, `qwen2vl`, `cohere2`, `arcee`, `smollm3`, `exaone`,
42+
`nemotron`, `hunyuan-dense`, `muse-glimmer`, `glm-dsa`, `apertus`, `minicpm`,
43+
`minicpm3`, `openelm`, `mpt`,
44+
`gptneox`, `jais`, `refact`, `ernie4_5`, `bloom`, `codeshell`, `command-r`,
45+
`jais2`, `orion`, `qwen`, `starcoder`, `xverse`, `pangu-embedded`, `t5`,
46+
`t5encoder`, and `talkie`.
47+
48+
The initial pass admitted immutable canonical artifacts no larger than 1 GiB.
49+
The final census raised that ceiling to 16 GiB, with a mandatory free-space
50+
gate of at least twice the artifact size and one artifact/model/process at a
51+
time. Two diverse routes completed the full evidence contract:
52+
53+
| Route | Immutable GGUF | Bytes | SHA-256 | Tensor census | Runtime proof |
54+
|---|---|---:|---|---|---|
55+
| `qwen2` | `Qwen/Qwen2.5-0.5B-Instruct-GGUF@9217f5db79a29953eb74d5343926648285ec7e67` / `qwen2.5-0.5b-instruct-q8_0.gguf` | 675,710,816 | `ca59ca7f13d0e15a8cfa77bd17e65d24f6844b554a7b6c12e07a5f89ff76844e` | 291: F32=121, Q8_0=170 | Exact-artifact full logits, dynamic-KV replay/rollback/reorder, 20 decode steps, deterministic ORT GenAI 0.15.2 generation |
56+
| `lfm2` | `LiquidAI/LFM2-350M-GGUF@8fdc9d526b7ed346b19257551b05816c7912ecc2` / `LFM2-350M-F16.gguf` | 711,482,304 | `379ffdcbf08147c0313f6f1ce7ff558a2bc935eda633f4b46c52347032419c42` | 148: F16=93, F32=55 | Exact-artifact full logits, mixed convolution/KV replay/rollback/reorder, 20 decode steps, deterministic ORT GenAI 0.15.2 generation |
57+
58+
Attempted families that remain deferred:
59+
60+
| Candidate/family | Result |
61+
|---|---|
62+
| `gpt2` | Small canonical artifacts exist, but released ORT GenAI requires one rank-5 combined KV tensor per layer while Mobius exposes separate key/value caches. This is a downstream ABI limitation, not a graph failure. |
63+
| `mamba`, `mamba2` | Small artifacts were inspected, but released runtime state publication cannot satisfy the registry's required replay/rollback/reorder evidence contract. |
64+
| `bert`, `modern-bert`, `eurobert`, `neo-bert`, `nomic-bert`, `jina-bert-v2` | Small encoder artifacts exist; the released ORT GenAI registry has no evidenced encoder semantic-output contract. No generation claim is made. |
65+
| `t5`, `t5encoder` | Small canonical seq2seq artifacts exist; the released registry cannot publish the required encoder/decoder semantic contract. No generation claim is made. |
66+
| `bailingmoe`, `deepseek`, `dots1` | Newly graph-supported routes were included in the census; raising the ceiling to 16 GiB still did not establish an exact canonical artifact within the bound for these architecture routes. |
67+
| `gptneox`, `jais`, `mpt`, `refact`, `ernie4_5`, `openelm` | Legacy dense routes added by #639 were retained through the final rebase; no qualifying exact canonical artifact within the 16 GiB bound was established for promotion in this pass. |
68+
| `bitnet`, `plm`, `gemma-embedding`, `llama-embed`, `apertus`, `minicpm`, `minicpm3`, `pangu-embedded`, `talkie` | Routes added through #640/#641 were included after rebasing onto `fcd5b3bb42dbc2ca7ca4bc62e9ee502e8446085a`; none completed both immutable-artifact qualification and the released runtime's architecture-appropriate evidence contract in this bounded pass. |
69+
| Remaining decoder, MoE, hybrid, and multimodal rows above | The expanded 16 GiB census did not establish a qualifying exact canonical artifact plus a released-runtime evidence route in this bounded pass, so these remain runtime-deferred without a weaker proxy claim. |
70+
71+
The official Qwen F16 artifact (1,266,425,696 bytes) became size-eligible after
72+
the ceiling changed, but was not downloaded because the smaller official Q8_0
73+
artifact already proves the identical `qwen2` route with exact-artifact
74+
full-logit/runtime evidence; duplicating that route would add disk and memory
75+
cost without increasing architecture coverage.
76+
Tokenizer revisions are independently pinned to the historical commits whose
77+
ordered vocabulary and embedded chat template exactly match each GGUF; current
78+
upstream tokenizer heads are not substituted.
79+
2780
## Tokenizer truthfulness
2881

2982
Graph import and runtime-package emission are separate capabilities. GGUF
@@ -417,7 +470,7 @@ before graph construction or durable output.
417470
| `kimi-k3` | — | model=`kimi_k3`; tensor=`kimi_k3` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | The exact KDA/NoPE gated-MLA schedule, four-state recurrent ABI, attention-residual banks, Stable LatentMoE routing, SiTU activation, strict metadata/tensor closure, and compatible projection quantization are supported. Released generic ORT GenAI cache schemas cannot represent the heterogeneous KV plus convolution/matrix state ABI; tracked by onnxruntime/mobius#605. |
418471
| `kimi-linear` | — | model=`kimi_linear`; tensor=`kimi_linear` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | The exact KDA/NoPE-MLA schedule, four-state recurrent ABI, dense/MoE topology, correction-bias routing, pinned metadata, tensor closure, and compatible MatMul/expert quantization are supported. Released generic ORT GenAI cache schemas cannot represent heterogeneous KV plus three convolution histories and a matrix state, and representative real-weight GGUF evidence is pending; package runtime remains tracked by onnxruntime/mobius#605. |
419472
| `laguna` | — | none (fails before config extraction) | audited-direct-loader-conditional-union | config=deferred; tensor_map=deferred; graph=deferred; runtime=deferred; quantized_import=supported | Laguna combines per-head-or-element softplus attention gates, dual-RoPE interleaved sliding-window attention, a dense prefix, and sigmoid correction-biased routed/shared experts. Mobius has no exact graph or iSWA cache contract. |
420-
| `lfm2` | — | model=`lfm2`; tensor=`lfm2` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, exact pinned tensor-name closure, GGUF value transforms, and synthetic recurrent-state execution are covered, but no representative real-weight GGUF has yet passed independent full-logit parity and deterministic multi-token stateful ORT generation. Runtime packaging remains deferred until that evidence exists. |
473+
| `lfm2` | — | model=`lfm2`; tensor=`lfm2` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=supported; quantized_import=supported | Runtime support is restricted to LiquidAI's official LFM2-350M F16 artifact, pinned CPU import route, exact tokenizer revision, hybrid convolution/KV state evidence, and ORT GenAI 0.15.2. |
421474
| `lfm2moe` | — | model=`lfm2_moe`; tensor=`lfm2`+`lfm2_moe_extras` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=rejected | Config extraction, exact pinned tensor-name closure, GGUF value transforms, and synthetic recurrent-state execution are covered, but no representative real-weight GGUF has yet passed independent full-logit parity and deterministic multi-token stateful ORT generation. Runtime packaging remains deferred until that evidence exists. The mobius graph uses floating Linear modules for this architecture, so no MatMulNBits or BlockQuantizedMatMul target can consume preserved GGUF projection weights. Use keep_quantized=False for explicit float import. |
422475
| `llada` | — | model=`llada`; tensor=`llama` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, suffix-exact tensor closure, masked-diffusion task dispatch, and synthetic full-sequence execution are covered, but no pinned real GGUF has passed independent Hugging Face/llama.cpp masked-step logit parity and deterministic multi-step generation parity. Runtime packaging remains deferred until both exist. |
423476
| `llada-moe` | — | model=`llada`; module=`llada_moe`; tensor=`llama`+`diffusion_fused_qkv`+`moe_qk_norm_extras`+`moe_extras` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, suffix-exact tensor closure, masked-diffusion task dispatch, and synthetic full-sequence execution are covered, but no pinned real GGUF has passed independent Hugging Face/llama.cpp masked-step logit parity and deterministic multi-step generation parity. Runtime packaging remains deferred until both exist. |
@@ -462,7 +515,7 @@ before graph construction or durable output.
462515
| `plm` | — | model=`plm`; tensor=`plm` | audited-direct-loader-conditional-union | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, exact tensor-name closure, and a full synthetic GGUF graph build are covered, but no representative real-weight GGUF has yet passed ORT parity or generation validation. Runtime packaging remains deferred until that evidence exists. |
463516
| `pockettts` | — | none (fails before config extraction) | not claimed | config=deferred; tensor_map=deferred; graph=deferred; runtime=deferred; quantized_import=supported | The primary GGUF is only PocketTTS's transformed causal CALM backbone: its embedding table contains folded learned conditioning rows and its duplicated embedding output is not a semantic LM head. Voice encoding, continuous 32-D flow generation, EOS scoring, and the stateful 24-kHz Mimi decoder live in a required pockettts_spkenc/pockettts_gen mmproj bundle that Mobius cannot import. Registering the backbone as text generation or TTS would expose the wrong I/O contract, so standalone conversion is refused before graph construction. |
464517
| `qwen` | — | model=`qwen`; tensor=`llama`+`qwen1_extras` | audited-direct-loader-conditional-union | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=rejected | Config extraction, exact tensor-name closure, and a full synthetic GGUF graph build are covered, but no representative real-weight GGUF has yet passed ORT parity or generation validation. Runtime packaging remains deferred until that evidence exists. Quantization preservation is rejected because Qwen v1 stores fused QKV weights that must be split into separate graph projections. |
465-
| `qwen2` | — | model=`qwen2`; tensor=`llama` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, exact tensor-name closure, and a full synthetic GGUF graph build are covered, but no representative real-weight GGUF has yet passed ORT parity or generation validation. Runtime packaging remains deferred until that evidence exists. |
518+
| `qwen2` | — | model=`qwen2`; tensor=`llama` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=supported; quantized_import=supported | Runtime support is restricted to the official Qwen2.5-0.5B-Instruct Q8_0 artifact, pinned CPU import route, exact tokenizer revision, and ORT GenAI 0.15.2 evidence. |
466519
| `qwen2moe` | `qwen2_moe` | model=`qwen2_moe`; tensor=`llama`+`moe_extras` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, exact tensor-name closure, and a full synthetic GGUF graph build are covered, but no representative real-weight GGUF has yet passed ORT parity or generation validation. Runtime packaging remains deferred until that evidence exists. |
467520
| `qwen2vl` | — | model=`qwen2_vl_text`; tensor=`llama`; mmproj=`qwen_vl` | exact-direct-loader-conditional-union | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Text and paired Qwen2/Qwen2.5-VL projector graph import are supported for the exact split-QKV llama.cpp artifacts, but downstream multimodal runtime execution has not been evidenced. |
468521
| `qwen3` | — | model=`qwen3`; tensor=`llama` | not claimed | config=supported; tensor_map=supported; graph=supported; runtime=deferred; quantized_import=supported | Config extraction, exact tensor-name closure, and a full synthetic GGUF graph build are covered, but no representative real-weight GGUF has yet passed ORT parity or generation validation. Runtime packaging remains deferred until that evidence exists. |

‎src/mobius/integrations/gguf/_arch_registry.py‎

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,13 @@
669669
gguf_arch="qwen2",
670670
model_type="qwen2",
671671
tensor_map_recipe=("llama",),
672-
runtime=Support.DEFERRED,
673-
reason=_RUNTIME_VALIDATION_PENDING,
672+
runtime=Support.SUPPORTED,
673+
runtime_evidence_ids=("qwen2.5-0.5b-instruct-q8-ort-genai-0.15.2",),
674+
reason=(
675+
"Runtime support is restricted to the official Qwen2.5-0.5B-Instruct Q8_0 "
676+
"artifact, pinned CPU import route, exact tokenizer revision, and ORT GenAI "
677+
"0.15.2 evidence."
678+
),
674679
),
675680
GGUFArchitectureSpec(
676681
gguf_arch="qwen3",
@@ -808,8 +813,13 @@
808813
"attention.layer_norm_rms_epsilon",
809814
"shortconv.l_cache",
810815
),
811-
runtime=Support.DEFERRED,
812-
reason=_RECURRENT_RUNTIME_VALIDATION_PENDING,
816+
runtime=Support.SUPPORTED,
817+
runtime_evidence_ids=("lfm2-350m-f16-ort-genai-0.15.2",),
818+
reason=(
819+
"Runtime support is restricted to LiquidAI's official LFM2-350M F16 artifact, "
820+
"pinned CPU import route, exact tokenizer revision, hybrid convolution/KV state "
821+
"evidence, and ORT GenAI 0.15.2."
822+
),
813823
),
814824
GGUFArchitectureSpec(
815825
gguf_arch="qwen35",

‎src/mobius/integrations/gguf/_docs_test.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def test_runtime_support_requires_structured_evidence() -> None:
6565
"smollm-135m-f16-onnxruntime-1.29.0",
6666
"smollm-135m-f16-ort-genai-0.15.2",
6767
),
68-
)
68+
),
69+
("qwen2", ("qwen2.5-0.5b-instruct-q8-ort-genai-0.15.2",)),
70+
("lfm2", ("lfm2-350m-f16-ort-genai-0.15.2",)),
6971
]
7072

7173
pins = {pin.artifact_id for pin in MMPROJ_ARTIFACT_PINS}

0 commit comments

Comments
 (0)