Repository navigation
Keep Nemotron-H GGUF runtime fail-closed with pinned evidence - #674
Conversation
Pin the smallest production Nemotron-H MoE GGUF and record bounded header, tokenizer, graph, state ABI, and resource evidence without downloading its payload. Correct preflight so Nemotron-H MoE rejects incompatible fused and native-quantized routes while dense Nemotron-H remains unaffected. Align the Hugging Face reference repair helper with the documented dt_bias API, stamp heterogeneous-state deferral metadata, and add network-free closure tests plus generated capability documentation. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Parenthesize blocker strings explicitly so the CI Ruff ISC004 rule accepts the immutable evidence record, and apply the repository formatter. Co-authored-by: Copilot App <[email protected]> Signed-off-by: Justin Chu <[email protected]>
Performance Comparison
|
There was a problem hiding this comment.
Pull request overview
This PR extends the GGUF integration’s “capability/evidence” surface to explicitly record fail-closed runtime blocker evidence for Nemotron-H MoE (pinned, bounded, and network-free), while tightening preflight classification so Nemotron-H MoE is rejected for incompatible sparse-MoE/quantized routes without misclassifying dense Nemotron-H. It also aligns the Torch reference repair helper name with the Nemotron-H dt_bias fix and updates docs/tests accordingly.
Changes:
- Add immutable “runtime blocker” evidence records (Nemotron-H MoE IQ2_XXS) and export them into the GGUF quantization capability matrix + documentation.
- Update GGUF preflight MoE assessment to special-case
nemotron_h_moe(fail-closed for fused/native-quantized routes) and stamp heterogeneous-state runtime deferral metadata fornemotron_h. - Rename the Torch reference Nemotron-H repair helper to
_fix_nemotron_h_dt_biasand update callers/tests.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| testdata/evidence/gguf_quantization_capabilities.json | Adds a pinned runtime_blocker_evidence entry for Nemotron-H MoE (bounded + withheld-claims record). |
| src/mobius/tasks/_causal_lm.py | Marks nemotron_h builds as runtime-deferred due to heterogeneous KV + Mamba2 conv/recurrent state (issue #605). |
| src/mobius/integrations/gguf/_runtime_evidence_test.py | Adds coverage ensuring blocker evidence is pinned and does not imply runtime support. |
| src/mobius/integrations/gguf/_runtime_blocker_evidence.py | Introduces immutable, validated blocker-evidence records (fail-closed runtime evidence). |
| src/mobius/integrations/gguf/_quant_capabilities.py | Serializes blocker evidence into the machine-readable capability matrix output. |
| src/mobius/integrations/gguf/_quant_capabilities_test.py | Verifies blocker evidence is metadata-only and not counted as selected/runtime-supported. |
| src/mobius/integrations/gguf/_preflight.py | Adds architecture-aware sparse-MoE fusion assessment for Nemotron-H MoE. |
| src/mobius/integrations/gguf/_preflight_test.py | Adds tests ensuring Nemotron-H MoE quantized routes are rejected while dense Nemotron-H is not misclassified. |
| src/mobius/integrations/gguf/_docs.py | Adds a rendered documentation table for fail-closed runtime blocker evidence. |
| src/mobius/integrations/gguf/_builder_test.py | Ensures Nemotron-H MoE remains fail-closed for runtime packaging and carries the deferral metadata. |
| src/mobius/integrations/gguf/_arch_registry.py | Adds a pointer from the Nemotron-H MoE registry entry to the pinned blocker evidence ID. |
| src/mobius/_testing/torch_reference.py | Renames the Nemotron-H repair helper and keeps the dt_bias/out_proj restoration behavior. |
| src/mobius/_testing/torch_reference_test.py | Updates mocking to match the renamed Torch reference helper. |
| docs/api/build_from_gguf.md | Publishes the generated “Fail-closed runtime evidence” section for Nemotron-H MoE. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🏗️ Architecture Diff
No architecture changes detected. ✅ Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed) |
Distinguish the optimized production census from the pre-optimization graph, narrow the fused MoE blockers to ReLU2 and unsupported IQ2 storage, and record the exact ORT GenAI recurrent-state naming, reorder, and rewind gaps. Co-authored-by: Copilot App <[email protected]> Copilot-Session: d43e3a84-d124-4056-821c-e0c0ca3f3f97 Signed-off-by: Justin Chu <[email protected]>
Serialize the execution provider and render the pinned ONNX Runtime version and provider in generated blocker documentation so the fail-closed result is fully reproducible. Co-authored-by: Copilot App <[email protected]> Copilot-Session: d43e3a84-d124-4056-821c-e0c0ca3f3f97 Signed-off-by: Justin Chu <[email protected]>
## Summary - promote exact-artifact ORT GenAI runtime support for six graph-supported GGUF architectures: GPT-2, GPT-NeoX/Pythia, MPT, OLMo, StarCoder, and StarCoder2 - bind every route to immutable source/config/tokenizer revisions, exact artifact identity, tensor/value closure, full logits, dynamic-cache replay/rollback/reorder, deterministic 20-token generation, tokenizer identity, and graph/package/report roundtrips - keep all six routes explicitly dequantized to float storage and float operators; this PR makes no native or source-faithful quantized-runtime claim - add network-free case fixtures and a machine-readable batch manifest, then regenerate the capability matrix and GGUF documentation - route GPT-2 through the generic decoder ABI, permit exact-evidenced portable/default graphs for CPU packages, and close dense Qwen3 Q/K norm tensor mapping - preserve the global revision policy: `revision=None` remains unpinned and arbitrary explicit revisions continue to forward unchanged; immutable revisions appear only in tests/evidence ## Selected artifacts | Architecture | Artifact bytes | SHA-256 | |---|---:|---| | GPT-2 | 81,196,544 | `4234545f917ec1df10dab4d926796a83422b68e9010d85a4c111b8b541f32892` | | GPT-NeoX/Pythia | 38,508,192 | `8e331c8c8016bed8ff1863b78fafe51e86b2364f32c2d7f3e201687e081cf7f7` | | MPT | 8,734,304 | `5627dcb0ff18f6f7200f83c0aed2056a6a7c86b5f2d865833e1b5f00b00e4daa` | | OLMo | 33,860,576 | `be1c5a22ac0e75cd5874467ffd80bcd2c8500609d3bf7ccdb5b269373e4d6da4` | | StarCoder | 103,899,456 | `aa8c2170bb9172447baba14309916cfc0d901dbffaf10f1448f4f631e10c1f41` | | StarCoder2 | 68,039,904 | `ab0a4b4e79c906520808db065a00a317c8b097e2176638b34088975eada6e0ed` | Artifact payload is **334,238,976 bytes**; tokenizer assets add **12,586,075 bytes**, for **346,825,051 downloaded bytes** total, below the 16 GiB policy ceiling. ## Fail-closed outcomes - Qwen3: `TOKENIZER_CHAT_TEMPLATE_IDENTITY_MISMATCH` - BLOOM: `FULL_LOGIT_PARITY_DIVERGENCE` - StableLM: `TENSOR_SHAPE_CLOSURE_FAILED` - Gemma/Gemma2/Gemma3/Phi3: `TOKENIZER_COMPILED_SEMANTICS_UNAVAILABLE` - Falcon: `INVALID_GGUF_HEADER` - Qwen3.5 MoE and Nemotron-H MoE remain excluded as recently handled by #672/#674; tokenizer-only and ABI-blocked route classes remain out of scope ## Runtime evidence - ONNX Runtime 1.29.0 / ORT GenAI 0.15.2 / CPU - exact tensor census and value closure - independent full-logit parity with per-route bounded tolerances - prefill, cached decode, full replay, rollback, reorder, and deterministic generation - tokenizer vocabulary/special-token identity - graph package and `quantization_report.json` roundtrip identity - all downloaded payloads and temporary ONNX packages removed after collection ## Validation - promoted real-artifact runtime cases: 6 passed - focused GGUF unit suite: 1,441 passed, 1 skipped - schema/dashboard/docs coverage: 1,135 passed, 255 skipped - broad serial non-integration suite: 8,626 passed, 64 skipped, 12 deselected - post-rebase focused suite: 413 passed - Ruff check/format and generated-doc check: passed - changed source type check: clean except six pre-existing `auto_export.py` errors outside changed lines; repository-wide mypy remains a known non-clean baseline - independent high-confidence review: no findings --------- Signed-off-by: Justin Chu <[email protected]> Copilot-Session: e2a8f3cf-109b-47c5-bc61-0a91ffd27ebf Copilot-Session: f5f288c7-b4e5-4371-ad46-9d163511ade9
Summary
nemotron_h_moefail-closed while preserving densenemotron_hpreflight behaviorPinned fail-closed evidence
bartowski/nvidia_Nemotron-3-Nano-30B-A3B-GGUF@1fc64d5b160654ec892df2708aa893b0e96e6491/nvidia_Nemotron-3-Nano-30B-A3B-IQ2_XXS.gguff3da710c046ce7cc6ff28a9b5f1a9153ac72e3f60603e51c7bb679d80716b58a, 401 tensors, 31,577,940,288 logical parametersdb14a1223f2f4cfaaa265eafd763b760702c83a5007c72e2f3f265b0e7439dffrouter_probs/router_weightscan represent correction-biased selection with unbiased sigmoid mixing; shared experts and optional latent projections can surround the op, and this pinned 30B has no latent projection. Those are not blockers.recurrent_statewhile Mobius exportsssm_state, does not beam-reorder recurrent state, and rejects nonzero recurrent-state rewind; issue Close remaining heterogeneous recurrent-state runtime gaps #605 now records these exact gapsCPUExecutionProvider, ORT GenAI 0.15.2pre=pixtraldepends on compiled llama.cpp behavior that is not serialized, so exact ORT tokenizer materialization remains blockedNo native quantized runtime support is claimed. Full-logit parity, cached decode, replay/rollback/reorder, deterministic generation, package/report roundtrip, and tensor value closure remain explicitly withheld.
Validation
Waivers: Real runtime/logit/generation checks are intentionally withheld because the smallest immutable artifact exceeds the bounded policy and explicit fp16 weights require 63.2 GB before runtime workspace; released ORT GenAI also has the precise recurrent-state ABI gaps above. This PR remains fail-closed and must not be merged as a runtime-promotion claim.