Skip to content

Commit

Permalink
guard
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac committed Jun 27, 2024
1 parent c3dde36 commit 3dbc77a
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 @@ -392,6 +392,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 3dbc77a

Please sign in to comment.