Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion vllm/model_executor/layers/fused_moe/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2066,7 +2066,7 @@ def select_experts(
)

# DeepSeekv2 uses grouped_top_k
if use_grouped_topk:
elif use_grouped_topk:
assert topk_group is not None
assert num_expert_group is not None
if is_rocm_aiter_moe_enabled():
Expand Down
10 changes: 10 additions & 0 deletions vllm/model_executor/layers/fused_moe/routing_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

import torch

from vllm.logger import init_logger

logger = init_logger(__name__)


class RoutingStrategy(ABC):
"""Base class for token-to-expert routing strategies."""
Expand Down Expand Up @@ -290,6 +294,12 @@ def simulate_routing(
f"Available strategies: "
f"{list(RoutingSimulator._routing_strategies.keys())}"
)
logger.warning_once(
"Simulating MoE routing using a %s strategy. "
"This should only be used for performance testing. "
"Model outputs will not be valid.",
strategy_name,
)

strategy = RoutingSimulator._routing_strategies[strategy_name]
return strategy.route_tokens(
Expand Down