Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
37587573
Unverified
Commit
37587573
authored
Nov 03, 2025
by
Tyler Michael Smith
Committed by
GitHub
Nov 03, 2025
Browse files
[Bugfix] Fix MoE Routing Simulation (#28002)
Signed-off-by:
Tyler Michael Smith
<
tlrmchlsmth@gmail.com
>
parent
ccd3e55e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+1
-1
vllm/model_executor/layers/fused_moe/routing_simulator.py
vllm/model_executor/layers/fused_moe/routing_simulator.py
+10
-0
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
37587573
...
@@ -2066,7 +2066,7 @@ class FusedMoE(CustomOp):
...
@@ -2066,7 +2066,7 @@ class FusedMoE(CustomOp):
)
)
# DeepSeekv2 uses grouped_top_k
# DeepSeekv2 uses grouped_top_k
if
use_grouped_topk
:
el
if
use_grouped_topk
:
assert
topk_group
is
not
None
assert
topk_group
is
not
None
assert
num_expert_group
is
not
None
assert
num_expert_group
is
not
None
if
is_rocm_aiter_moe_enabled
():
if
is_rocm_aiter_moe_enabled
():
...
...
vllm/model_executor/layers/fused_moe/routing_simulator.py
View file @
37587573
...
@@ -14,6 +14,10 @@ from typing import Any
...
@@ -14,6 +14,10 @@ from typing import Any
import
torch
import
torch
from
vllm.logger
import
init_logger
logger
=
init_logger
(
__name__
)
class
RoutingStrategy
(
ABC
):
class
RoutingStrategy
(
ABC
):
"""Base class for token-to-expert routing strategies."""
"""Base class for token-to-expert routing strategies."""
...
@@ -290,6 +294,12 @@ class RoutingSimulator:
...
@@ -290,6 +294,12 @@ class RoutingSimulator:
f
"Available strategies: "
f
"Available strategies: "
f
"
{
list
(
RoutingSimulator
.
_routing_strategies
.
keys
())
}
"
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
]
strategy
=
RoutingSimulator
.
_routing_strategies
[
strategy_name
]
return
strategy
.
route_tokens
(
return
strategy
.
route_tokens
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment