[Bugfix][MoE] Filter packed expert weights during EP loading (#49558)
Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com> Signed-off-by: aoshen02 <aoshen@inferact.ai> Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>
aoshen02 committed
Aug 5, 2026 at 00:32 UTC
7153fd70f6128c85b0f670f082634174c9b38e2e
2 files changed
+16
-1
tests/model_executor/model_loader/test_ep_weight_filter.py
+15
@@ -185,6 +185,21 @@ class TestShouldSkipWeight:
185
"model.layers.0.mlp.experts.200.gate_proj.weight", self.local_ids
186
)
187
188
+ def test_local_packed_expert_not_skipped(self):
189
+ assert not should_skip_weight(
190
+ "model.layers.0.mlp.experts.10.gate_proj.weight_packed", self.local_ids
191
+ )
192
+
193
+ def test_remote_packed_expert_skipped(self):
194
+ assert should_skip_weight(
195
+ "model.layers.0.mlp.experts.200.gate_proj.weight_packed", self.local_ids
196
+ )
197
+
198
+ def test_remote_expert_scale_not_skipped(self):
199
+ assert not should_skip_weight(
200
+ "model.layers.0.mlp.experts.200.gate_proj.weight_scale", self.local_ids
201
+ )
202
+
203
def test_boundary_expert(self):
204
# Expert 47 is local (last one), 48 is not
205
assert not should_skip_weight(
vllm/model_executor/model_loader/ep_weight_filter.py
+1
-1
@@ -76,6 +76,6 @@ def should_skip_weight(
76
# Only skip heavy weight tensors, never scale/metadata tensors.
77
# Scale tensors are tiny and some backends need them from ALL experts
78
# (e.g. FlashInfer NVFP4 computes a global max of activation scales).
79
- if not weight_name.endswith(".weight"):
79
+ if not weight_name.endswith((".weight", ".weight_packed")):
80
return False
81
return eid not in local_expert_ids