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, 05:30 UTC
[Bugfix] Fix Qwen3-VL-MoE weight loading for EP (#25300)
Signed-off-by: Roger Wang <hey@rogerw.io>
Roger Wang committed
Sep 20, 2025 at 00:04 UTC
be874c020196080305baf988ed8c1c82047323be
1 file changed
+7
-5
vllm/model_executor/models/qwen3_vl_moe.py
+7
-5
@@ -122,9 +122,10 @@ class Qwen3MoeLLMModel(Qwen3MoeModel):
122
123
def load_fused_expert_weights(self, name: str, params_dict: dict,
124
loaded_weight: torch.Tensor, shard_id: str,
125
- num_experts: int):
125
+ num_experts: int) -> bool:
126
param = params_dict[name]
127
weight_loader = typing.cast(Callable[..., bool], param.weight_loader)
128
+ loaded_local_expert = False
129
for expert_id in range(num_experts):
130
curr_expert_weight = loaded_weight[expert_id]
131
success = weight_loader(param,
@@ -133,9 +134,10 @@ class Qwen3MoeLLMModel(Qwen3MoeModel):
134
shard_id,
135
expert_id,
136
return_success=True)
136
- if not success:
137
- return False
138
- return True
137
+ if success:
138
+ loaded_local_expert = True
139
+
140
+ return loaded_local_expert
141
142
def load_weights(self, weights: Iterable[tuple[str,
143
torch.Tensor]]) -> set[str]:
@@ -345,4 +347,4 @@ class Qwen3VLMoeForConditionalGeneration(Qwen3VLForConditionalGeneration):
347
for _ in range(self.deepstack_num_level)
348
] if self.use_deepstack else None
349
self.visual_dim = config.vision_config.out_hidden_size
348
- self.multiscale_dim = self.visual_dim * self.deepstack_num_level
\ No newline at end of file
350
+ self.multiscale_dim = self.visual_dim * self.deepstack_num_level