Repository navigation
Promote exact Qwen2 and LFM2 GGUF runtime evidence - #642
Merged
Merged
Conversation
Checkpoint the validated Qwen and LFM2 runtime evidence, tokenizer metadata, state-reorder proof, and 16 GiB artifact census before recovering the interrupted session. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 43bb31ac-c136-44bc-8cdf-70cbcedd4a42 Signed-off-by: Justin Chu <[email protected]>
Bind Qwen, LFM2, and inherited SmolLM evidence to their exact post-#641 import routes. Harden tokenizer cache containment and serialize HF, ORT, and OGA model lifetimes in real probes. Co-authored-by: Copilot App <[email protected]> Copilot-Session: af2b8208-9638-4f6e-9651-7d3da21c0af8 Signed-off-by: Justin Chu <[email protected]>
Performance Comparison
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR promotes two GGUF import routes (qwen2 via Qwen2.5-0.5B-Instruct Q8_0, and lfm2 via LFM2-350M F16) from graph-supported to runtime-supported under the released onnxruntime-genai==0.15.2 contract by adding exact, pinned “runtime evidence” and enforcing it through tests, schema, registry, and documentation.
Changes:
- Add full “runtime evidence” records for the pinned Qwen2.5 Q8_0 and LFM2-350M F16 GGUF artifacts, and mark
qwen2/lfm2as runtime-supported with those evidence IDs. - Expand integration coverage to validate end-to-end runtime packaging + exact-logit parity + state semantics (replay/rollback/reorder) + deterministic OGA decode for the promoted routes.
- Tighten tokenizer asset handling/validation (Hub-cache symlink containment + deterministic GGUF vocab padding materialization) and extend ORT GenAI compatibility metadata/schema to cover the specialized LFM2 runtime path.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/gguf_small_model_runtime_integration_test.py | Adds promoted-route runtime evidence integration test and improves parity checks by capturing full reference logits across decode steps. |
| testdata/cases/schema.json | Raises per-case download budget cap and extends ORT GenAI capabilities schema to allow LFM2 specialized capability sets. |
| testdata/cases/causal-lm/qwen2.5-0.5b-instruct-q8.yaml | New pinned case YAML for promoted Qwen2.5 Q8_0 GGUF runtime evidence enrollment. |
| testdata/cases/causal-lm/lfm2-350m-f16.yaml | New pinned case YAML for promoted LFM2-350M F16 GGUF runtime evidence enrollment. |
| src/mobius/integrations/ort_genai/auto_export.py | Generalizes runtime compatibility metadata generation to support LFM2’s pinned minimum/tested versions. |
| src/mobius/integrations/ort_genai/auto_export_test.py | Adds unit coverage for LFM2 runtime compatibility pinning behavior. |
| src/mobius/integrations/gguf/_tokenizer.py | Hardens local Hub-cache asset resolution and supports deterministic materialization of GGUF vocab padding into tokenizer.json. |
| src/mobius/integrations/gguf/_tokenizer_test.py | Adds tests for non-SmollM pipeline hash-binding, deterministic padding, and Hub-cache symlink containment/escape rejection. |
| src/mobius/integrations/gguf/_runtime_evidence.py | Adds exact runtime evidence records for Qwen2.5 Q8_0 and LFM2-350M F16; refreshes SmolLM route config hash. |
| src/mobius/integrations/gguf/_runtime_evidence_test.py | Extends matching-evidence negative coverage to ensure fail-closed behavior when no unique evidence exists. |
| src/mobius/integrations/gguf/_docs_test.py | Updates expected structured runtime-evidence coverage list to include qwen2 and lfm2. |
| src/mobius/integrations/gguf/_arch_registry.py | Promotes qwen2 and lfm2 runtime status to SUPPORTED with evidence IDs and restriction text. |
| docs/api/build_from_gguf.md | Updates census counts and documents the bounded runtime-evidence census + promoted routes and remaining deferred families. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1053
to
+1062
| graph_dir = tmp_path / "graph-identity" | ||
| graph_dir.mkdir() | ||
| for filename in evidence.graph_files: | ||
| os.link(output_dir / filename, graph_dir / filename) | ||
| graph_identity = gguf_graph_package_identity(graph_dir) | ||
| assert graph_identity.files == evidence.graph_files | ||
| assert graph_identity.sha256 == evidence.graph_sha256 | ||
| captured.clear() | ||
| del package | ||
| gc.collect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Promotes two exact graph-supported GGUF routes to runtime-supported under the released
onnxruntime-genai==0.15.2contract:Qwen/Qwen2.5-0.5B-Instruct-GGUF@9217f5db79a29953eb74d5343926648285ec7e67,qwen2.5-0.5b-instruct-q8_0.gguf, 675,710,816 bytes, SHA-256ca59ca7f13d0e15a8cfa77bd17e65d24f6844b554a7b6c12e07a5f89ff76844e, 291 tensors (F32=121,Q8_0=170).LiquidAI/LFM2-350M-GGUF@8fdc9d526b7ed346b19257551b05816c7912ecc2,LFM2-350M-F16.gguf, 711,482,304 bytes, SHA-256379ffdcbf08147c0313f6f1ce7ff558a2bc935eda633f4b46c52347032419c42, 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
f7391f2aac9a7617c1c10e397e91b6f31b80bb3c5f338966b46e7d3935246500; graphb0d1814ea69dddd405e30541e9009ba6fb73930f98538921d5c2eaa4a14f5d2c; packagecb43c76e1bc3db07a6a3631c7a99e7c47b6891807fecffdb3b70fddd9c108173.c961bba579ea33a2472a7c5d3f469c76f1f8c7aae8440a7eaa86bc6e878a42f4; graph2a15694cd5ff9f5c9f798feeca91cc41174842065ada80a18b288478725b3342; package87b8cdd1edc8c5be948716df3efe551f5fc8f96762d7ea3f99b27688ca9f24af.Qwen/Qwen2.5-0.5B-Instruct@a338b55dd21219a5f4da42bc11a9313d1a27d4cc; LFM2 tokenizerLiquidAI/LFM2-350M@73e3c253078a3b97c2e14b4c4665679f4d9b6d56.Validation
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.