Repository navigation
[6914448] Keep Qwen vision blocks in high precision for vLLM - #2822
Merged
Merged
Conversation
Contributor
cjluo-nv
reviewed
Oct 15, 2026
cjluo-nv
left a comment
Collaborator
There was a problem hiding this comment.
Bot review (gpt-6.1-sol) — DM the bot to share feedback.
LGTM: the narrowed rules preserve merger FP8 coverage and disable vision blocks; the justified existing-test updates require human sign-off.
Needs action:
- Confirm the behavior-aligned assertion changes in
tests/unit/recipe/test_qwen_vision_recipe.pyandtests/gpu/torch/export/test_qwen_vision_recipe_export.py, then give final approval.
No action needed:
- Design review: this avoids incompatible 3D vision-attention inputs using existing shared recipe rules, rather than Python quantizer overrides or new OmegaConf/Pydantic configuration plumbing. The PR explains why it narrows coverage instead of repairing vLLM kernels.
- Test edits are justified: exact merger-only selection replaces broader enablement assertions, and export now checks that block scales are absent. Language-model and KV-cache checks remain intact.
- Recipe ordering keeps blocks and patch embeddings disabled in both vision-only and joint recipes. Documentation explicitly requires checkpoint regeneration.
- Tests were inspected, not executed during this review.
shengliangxu
approved these changes
Oct 15, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2822 +/- ##
==========================================
+ Coverage 69.68% 78.78% +9.10%
==========================================
Files 657 657
Lines 73283 73283
==========================================
+ Hits 51065 57735 +6670
+ Misses 22218 15548 -6670
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ajrasane
force-pushed
the
ajrasane/fix-qwen-vision-fp8-vllm
branch
from
October 15, 2026 20:16
79c89cd to
7402fef
Compare
Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com>
Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com>
Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com>
ajrasane
force-pushed
the
ajrasane/fix-qwen-vision-fp8-vllm
branch
from
October 16, 2026 16:53
60716cf to
2efb835
Compare
ajrasane
enabled auto-merge (squash)
October 16, 2026 17:47
meenchen
approved these changes
Oct 16, 2026
Contributor
|
rohansjoshi
added a commit
that referenced
this pull request
Oct 17, 2026
#2769 #2770 #2719 #2796 #2801 #2794 #2787 #2682 #2793 #2791 #2792 #2766 #2823 #2777 #2773 #2813 #2832 #2795 #2684 #2822 #2838 #2807 #2772 #2837 #2820 (#2843) ## Cherry-picked PRs - #2647 - #2700 - #2718 - #2578 - #2580 - #2711 - #2731 - #2726 - #2697 - #2769 - #2770 - #2719 - #2796 - #2801 - #2794 - #2787 - #2682 - #2793 - #2791 - #2792 - #2766 - #2823 - #2777 - #2773 - #2813 - #2832 - #2795 - #2684 - #2822 - #2838 - #2807 - #2772 - #2837 - #2820 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Expanded quantized model export support for MXFP4, MXFP8, FP8, and additional block-quantization formats. * Added quantization support for GPT-OSS and Step-family models, plus export support for native FP8 experts. * Added chat JSONL data preparation for Megatron workflows and an option to freeze the student MTP head during distillation. * Added model recipes for Kimi, Gemma, DiffusionGemma, and GLM variants. * **Bug Fixes** * Improved ONNX quantization and export compatibility, distributed calibration consistency, and handling of packed attention caches. * Improved safe model loading and low-precision quantization accuracy. * **Documentation** * Updated the 0.48.0 changelog and guidance for data preparation and quantization recipes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Also includes a partial backport of #2656 (only the `_validate_fold_weight` hook and the `mtq.fold_weight` pre-check), which #2820 depends on. --------- Signed-off-by: Shengliang Xu <shengliangx@nvidia.com> Signed-off-by: Rohan Joshi <rohjoshi@nvidia.com> Signed-off-by: Juhi Mittal <juhim@nvidia.com> Signed-off-by: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com> Signed-off-by: Chenjie Luo <chenjiel@nvidia.com> Signed-off-by: yingguo-trt <244492186+yingguo-trt@users.noreply.github.com> Signed-off-by: weimingc <17592131+meenchen@users.noreply.github.com> Signed-off-by: Yue <yueshen@nvidia.com> Signed-off-by: joe-nv <222375587+joe-nv@users.noreply.github.com> Signed-off-by: ajrasane <131806219+ajrasane@users.noreply.github.com> Signed-off-by: Ajinkya Rasane <131806219+ajrasane@users.noreply.github.com> Signed-off-by: ColinM-sys <cmcdonough@50words.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Signed-off-by: Meng Xin <164952785+mxinO@users.noreply.github.com> Signed-off-by: gcunhase <4861122+gcunhase@users.noreply.github.com> Signed-off-by: Chad Voegele <cvoegele@nvidia.com> Co-authored-by: Shengliang Xu <106840466+shengliangxu@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Juhi Mittal <39641197+juhi10071998@users.noreply.github.com> Co-authored-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com> Co-authored-by: Chenjie Luo <108829653+cjluo-nv@users.noreply.github.com> Co-authored-by: yingguo-trt <244492186+yingguo-trt@users.noreply.github.com> Co-authored-by: Wei-Ming Chen <17592131+meenchen@users.noreply.github.com> Co-authored-by: yueshen2016 <39203804+yueshen2016@users.noreply.github.com> Co-authored-by: joe <222375587+joe-nv@users.noreply.github.com> Co-authored-by: Ajinkya Rasane <131806219+ajrasane@users.noreply.github.com> Co-authored-by: Colin McDonough <cmcdonough@50words.com> Co-authored-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com> Co-authored-by: mxinO <164952785+mxinO@users.noreply.github.com> Co-authored-by: Gwena Cunha <4861122+gcunhase@users.noreply.github.com> Co-authored-by: Chad Voegele <chadvoegele@users.noreply.github.com>
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.
What does this PR do?
Type of change: Bug fix
The Qwen3-VL and Qwen3.5 FP8 vision recipes previously quantized vision-block Linears whose 3D attention inputs are flattened by vLLM's FlashInfer FP8 GEMM, causing vision encoder initialization to fail. Narrow the shared visual quantizer rules to primary and deepstack merger Linears, whose inputs are 2D. Update both recipe descriptions, the recipe guide, the 0.48.0 changelog entry, and the quantizer-selection and checkpoint-export tests. This changes existing recipe output: vision blocks now remain in high precision and affected checkpoints must be regenerated.
Usage
Testing
/health, and answered an image prompt correctly.Before your PR is "Ready for review"
Make sure you read and follow Contributor guidelines and your commits are signed (
git commit -s -S).Make sure you read and follow the Security Best Practices (e.g. avoiding hardcoded
trust_remote_code=True,torch.load(..., weights_only=False),pickle, etc.).CONTRIBUTING.md: N/AAdditional Information
This avoids the failing 3D FP8 path by reducing vision quantization coverage. It does not change vLLM's FP8 kernel or repair already exported checkpoints. End-to-end serving used four calibration images; a full-size calibration run with the changed recipe was not repeated.
Summary by CodeRabbit