Repository navigation
docs(qwen3_omni): record why FP8 is not shipped - #2106
Conversation
Add a README for the qwen3_omni family with the FP8 self-quantization study of the Qwen3-Omni-30B-A3B Thinker: recipe (FP8 attention q/k/v with calibrated static activation scales, FP8 routed-expert stacks with one scale per expert), method, plan size, speed and quality against the bf16 engine and Hugging Face. On TensorRT 11.1 (B200) the FP8 expert path gives wrong output (logit cosine about -0.09) and is not faster (decode 0.93x, 64-token prefill 0.66x); FP8 attention alone is correct but covers under 2% of the weights (decode 1.05x, perplexity +1.8%). A tiny-model check on TensorRT 11.4 (B200, B300) shows the FP8 Dequantize + Gather expert graph gives NaN there. FP8 is not shipped. NVFP4 was not tried. No problem on main was found. Documentation only; no code change. Signed-off-by: Zhenshan Xie <zhenshanx@nvidia.com>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Background
families/qwen3_omnibuilds the Thinker ofQwen/Qwen3-Omni-30B-A3B-Instruct(Qwen3 MoE, 48 layers, 128 routed experts, top 8) as one bf16 text-generation engine and has no quantized build. No ModelOpt FP8 or NVFP4 checkpoint of this model exists on the Hub, so FP8 self-quantization of the Thinker (FP8 attention q/k/v with calibrated static activation scales, FP8 routed-expert stacks with one scale per expert) was built and measured on TensorRT 11.1 (B200). FP8 does not work for this family: the FP8 expert path gives wrong output (logit cosine about -0.09 vs the bf16 engine) and is not faster even so (decode 0.93x, 64-token prefill 0.66x). FP8 attention alone is correct but covers under 2% of the weights (decode 1.05x, perplexity +1.8%). A tiny-model check on TensorRT 11.4 (B200, B300) shows the FP8 Dequantize + Gather expert graph gives NaN there. This change adds a README for the family that records the study, like the yolov10 (#2093), bart (#2004) and timesfm (#2005) studies, so that it does not have to be repeated. The FP8 code is not part of this change.Exit Criteria
Implementation
families/qwen3_omni/README.md(new): a short family description and the section "FP8 quantization study (not shipped)": summary and decision, recipe, method, results, tiny-model check, NVFP4, what was not tried, when to revisit.Recipe that was measured (code kept out of the repository):
nvidia/Nemotron-Post-Training-Dataset-v1prompts; fp32 Dequantize and matmul.[experts, in, out]constant per projection and layer with one scale per expert, Dequantize on the stack, then the existing top-8 Gather and bf16 batched matmuls. The scale is multiplied by a run-time 1 so that TensorRT does not fold the stack back to bf16.lm_head, norms.Why no gain: the routed experts (95% of the Thinker weights) run as a Gather of the selected experts from a stacked constant, not as a plain GEMM. With an FP8 stack, the run-time Dequantize + Gather gives wrong results (NaN on TensorRT 11.4 in the tiny check), prefill gets 1.5x slower, and a second execution context asks for 19.3 GB of scratch memory, so the dequantized stacks seem to be written to memory instead of being read as FP8 by the matmul.
Change categories
Validation
Commands and Results
Documentation only.
python3 -m tools.model_ci validatepytest tools/tests/test_architecture.py tools/tests/test_public_source_hygiene.py(CPU)git diff --checkpython3 tools/pr_metadata.py validateon this descriptionThe numbers in the README come from the local study and are not re-run by this change (full model, B200, TensorRT 11.1, max sequence length 256; ratio is bf16 time over FP8 time):
Tiny random Thinker (2 layers, 8 experts), FP8 experts only, logit cosine vs bf16:
Hardware, Environment, and Revisions
upstream/mainat5801406c.Qwen/Qwen3-Omni-30B-A3B-Instructat26291f793822fb6be9555850f06dfe95f2d7e695(manifest revision).Salesforce/wikitextwikitext-2 test split (12 texts x 128 tokens, held out);nvidia/Nemotron-Post-Training-Dataset-v1(192 calibration prompts).4f9ab925with the FP8 change; tiny-model check on B200 and B300, TensorRT 11.4.0.106 and 11.1.0.106. Reference: Hugging FaceQwen3OmniMoeForConditionalGenerationThinker in bf16.Not Run / Remaining Gaps
lm_head, NVFP4.Contributor Self-Review
Notes For Future Readers
Risk level
Risk rationale: documentation only; one README added, no code, build, bundle or test change.
🤖 Generated with Claude Code