Skip to content

Keep Nemotron-H GGUF runtime fail-closed with pinned evidence - #674

Merged
justinchuby merged 4 commits into
mainfrom
justinchuby-complete-nemotron-h-runtime
Aug 27, 2026
Merged

justinchuby merged 4 commits into
mainfrom
justinchuby-complete-nemotron-h-runtime

Conversation

@justinchuby

@justinchuby justinchuby commented Aug 27, 2026 •

Copy link
Copy Markdown
Member

Summary

  • pin the smallest production Nemotron-H MoE model GGUF at an immutable revision and record bounded artifact/config/tokenizer/graph/state evidence without downloading the payload
  • keep nemotron_h_moe fail-closed while preserving dense nemotron_h preflight behavior
  • retain the truthful loop-over-experts graph because ORT 1.29 MoE/QMoE lacks ReLU² and no proven GGUF IQ2_XXS-to-QMoE storage/packer/kernel route exists
  • record the exact ORT GenAI 0.15.2 recurrent-state ABI gaps instead of claiming that heterogeneous-state discovery is absent

Pinned fail-closed evidence

  • GGUF: bartowski/nvidia_Nemotron-3-Nano-30B-A3B-GGUF@1fc64d5b160654ec892df2708aa893b0e96e6491 / nvidia_Nemotron-3-Nano-30B-A3B-IQ2_XXS.gguf
  • identity: 18,010,755,296 bytes, SHA-256 f3da710c046ce7cc6ff28a9b5f1a9153ac72e3f60603e51c7bb679d80716b58a, 401 tensors, 31,577,940,288 logical parameters
  • bounded prefix: 16,777,216 bytes, SHA-256 db14a1223f2f4cfaaa265eafd763b760702c83a5007c72e2f3f265b0e7439dff
  • explicit float storage: 63,155,880,576 bytes for fp16 and 126,311,761,152 bytes for fp32; the source exceeds the 16 GiB artifact policy before conversion
  • graph census: normal optimized CPU export 37,142 nodes; pre-optimization task graph 40,167 nodes; both have 6,255 initializers and 6,028 MatMul nodes
  • QMoE precision: separate router_probs/router_weights can 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.
  • proven fused/storage blockers: no ReLU² activation in ORT 1.29 MoE/QMoE; no QMoE GGUF IQ2_XXS format or proven Mobius IQ2_XXS packer/kernel path
  • state ABI: ORT GenAI 0.15.2 discovers sparse/nonconsecutive KV and conv/recurrent slots, but derives recurrent_state while Mobius exports ssm_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 gaps
  • runtime context: ONNX Runtime 1.29.0, CPUExecutionProvider, ORT GenAI 0.15.2
  • tokenizer: official source revision/assets are pinned, but GGUF pre=pixtral depends on compiled llama.cpp behavior that is not serialized, so exact ORT tokenizer materialization remains blocked

No 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

  • focused truthfulness suite: 62 passed; review-thread follow-up: 2 passed
  • broad serial non-integration suite: 8,624 passed, 63 skipped, 12 deselected
  • generated GGUF docs/capability checks and lintrunner pass
  • changed evidence/model modules pass isolated mypy; repository-wide mypy remains a known non-clean baseline
  • fresh independent high-confidence rereview found no issues
  • all PR review threads replied to and resolved

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.

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]>
@justinchuby
justinchuby requested review from a team and a lite review from Copilot August 27, 2026 11:47
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]>
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

Performance Comparison

Comparing 86cd1ca → d4791fa

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0% ⚪
bert (feature-extraction) num_nodes 68 68 +0.0% ⚪
falcon model_size_bytes 364 KB 364 KB +0.0% ⚪
falcon num_nodes 66 66 +0.0% ⚪
gemma2 model_size_bytes 428 KB 428 KB +0.0% ⚪
gemma2 num_nodes 105 105 +0.0% ⚪
gpt2 model_size_bytes 324 KB 324 KB +0.0% ⚪
gpt2 num_nodes 54 54 +0.0% ⚪
llama model_size_bytes 425 KB 425 KB +0.0% ⚪
llama num_nodes 60 60 +0.0% ⚪
llama (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
llama (static-cache) num_nodes 56 56 +0.0% ⚪
mamba (ssm-text-generation) model_size_bytes 296 KB 296 KB +0.0% ⚪
mamba (ssm-text-generation) num_nodes 94 94 +0.0% ⚪
phi3 model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 num_nodes 58 58 +0.0% ⚪
phi3 (static-cache) model_size_bytes 421 KB 421 KB +0.0% ⚪
phi3 (static-cache) num_nodes 54 54 +0.0% ⚪
qwen2 model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 num_nodes 60 60 +0.0% ⚪
qwen2 (static-cache) model_size_bytes 425 KB 425 KB +0.0% ⚪
qwen2 (static-cache) num_nodes 56 56 +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) model_size_bytes 506 KB 506 KB +0.0% ⚪
qwen3_5_moe (hybrid-text-generation) num_nodes 265 265 +0.0% ⚪
qwen3_5_text (hybrid-text-generation) model_size_bytes 458 KB 458 KB +0.0% ⚪
qwen3_5_text (hybrid-text-generation) num_nodes 127 127 +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) model_size_bytes 977 KB 977 KB +0.0% ⚪
qwen3_5_vl (hybrid-qwen-vl) num_nodes 450 450 +0.0% ⚪
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0% ⚪
t5 (seq2seq) num_nodes 176 176 +0.0% ⚪
whisper (speech-to-text) model_size_bytes 1008 KB 1008 KB +0.0% ⚪
whisper (speech-to-text) num_nodes 128 128 +0.0% ⚪

No performance regressions.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 for nemotron_h.
  • Rename the Torch reference Nemotron-H repair helper to _fix_nemotron_h_dt_bias and 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.

Comment thread src/mobius/integrations/gguf/_docs.py Resolved
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 86cd1ca → d4791fa

Model Sub-model Changes Status
bert (feature-extraction) model 0 ⚪
falcon model 0 ⚪
gemma2 model 0 ⚪
gemma4 (gemma4) decoder 0 ⚪
gemma4 (gemma4) embedding 0 ⚪
gemma4 (gemma4) vision_encoder 0 ⚪
gemma4_text model 0 ⚪
gpt2 model 0 ⚪
llama model 0 ⚪
llama (static-cache) model 0 ⚪
mamba (ssm-text-generation) model 0 ⚪
phi3 model 0 ⚪
phi3 (static-cache) model 0 ⚪
qwen model 0 ⚪
qwen (static-cache) model 0 ⚪
qwen2 model 0 ⚪
qwen2 (static-cache) model 0 ⚪
qwen2_moe model 0 ⚪
qwen2_moe (static-cache) model 0 ⚪
qwen3 model 0 ⚪
qwen3 (static-cache) model 0 ⚪
qwen3_5_moe (hybrid-text-generation) model 0 ⚪
qwen3_5_text (hybrid-text-generation) model 0 ⚪
qwen3_5_vl (hybrid-qwen-vl) decoder 0 ⚪
qwen3_5_vl (hybrid-qwen-vl) embedding 0 ⚪
qwen3_5_vl (hybrid-qwen-vl) vision_encoder 0 ⚪
qwen3_moe model 0 ⚪
qwen3_moe (static-cache) model 0 ⚪
qwen3_next (hybrid-text-generation) model 0 ⚪
t5 (seq2seq) decoder 0 ⚪
t5 (seq2seq) encoder 0 ⚪
whisper (speech-to-text) decoder 0 ⚪
whisper (speech-to-text) encoder 0 ⚪

No architecture changes detected. ✅


Legend: ⚪ No change · 🔵 Minor (attrs/inits) · 🟡 Moderate (nodes added/removed) · 🔴 Major (interface changed)

justinchuby and others added 2 commits August 27, 2026 05:24
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]>
@justinchuby
justinchuby merged commit 91225ed into main Aug 27, 2026
24 of 26 checks passed
@justinchuby
justinchuby deleted the justinchuby-complete-nemotron-h-runtime branch August 27, 2026 14:29
justinchuby added a commit that referenced this pull request Aug 28, 2026
## 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants