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
77a6bf07
Unverified
Commit
77a6bf07
authored
Aug 13, 2025
by
Wentao Ye
Committed by
GitHub
Aug 12, 2025
Browse files
[Bug] Fix Unexpected Keyword Argument 'w1_bias' (#22757)
Signed-off-by:
yewentao256
<
zhyanwentao@126.com
>
parent
4082338a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
vllm/model_executor/layers/fused_moe/layer.py
vllm/model_executor/layers/fused_moe/layer.py
+13
-3
No files found.
vllm/model_executor/layers/fused_moe/layer.py
View file @
77a6bf07
...
@@ -475,12 +475,11 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
...
@@ -475,12 +475,11 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
activation
=
activation
,
activation
=
activation
,
apply_router_weight_on_input
=
apply_router_weight_on_input
)
apply_router_weight_on_input
=
apply_router_weight_on_input
)
else
:
else
:
return
self
.
fused_experts
(
# add w1_bias/w2_bias to kwargs if they exist
kwargs
=
dict
(
hidden_states
=
x
,
hidden_states
=
x
,
w1
=
layer
.
w13_weight
,
w1
=
layer
.
w13_weight
,
w2
=
layer
.
w2_weight
,
w2
=
layer
.
w2_weight
,
w1_bias
=
layer
.
w13_bias
if
self
.
has_bias
else
None
,
w2_bias
=
layer
.
w2_bias
if
self
.
has_bias
else
None
,
topk_weights
=
topk_weights
,
topk_weights
=
topk_weights
,
topk_ids
=
topk_ids
,
topk_ids
=
topk_ids
,
inplace
=
True
,
inplace
=
True
,
...
@@ -489,6 +488,17 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
...
@@ -489,6 +488,17 @@ class UnquantizedFusedMoEMethod(FusedMoEMethodBase, CustomOp):
global_num_experts
=
global_num_experts
,
global_num_experts
=
global_num_experts
,
expert_map
=
expert_map
,
expert_map
=
expert_map
,
)
)
if
isinstance
(
self
.
fused_experts
,
FusedMoEModularKernel
)
and
self
.
has_bias
:
raise
ValueError
(
"FusedMoEModularKernel does not support bias."
)
if
self
.
has_bias
:
kwargs
.
update
({
"w1_bias"
:
getattr
(
layer
,
"w13_bias"
,
None
),
"w2_bias"
:
getattr
(
layer
,
"w2_bias"
,
None
),
})
return
self
.
fused_experts
(
**
kwargs
)
def
forward_cpu
(
def
forward_cpu
(
self
,
self
,
...
...
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