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 13, 02:00 UTC
[BugFix] Fix glm4_moe_mtp load weights bug (#28805)
Signed-off-by: wuyaoxuehun <798143193@qq.com>
wuyaoxuehun committed
Nov 17, 2025 at 16:13 UTC
ab01cd14e5e2ef65549b459d0a2bf3a2540c9f3f
1 file changed
+3
-4
vllm/model_executor/models/glm4_moe_mtp.py
+3
-4
@@ -256,13 +256,12 @@ class Glm4MoeMTP(nn.Module, SupportsPP, Glm4MixtureOfExperts):
256
257
params_dict = dict(self.named_parameters())
258
loaded_params: set[str] = set()
259
- spec_layer = self.model.mtp_start_layer_idx
259
for name, loaded_weight in weights:
260
if name == "lm_head.weight":
262
- name = f"model.layers.{spec_layer}.shard_head.head.weight"
261
+ spec_layer = self.model.mtp_start_layer_idx
262
+ name = f"model.layers.{spec_layer}.shared_head.head.weight"
263
elif name == "model.embed_tokens.weight":
264
- # This name is same with local model, rewriting is not needed.
265
- pass
264
+ spec_layer = self.model.mtp_start_layer_idx
265
else:
266
spec_layer = get_spec_layer_idx_from_weight_name(self.config, name)
267
if spec_layer is None: