Repository navigation
Leave MTP layers unquantized at any depth in the default PTQ exclusions - #2911
Merged
Merged
Conversation
The default exclusions matched only a root-level mtp.* block, so Megatron vision-language models (language_model.mtp.*) had their MTP layers quantized by the general recipes, and the vLLM fake-quant export then refused the checkpoint. Match *mtp.* instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Keval Morabia <28916987+kevalmorabia97@users.noreply.github.com>
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2911 +/- ##
==========================================
+ Coverage 70.08% 78.82% +8.74%
==========================================
Files 659 659
Lines 74081 74081
==========================================
+ Hits 51917 58392 +6475
+ Misses 22164 15689 -6475
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:
|
cjluo-nv
approved these changes
Oct 21, 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.
Approve: the shared exclusion now matches root and nested MTP layers, and the regression test verifies decoder quantization remains enabled.
No action needed.
Contributor
|
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 default PTQ exclusions (
configs/ptq/units/default_disabled_quantizers, imported by thegeneral/ptq/*recipes andmtq.*_CFGpresets) disable multi-token-prediction layers withmtp.*, which only matches an MTP block at the model root (HF checkpoints, Megatron LLMs). Megatron vision-language models nest it under the language model (language_model.mtp.layers.0...), so their MTP layers were quantized. For Qwen3.5/3.6 VLMs quantized withexamples/megatron_bridge/quantize.pyand a general recipe,export_quantized_megatron_to_hf.py --vllm_fakequant_exportthen refuses the checkpoint ("MTP quantization is not supported by vLLM fakequant export/reload"). The pattern is now*mtp.*, matching the model-specific recipes that already use*mtp*.Models whose MTP block was nested and previously quantized by a general recipe now keep it in BF16, which is what the exclusion intends. Recipes that quantize MTP on purpose (e.g. the Nemotron 3.5 Super ones) do not import this unit after their MTP entries, so they are unaffected.
Usage
No API change.
Testing
tests/unit/recipe/test_presets.py::test_default_exclusions_disable_mtp_at_any_depth: withgeneral/ptq/fp8_default-kv_fp8, MTP quantizers at the root and underlanguage_model.are disabled and decoder quantizers stay enabled; fails without the change.tests/unit/recipe: 492 passed.nvfp4_default-kv_fp8checkpoint was refused onlanguage_model.mtp.layers.0.eh_proj.input_quantizer.Before your PR is "Ready for review"
CONTRIBUTING.md: N/AAdditional Information
Related to #2889 (vLLM fake-quant export through Megatron-Bridge).
🤖 Generated with Claude Code
Summary by CodeRabbit
Bug Fixes
Documentation