fix: [modelopt 0.43.0][GB200][llm_ptq / sglang] Llama-3.1-8B-Inst (#5997673)#1080
Draft
fix: [modelopt 0.43.0][GB200][llm_ptq / sglang] Llama-3.1-8B-Inst (#5997673)#1080
Conversation
…ng] Llama-3 Signed-off-by: Pensieve Bot <pensieve-bot@nvidia.com>
…ng] Llama-3 Signed-off-by: Pensieve Bot <pensieve-bot@nvidia.com>
Collaborator
Author
|
/ok to test 909e7e6 |
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5997673
Summary
FP8 and NVFP4 quantized Llama-3.1-8B-Instruct model produces garbage output text when served on GB200 with SGLang. The model exports successfully but inference fails with incorrect output, likely related to quantization scaling factor handling or DeepGemm integration on Blackwell architecture.
Root Cause
The warning message indicates 'DeepGemm is enabled but the scale_fmt of checkpoint is not ue8m0' which suggests a mismatch in quantization scale formats for Blackwell GPU execution. The FP8/NVFP4 quantized weights are exported with incorrect scaling factor format or the KV cache quantization parameters are not properly configured for GB200, causing numerical degradation during inference.
Agent Fix Summary
Fixed the issue "DeepGemm is enabled but the scale_fmt of checkpoint is not ue8m0" by adding the scale_fmt field to exported quantization configurations.
Changes Made:
Modified modules/Model-Optimizer/modelopt/torch/export/quant_utils.py:
Updated modules/Model-Optimizer/tests/gpu/torch/export/test_export.py:
How It Works:
Validation:
Files Changed
modelopt/torch/export/quant_utils.pytests/gpu/torch/export/test_export.pyReproduction
To validate on a Slurm cluster, save the files below under
tools/launcher/in Model-Optimizer and run:cd tools/launcher uv run launch.py --yaml examples/triage/test_scale_fmt_simple.yaml --yescd tools/launcher uv run launch.py --yaml examples/triage/test_scale_fmt.yaml --yestools/launcher/examples/triage/test_scale_fmt_simple.shtools/launcher/examples/triage/test_scale_fmt_simple.yamltools/launcher/examples/triage/test_scale_fmt.shtools/launcher/examples/triage/test_scale_fmt_simple.pytools/launcher/examples/triage/test_scale_fmt.yamlAuto-generated by pensieve
/magic-triageagentic fix — please review before merging.