[Qwen3.5] Enable nvfp4 checkpoint#18937
Conversation
Summary of ChangesHello @hlu1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces support for Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request enables support for nvfp4 checkpoints by disabling quantization for specific modules, including the Linear Attention, Global Attention, visual model, and MTP layer when modelopt_fp4 quantization is detected. The changes are consistent across multiple model files and correctly implement the intended logic. I've added a few suggestions to improve code conciseness and maintainability by refactoring repeated conditional blocks into more compact expressions.
|
/tag-and-rerun-ci |
|
@hlu1 , does the Qwen3.5 NVFP4 model has the accuracy issue with sglang? I'm asking because when I tested with the BF16 model weight the gsm8k return invalid result. python3 benchmark/gsm8k/bench_sglang.py --num-shots 8 --num-questions 100 --parallel 100 --port 28000
Accuracy: 0.690
Invalid: 0.010
Latency: 16.349 s
Output throughput: 1286.579 token/s |
You need to use the test that applies the chat_template: |
Thanks for updating, will try it next day. |
|
/rerun-failed-ci |
|
/rerun-failed-ci |
|
Why hardcode quant_config=None instead of deriving it from the model configuration? Bypassing quantization logic at the SGLang level is counterproductive since NVFP4 checkpoints do not contain native BF16 weights. Consequently, this PR breaks compatibility with the majority of NVFP4 models available on Hugging Face. |
This reverts commit bba2fc4.
The checkpoint is released: https://huggingface.co/nvidia/Qwen3.5-397B-A17B-NVFP4 |
Agent-Logs-Url: https://github.com/liusy58/sglang/sessions/4e1c2290-15dc-4c68-ac8a-2b81f5e4e27d Co-authored-by: liusy58 <45984215+liusy58@users.noreply.github.com>
…els (#1236) ### What does this PR do? Type of change: Skills update Add a debug loop guide for deploying unsupported models to the deployment skill. When deploying models not in the validated support matrix (e.g., newly quantized VLMs or models with new architectures like Devstral/ministral3), the inference framework (vLLM, SGLang, TRT-LLM) often fails during model init or weight loading. This PR adds: - `references/unsupported-models.md` — a 5-step iterative debug workflow: **run → read error → diagnose → patch framework source → re-run** - A short pointer in `SKILL.md` under "Unsupported Models" (keeps SKILL.md concise, matching the PTQ skill's pattern) The guide covers five common error categories with real-world examples: - **Weight key mismatches** (e.g., [vllm#39406](vllm-project/vllm#39406)) - **Quantized/unquantized layer confusion** (e.g., [sglang#18937](sgl-project/sglang#18937)) - **Missing architecture support** (e.g., `ministral3` not handled in vLLM's `mistral3.py`) - **Transformers version mismatches** - **Kernel-level issues** (escalate to framework team) Motivated by deploying a Devstral-Small-2-24B NVFP4 checkpoint on vLLM, where vLLM's `mistral3.py` didn't handle `ministral3` as a text backbone model type. ### Testing Validated end-to-end: NVFP4 quantization of Devstral-Small-2-24B → vLLM deployment on B100 GPUs with the debug loop (3 iterations to get the server running). ### Before your PR is "*Ready for review*" - Is this change backward compatible?: N/A (documentation only) - If you copied code from any other sources or added a new PIP dependency, did you follow guidance in `CONTRIBUTING.md`: N/A - Did you write any new necessary tests?: N/A (skill documentation) - Did you update [Changelog](https://github.com/NVIDIA/Model-Optimizer/blob/main/CHANGELOG.rst)?: N/A <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added a deployment guide for unsupported models with an iterative "run → read error → diagnose → patch → re-run" troubleshooting workflow, common failure categories, escalation criteria, and practical remediation tips. * Added post-quantization validation guidance and a lightweight script to verify which layers are quantized vs excluded, plus recommendations for addressing unexpected layers and MoE/VLM naming gaps. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Zhiyu Cheng <zhiyuc@nvidia.com>
Motivation
Enable nvfp4 checkpoint
Modifications
Disable quantization for the Linear, Global attention modules, visual model, and MTP layer.
Accuracy Tests
No MTP: 0.960
MTP3: 0.969, acceptance len: 3.47
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci