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
beae085a
Commit
beae085a
authored
Mar 24, 2026
by
yangql
Browse files
处理VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD导致的awq推理bug问题
parent
06185134
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
14 deletions
+11
-14
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+10
-14
vllm/model_executor/layers/quantization/moe_wna16.py
vllm/model_executor/layers/quantization/moe_wna16.py
+1
-0
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
beae085a
...
...
@@ -2073,27 +2073,23 @@ class FusedMoE(CustomOp):
else
1.0
),
)
el
s
e
:
el
if
envs
.
VLLM_USE_LIGHTOP_MOE_SUM_MUL_ADD
and
shared_output
is
not
Non
e
:
final_hidden_states
=
self
.
quant_method
.
apply
(
layer
=
self
,
x
=
x
,
# The type signture of this is wrong due to the hack.
topk_weights
=
topk_weights
,
topk_ids
=
topk_ids
,
use_nn_moe
=
self
.
use_nn_moe
,
shared_output
=
(
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
),
shared_output
=
shared_output
,
routed_scaling_factor
=
routed_scaling_factor
,
)
else
:
final_hidden_states
=
self
.
quant_method
.
apply
(
layer
=
self
,
x
=
x
,
# The type signture of this is wrong due to the hack.
topk_weights
=
topk_weights
,
topk_ids
=
topk_ids
,
use_nn_moe
=
self
.
use_nn_moe
,)
if
has_separate_shared_experts
:
assert
self
.
shared_experts
is
not
None
...
...
vllm/model_executor/layers/quantization/moe_wna16.py
View file @
beae085a
...
...
@@ -381,6 +381,7 @@ class MoeWNA16Method(FusedMoEMethodBase):
topk_ids
:
torch
.
Tensor
,
use_nn_moe
:
bool
|
None
=
False
,
use_fused_gate
:
bool
|
None
=
False
,
**
_
)
->
torch
.
Tensor
|
tuple
[
torch
.
Tensor
,
torch
.
Tensor
]:
from
vllm.model_executor.layers.fused_moe
import
fused_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