Skip to content

Guard unsupported Nemotron 3.5 GGUF conversion - #486

Merged
justinchuby merged 1 commit into
mainfrom
justinchuby-trial-nemotron-gguf-conversion
Aug 14, 2026
Merged

justinchuby merged 1 commit into
mainfrom
justinchuby-trial-nemotron-gguf-conversion

Conversation

@justinchuby

@justinchuby justinchuby commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Fail fast for nemotron_h_moe GGUFs before remote multi-GB downloads (when Hub metadata is available) and again from the local header before graph construction.
  • Reject split GGUF shards, including text/mmproj paths, rather than emitting incomplete weights.
  • Reject mobius build-gguf --runtime ort-genai before artifacts because that path cannot yet emit a valid cache/tokenizer contract.
  • Document the pinned Nemotron 3.5 GGUF/BF16 evidence, exact file-selection commands, Option A direct-ORT recipe, acceptance gates, and waiver; refine the quantization skill with reusable direct-GGUF checks.

Pinned evidence

  • GGUF: unsloth/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-GGUF@f2d3fe3694501008786e81e5f20360cbf715496a
  • Official BF16: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16@d468880b6ad3c6e0d21377ce7242adaea4cc884d
  • Backbone schedule: 23 Mamba + 23 MoE + 6 attention layers; GGUF block 52 is the separate combined attention+MoE MTP block.
  • Q8_0 is qtype-compatible, but lacks semantic acceptance. MXFP4_MOE contains 12.772B Q5_1 parameters; UD-Q4_K_M contains 15.326B Q5_0 + 12.772B Q5_1 parameters, so neither preserves quantization end to end.
  • GGUF padding ID 999 conflicts with the official <|im_end|> padding token (ID 11), and the GGUF records no immutable upstream BF16 commit.

Validation

  • Rebased linearly onto repaired main commit 2073725840e007c1fba59ce3cb1f06e4ad9fe75a; the Fix merged unit and lint regressions #484 fixes are inherited, not duplicated.
  • 86 passed: GGUF builder/mmproj/CLI plus quantization integration regression suites.
  • Canonical non-integration suite: 3,933 passed, 58 skipped.
  • Live Hub metadata preflight rejected the pinned 35 GB Q8 file before download.
  • Initialized lintrunner -a and git diff --check pass; the worktree is clean.
  • Independent release review found no remaining significant issues.
  • Refreshed CI passes Lint, all Ubuntu/Windows test jobs, Build, L1 smoke, Architecture Diff, benchmarks, CodeQL, affected-model detection, CLA, and lintrunner.
  • Self-hosted Integration (fast): 16 passed, 4 skipped, 2 failed, exclusively the same two DeepSeek parity failures as Fix merged unit and lint regressions #484's repaired-main job (test_deepseek_v2_lite_prefill_logits_match and test_deepseek_non_mla_decoder_prefill_logits_match). This PR changes no DeepSeek code.

Waivers

  • No Nemotron GGUF ONNX artifact, ORT load, ORT GenAI load, or generation is claimed: the new guard intentionally prevents unsupported artifacts. Current Nemotron-H synthetic parity is skipped/xfail (expert shape transfer mismatch and Mamba2 recurrence divergence).
  • Foundry Local and L4/L5 generation are waived until architecture parity, MTP handling, tokenizer provenance, and runtime cache bindings are implemented.
  • The inherited DeepSeek GPU parity failures are outside this focused PR; fixing them here would mix unrelated model work.

Tracks #483.

@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

🏗️ Architecture Diff

Comparing 2073725 → 7c896c9

Model Sub-model Changes Status

No architecture changes detected. ✅


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

@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Performance Comparison

Comparing 2073725 → 7c896c9

Model Metric Baseline Current Delta
bert (feature-extraction) model_size_bytes 359 KB 359 KB +0.0% ⚪
bert (feature-extraction) num_nodes 60 60 +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 388 KB 388 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 264 264 +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 126 126 +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 428 428 +0.0% ⚪
t5 (seq2seq) model_size_bytes 836 KB 836 KB +0.0% ⚪
t5 (seq2seq) num_nodes 166 166 +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 adds early, explicit guardrails in the GGUF import pipeline to prevent generating incomplete or non-runnable artifacts for currently unsupported Nemotron 3.5 GGUF layouts and unsupported runtime targets. It aligns CLI/docs/tests so failures happen before large remote downloads or any artifact directory creation, and ensures multimodal (text+mmproj) flows also validate the GGUF headers up front.

Changes:

  • Add Hub-metadata and local-header preflight validation to reject nemotron_h_moe GGUF conversion and reject sharded/split GGUF inputs early.
  • Reject mobius build-gguf --runtime ort-genai with an actionable error before creating output artifacts.
  • Add targeted unit tests plus documentation/skill guidance describing GGUF acceptance gates and Nemotron 3.5 waiver rationale.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/gguf_test.py Adds a CLI regression test ensuring --runtime ort-genai fails before artifact creation.
src/mobius/integrations/gguf/_mmproj.py Validates both text and mmproj GGUFs before config extraction/graph build to fail fast on unsupported/sharded inputs.
src/mobius/integrations/gguf/_mmproj_test.py Adds minimal GGUF fixtures and tests for early multimodal guard behavior.
src/mobius/integrations/gguf/_builder.py Implements Hub preflight + local-header validation for unsupported architectures and sharded GGUFs.
src/mobius/integrations/gguf/_builder_test.py Adds unit tests covering Nemotron guard behavior, shard rejection, and Hub-preflight fallback behavior.
src/mobius/main.py Rejects build-gguf --runtime ort-genai early and updates CLI help text accordingly.
docs/cli_reference.md Documents new/clarified GGUF CLI options and explicitly states shard + nemotron_h_moe rejection behavior.
docs/api/build_from_gguf.md Updates API docs and adds a detailed Nemotron 3.5 GGUF waiver section with pinned evidence and recipes.
.agents/skills/onnx-export-quantization/SKILL.md Adds reusable “Direct GGUF import acceptance” checks to prevent over-claiming preservation/compatibility.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Reject nemotron_h_moe and split GGUF inputs before expensive downloads or graph construction. Document the pinned MTP, qtype, tokenizer, provenance, and runtime evidence; add focused regressions and refine the direct-GGUF skill guidance.

Co-authored-by: Copilot App <[email protected]>
Signed-off-by: Justin Chu <[email protected]>
@justinchuby
justinchuby force-pushed the justinchuby-trial-nemotron-gguf-conversion branch from dbe3a5c to 7c896c9 Compare August 14, 2026 04:00
@justinchuby
justinchuby enabled auto-merge (squash) August 14, 2026 04:01
@justinchuby
justinchuby merged commit 01008cf into main Aug 14, 2026
22 of 23 checks passed
@justinchuby
justinchuby deleted the justinchuby-trial-nemotron-gguf-conversion branch August 14, 2026 06:32
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.

2 participants