[Bugfix] NemotronHMTP: add hf_to_vllm_mapper so quant exclusions reach the MTP draft (#53790)
Signed-off-by: Juhi Mittal <juhim@nvidia.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Juhi Mittal committed
Aug 31, 2026 at 12:10 UTC
85c1365bd9711bde5484a3de7d7b2eaa44a03868
1 file changed
+11
vllm/model_executor/models/nemotron_h_mtp.py
+11
@@ -24,6 +24,7 @@ from vllm.model_executor.layers.vocab_parallel_embedding import (
24
)
25
from vllm.model_executor.model_loader.weight_utils import default_weight_loader
26
from vllm.model_executor.models.utils import (
27
+ WeightsMapper,
28
make_empty_intermediate_tensors_factory,
29
maybe_prefix,
30
)
@@ -312,6 +313,16 @@ class NemotronHMultiTokenPredictor(nn.Module):
313
class NemotronHMTP(nn.Module, SupportsPP):
314
"""NemotronH MTP model."""
315
316
+ # Quant configs name modules in checkpoint space ("language_model.mtp.layers.0*"),
317
+ # but this draft is built under "mtp" (maybe_prefix below). SupportsQuant only
318
+ # re-roots exclude_modules when the model defines a mapper, so without one the
319
+ # exclusions never match and the MTP experts are wrongly quantized. Mirrors the
320
+ # prefix handling load_weights() already does by hand.
321
+ hf_to_vllm_mapper = WeightsMapper(
322
+ orig_to_new_prefix={"language_model.": ""},
323
+ orig_to_new_substr={"embeddings": "embed_tokens"},
324
+ )
325
+
326
packed_modules_mapping = {
327
"qkv_proj": [
328
"q_proj",