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
8e726b3f
Commit
8e726b3f
authored
Mar 13, 2026
by
wujl5
Browse files
fix: 修复MOE量化tensor对于其他模型的影响
parent
8001970c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+14
-6
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
8e726b3f
...
...
@@ -1721,11 +1721,16 @@ class FusedMoE(CustomOp):
hidden_states
,
router_logits
)
else
:
if
envs
.
USE_FUSED_RMS_QUANT
:
shared_output
,
fused_output
=
torch
.
ops
.
vllm
.
moe_forward_shared
(
hidden_states
,
router_logits
,
encode_layer_name
(),
i_q
=
i_q
,
i_s
=
i_s
)
else
:
shared_output
,
fused_output
=
torch
.
ops
.
vllm
.
moe_forward_shared
(
hidden_states
,
router_logits
,
encode_layer_name
()
)
return
(
reduce_output
(
shared_output
)[...,
:
og_hidden_states
],
reduce_output
(
fused_output
)[...,
:
og_hidden_states
],
...
...
@@ -1976,7 +1981,10 @@ class FusedMoE(CustomOp):
# because matrix multiply maybe modify the hidden_states.
if
has_separate_shared_experts
and
not
use_shared_experts_stream
:
assert
self
.
shared_experts
is
not
None
if
envs
.
USE_FUSED_RMS_QUANT
:
shared_output
=
self
.
shared_experts
(
hidden_states
,
iqis
=
(
i_q
,
i_s
))
else
:
shared_output
=
self
.
shared_experts
(
hidden_states
)
# NOTE: Similar with DP, PCP also needs dispatch and combine. For
# simplicity, AgRsAll2All was added separately for PCP here. Maybe
...
...
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