Skip to content

Commit

Permalink
[Kernel] Raise an exception in MoE kernel if the batch size is larger…
Browse files Browse the repository at this point in the history
… then 65k (vllm-project#5939)
  • Loading branch information
comaniac authored and llmpros committed Jun 30, 2024
1 parent b2805d7 commit e730666
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vllm/model_executor/layers/fused_moe/fused_moe.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,11 @@ def fused_experts(hidden_states: torch.Tensor,
M, _ = hidden_states.shape
E, N, _ = w1.shape

if M > 65536:
# https://github.com/vllm-project/vllm/issues/5938
raise ValueError("MoE kernel does not support more than 65536 tokens, "
f"but got {M}")

if override_config:
config = override_config
else:
Expand Down

0 comments on commit e730666

Please sign in to comment.