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
Load-time MXFP8 requantization of bf16 dense, hyper-connection and lm_head weights #624
Checkpoints such as nvidia/Qwen3.8-Flash-Next-NVFP4 ship NVFP4 experts but bf16 dense, hyper-connection and lm_head weights: about 9 GiB of VRAM for Qwen3.8-Flash-Next text-only. That does not fit beside any expert cache on a 10–12 GB card. The FP8 per-tensor path in #389 (closed) needed sm_89 GEMMs and only covered attention/GDN.
Proposed solution
Requantize selected bf16 weights to MXFP8 at load time: e4m3 codes with one e8m0 scale per 32 elements (ceil-log2 of amax/448), computed row-chunked so the fp32 transient stays at ~32 MB. They are then served by the existing mxfp8_linear W8A16 path, which runs on any GPU. The design:
A QuantConfig overlay (LoadTimeQuantConfig) reports MXFP8 for name patterns, so modules build MXFP8 buffers.
The family reader quantizes the bf16 tensors before fusing shards.
ModelSpec.load_quant_targets declares the groups per family; qwen4_exp declares dense, hc and lm_head.
Flags --dense-quant, --hc-quant and --lm-head-quant. They are refused for families without targets, for tied heads, for FTW checkpoints and with --dtype float16.
Used in the 1080 Ti deployment branch, rebuilt today on main 9c635a1 (torch 2.14.1+cu126, Triton 3.8, GTX 1080 Ti sm_61, Qwen3.8-Flash-Next-NVFP4 at 262K): the server runs with --dense-quant mxfp8 --lm-head-quant mxfp8 --hc-quant mxfp8. tests/models/qwen4_exp/test_weight.py and tests/models/test_quant_config.py pass on sm_61; the quality numbers in the issue are unchanged (same quantizer).
Activity
gdevenyi commentedon Oct 13, 2026
Used in the 1080 Ti deployment branch, rebuilt today on main 9c635a1 (torch 2.14.1+cu126, Triton 3.8, GTX 1080 Ti sm_61, Qwen3.8-Flash-Next-NVFP4 at 262K): the server runs with
--dense-quant mxfp8 --lm-head-quant mxfp8 --hc-quant mxfp8.tests/models/qwen4_exp/test_weight.pyandtests/models/test_quant_config.pypass on sm_61; the quality numbers in the issue are unchanged (same quantizer).