@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 2dff2e21d9
Fork 0

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 14, 22:35 UTC

[Bugfix] Fix MTP weight loading (#21941)

Benjamin Chislett committed Jul 31, 2025 at 16:33 UTC 2dff2e21d928129e985b23897e9f326abe3f1417
1 file changed +9
vllm/model_executor/models/deepseek_mtp.py
+9
@@ -182,6 +182,8 @@ class DeepSeekMTP(nn.Module, SupportsPP):
182 stacked_params_mapping = [
183 ("gate_up_proj", "gate_proj", 0),
184 ("gate_up_proj", "up_proj", 1),
185 + ("fused_qkv_a_proj", "q_a_proj", 0),
186 + ("fused_qkv_a_proj", "kv_a_proj_with_mqa", 1),
187 ]
188
189 expert_params_mapping = FusedMoE.make_expert_params_mapping(
@@ -212,6 +214,13 @@ class DeepSeekMTP(nn.Module, SupportsPP):
214 if (("mlp.experts." in name) and name not in params_dict):
215 continue
216 name = name.replace(weight_name, param_name)
217 +
218 + # QKV fusion is optional, fall back to normal
219 + # weight loading if it's not enabled
220 + if ((param_name == "fused_qkv_a_proj")
221 + and name not in params_dict):
222 + continue
223 +
224 # Skip loading extra bias for GPTQ models.
225 if name.endswith(".bias") and name not in params_dict:
226 continue