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
839dc88e
Commit
839dc88e
authored
Mar 20, 2026
by
laibao
Browse files
fix(moe): 仅在 fused moe_sum+mul+add 开启时透传 shared_output
parent
eb933fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+24
-4
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
839dc88e
...
@@ -2060,8 +2060,18 @@ class FusedMoE(CustomOp):
...
@@ -2060,8 +2060,18 @@ class FusedMoE(CustomOp):
use_nn_moe
=
self
.
use_nn_moe
,
use_nn_moe
=
self
.
use_nn_moe
,
i_q
=
i_q
,
i_q
=
i_q
,
i_s
=
i_s
,
i_s
=
i_s
,
shared_output
=
shared_output
,
shared_output
=
(
routed_scaling_factor
=
routed_scaling_factor
,
shared_output
if
envs
.
VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD
and
shared_output
is
not
None
else
None
),
routed_scaling_factor
=
(
routed_scaling_factor
if
envs
.
VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD
and
shared_output
is
not
None
else
1.0
),
)
)
else
:
else
:
final_hidden_states
=
self
.
quant_method
.
apply
(
final_hidden_states
=
self
.
quant_method
.
apply
(
...
@@ -2070,8 +2080,18 @@ class FusedMoE(CustomOp):
...
@@ -2070,8 +2080,18 @@ class FusedMoE(CustomOp):
topk_weights
=
topk_weights
,
topk_weights
=
topk_weights
,
topk_ids
=
topk_ids
,
topk_ids
=
topk_ids
,
use_nn_moe
=
self
.
use_nn_moe
,
use_nn_moe
=
self
.
use_nn_moe
,
shared_output
=
shared_output
,
shared_output
=
(
routed_scaling_factor
=
routed_scaling_factor
,
shared_output
if
envs
.
VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD
and
shared_output
is
not
None
else
None
),
routed_scaling_factor
=
(
routed_scaling_factor
if
envs
.
VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD
and
shared_output
is
not
None
else
1.0
),
)
)
if
has_separate_shared_experts
:
if
has_separate_shared_experts
:
...
...
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