A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 6, 05:45 UTC
Enable `NemotronHPuzzle` + `NemotronHMTP` (#37803)
Netanel Haber committed
Mar 22, 2026 at 17:13 UTC
e74c17e153311460fb195ad58fe98fd31300d803
2 files changed
+6
-3
vllm/config/speculative.py
+1
-1
@@ -280,7 +280,7 @@ class SpeculativeConfig:
280
)
281
282
if (
283
- hf_config.model_type == "nemotron_h"
283
+ hf_config.model_type in {"nemotron_h", "nemotron_h_puzzle"}
284
and hasattr(hf_config, "num_nextn_predict_layers")
285
and hf_config.num_nextn_predict_layers > 0
286
):
vllm/model_executor/models/nemotron_h_mtp.py
+5
-2
@@ -395,13 +395,16 @@ class NemotronHMTP(nn.Module, SupportsPP):
395
]
396
397
expert_params_mapping = []
398
- if hasattr(self.config, "n_routed_experts") and self.config.n_routed_experts:
398
+ num_experts = getattr(self.config, "n_routed_experts", None)
399
+ if getattr(self.config, "model_type", None) == "nemotron_h_puzzle":
400
+ num_experts = self.config.mtp_n_routed_experts
401
+ if num_experts is not None:
402
expert_params_mapping = FusedMoE.make_expert_params_mapping(
403
self,
404
ckpt_gate_proj_name="up_proj",
405
ckpt_down_proj_name="down_proj",
406
ckpt_up_proj_name="", # Empty - non-gated MoE
404
- num_experts=self.config.n_routed_experts,
407
+ num_experts=num_experts,
408
num_redundant_experts=self.num_redundant_experts,
409
)
410