You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bc27359
Browse filesBrowse the repository at this point in the historyBrowse files
feat(qwen3_5_moe): read llm-compressor packed NVFP4 on the mixed-fp8 dense pass
A compressed-tensors mixed-precision checkpoint stores its dense NVFP4
projections as .weight_packed / .weight_scale / .weight_global_scale, not as
modelopt's .weight / .weight_scale / .weight_scale_2. The mixed-fp8 dense pass
only looked for the modelopt names, so on such a checkpoint the packed shared
expert was never emitted and the load failed with
KeyError: 'model.layers.0.mlp.shared_expert.gate_up_proj.weight'.
Add a .weight_packed branch to that pass. Layers the model keeps native NVFP4
are emitted through the existing _dense_nvfp4_emit with llm-compressor's parts
reader; layers it does not keep native are dequantized to bf16 and routed
through the same bf16 fusion the .weight path already uses.
The two parts readers are NOT interchangeable and must stay distinct:
_nvfp4_parts (modelopt) uses the global scale directly, while nvfp4_parts_ct
(llm-compressor) takes its reciprocal. Swapping them produces garbled output
rather than an error, so each call site names the reader it needs.
Verified: unsloth/Qwen3.6-35B-A3B-NVFP4-Fast resolves and loads with
attn_quant='fp8_pertensor' expert_quant='nvfp4' dense_quant='nvfp4'
lm_head_quant='fp8'; nvidia/Qwen3.6-35B-A3B-NVFP4's four values are unchanged.
0 commit comments