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, 01:45 UTC
[Bug] Fix DeepEP low latency `assert self.batched_router_logits.size(-1) == full_router_logits.size(-1)` Bug (#27682)
Signed-off-by: yewentao256 <zhyanwentao@126.com>
Wentao Ye committed
Oct 29, 2025 at 14:50 UTC
fcb1d570bb8f95f5b7ded716a52fec902c535f0e
1 file changed
+3
-3
vllm/model_executor/layers/fused_moe/layer.py
+3
-3
@@ -1135,6 +1135,7 @@ class FusedMoE(CustomOp):
1135
)
1136
1137
self.global_num_experts = num_experts + num_redundant_experts
1138
+ self.logical_num_experts = num_experts
1139
self.zero_expert_num = zero_expert_num
1140
self.zero_expert_type = zero_expert_type
1141
@@ -1998,13 +1999,12 @@ class FusedMoE(CustomOp):
1999
2000
moe = self.moe_config
2001
2001
- # Note here we use `num_experts` which is logical expert count
2002
if self.vllm_config.parallel_config.enable_dbo:
2003
states_shape = (2, moe.max_num_tokens, self.hidden_size)
2004
- logits_shape = (2, moe.max_num_tokens, moe.num_experts)
2004
+ logits_shape = (2, moe.max_num_tokens, self.logical_num_experts)
2005
else:
2006
states_shape = (moe.max_num_tokens, self.hidden_size)
2007
- logits_shape = (moe.max_num_tokens, moe.num_experts)
2007
+ logits_shape = (moe.max_num_tokens, self.logical_num_experts)
2008
2009
self.batched_hidden_states = torch.zeros(
2010
states_shape, dtype=moe.in_dtype, device=torch.cuda.current_device()