Skip to content

atlas-core: treat W4A16_NVFP4 as NVFP4 in quant detection (#88) - #90

Merged
AzeezIsh merged 1 commit into
mainfrom
fix/qwen36-nvfp4-mixed-loader
Sep 26, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
fix/qwen36-nvfp4-mixed-loader

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Fixes #88. The current nvidia/Qwen3.6-35B-A3B-NVFP4 revision failed to load with Expected FP8E4M3 for ...shared_expert.gate_proj.weight, got UInt8. Reiner job 297 saw the same failure on main66 and on the merge-train tree.

Root cause

The pack's modelopt MIXED_PRECISION per-layer map labels its NVFP4 layers W4A16_NVFP4 (FP8 ×130, W4A16_NVFP4 ×161). mixed_precision_variant (weight_map/nvfp4_detect.rs:385) matched only the exact string NVFP4, so it saw only FP8 layers and routed the whole pack to Fp8Dequanted. The loader then skipped the NVFP4 experts and expected an FP8 shared expert.

On this box the Flash-Next and 27B packs use NVFP4, while Nemotron-3.5-Lightning uses W4A16_NVFP4. Atlas's NVFP4 path is exactly W4A16 (BF16 activations over NVFP4 weights).

Change

One predicate, atlas_core::config::is_nvfp4_quant_algo (NVFP4 or *_NVFP4, case-insensitive), is used at every site that matches an NVFP4 algo label:

  • the mixed-map and global modelopt arms of nvfp4_detect;
  • weight_manifest;
  • canonicalize_model_quant.

All other quant_algo sites were audited and left alone: they are pass-through, display, fingerprint, or a different field (kv_cache_quant_algo). The nemotron_h loader detects NVFP4 per tensor, so it does no label matching.

Validation

The current nvidia/Qwen3.6-35B-A3B-NVFP4 revision failed to load (reiner job
297, main and merge train alike): "Expected FP8E4M3 for
...shared_expert.gate_proj.weight, got UInt8". Its modelopt MIXED_PRECISION
map labels NVFP4 layers W4A16_NVFP4 (FP8 x130, W4A16_NVFP4 x161), and the
mixed-map detector matched only the exact string NVFP4. It saw only FP8,
routed the pack to Fp8Dequanted, and then expected FP8 experts. The Flash-Next
and 27B packs say NVFP4; Nemotron-3.5-Lightning also uses W4A16_NVFP4.

is_nvfp4_quant_algo (NVFP4 or *_NVFP4, case-insensitive) is now the single
predicate in the mixed-map and global modelopt arms of nvfp4_detect, in
weight_manifest, and in canonicalize_model_quant. W4A16 NVFP4 is exactly
the path Atlas serves.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AzeezIsh

Copy link
Copy Markdown
Contributor Author

Merged as part of the GB10 merge train (main 1ab38536b). The train was #78, #67, #68, #82, #83, then #89 and #90.

Gates on the combined tree:

  • ST-995 (job 280): PASS, 84.72 / 84.68 against bars of 82.72 / 81.65.
  • Agentic perf leg (job 298): VALID. 1007 of 1007 turns, 0 failed, 0 missing, 89 min.
  • Support matrix (job 346): green. Nemotron-3.5-Lightning NVFP4, Qwen3.6-35B-A3B NVFP4 and Qwen3.6-35B-A3B FP8 each boot with 0 unresolved lookups on main66 + fixes and on the train tree. Greedy probes are identical between the two trees (mean |Δlogprob| 0.0000), and 10k TTFT is equal or slightly faster.

Tree check: main has the same tree as the job-346 build (f8a04db1f): git diff is empty. main also differs from the tree the gates ran on (53f4a3d3a) only by the marker [expected_absent] declarations (f261446bd), which are TOML and tests only.

AzeezIsh added a commit that referenced this pull request Sep 26, 2026
qsa_score_tc / qsa_attn_tc{,2,3} / moe_persist_marker are lazy
try_kernel probes introduced by main's #90/#92 campaign; none is built
for gfx1151. Without declarations the new boot kernel gate fails the
serve with '5 unresolved kernel lookup(s)'.

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AzeezIsh
AzeezIsh deleted the fix/qwen36-nvfp4-mixed-loader branch September 29, 2026 06:01
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.

GB10: current nvidia/Qwen3.6-35B-A3B-NVFP4 revision fails to load (MIXED_PRECISION pack misread as FP8; NVFP4 shared_expert)

1 participant