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
f5dfa075
Unverified
Commit
f5dfa075
authored
Jun 30, 2025
by
noiji
Committed by
GitHub
Jun 30, 2025
Browse files
[Bugfix] Skip loading extra parameters for modelopt Qwen3 MoE model (#19598)
Signed-off-by: noiji <>
parent
022c58b8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
vllm/model_executor/models/qwen3_moe.py
vllm/model_executor/models/qwen3_moe.py
+15
-9
No files found.
vllm/model_executor/models/qwen3_moe.py
View file @
f5dfa075
...
...
@@ -386,6 +386,11 @@ class Qwen3MoeModel(nn.Module):
(
"gate_up_proj"
,
"up_proj"
,
1
),
]
# Skip loading extra parameters for GPTQ/modelopt models.
ignore_suffixes
=
(
".bias"
,
"_bias"
,
".k_scale"
,
"_k_scale"
,
".v_scale"
,
"_v_scale"
,
".weight_scale"
,
"_weight_scale"
,
".input_scale"
,
"_input_scale"
)
# Params for weights, fp8 weight scales, fp8 activation scales
# (param_name, weight_name, expert_id, shard_id)
expert_params_mapping
=
FusedMoE
.
make_expert_params_mapping
(
...
...
@@ -410,10 +415,11 @@ class Qwen3MoeModel(nn.Module):
if
"mlp.experts"
in
name
:
continue
name
=
name
.
replace
(
weight_name
,
param_name
)
# Skip loading extra bias for GPTQ models.
if
((
name
.
endswith
(
".bias"
)
or
name
.
endswith
(
"_bias"
))
and
name
not
in
params_dict
)
:
# Skip loading extra parameters for GPTQ/modelopt models.
if
name
.
endswith
(
ignore_suffixes
)
and
name
not
in
params_dict
:
continue
# Skip layers on other devices.
if
is_pp_missing_parameter
(
name
,
self
):
continue
...
...
@@ -433,9 +439,9 @@ class Qwen3MoeModel(nn.Module):
# Skip layers on other devices.
if
is_pp_missing_parameter
(
name
,
self
):
continue
# Skip loading extra
bia
s for GPTQ models.
if
((
name
.
endswith
(
".bias"
)
or
name
.
endswith
(
"_bias"
))
and
name
not
in
params_dict
)
:
# Skip loading extra
parameter
s for GPTQ
/modelopt
models.
if
name
.
endswith
(
ignore_suffixes
)
and
name
not
in
params_dict
:
continue
param
=
params_dict
[
name
]
weight_loader
=
param
.
weight_loader
...
...
@@ -446,9 +452,9 @@ class Qwen3MoeModel(nn.Module):
expert_id
=
expert_id
)
break
else
:
# Skip loading extra
bia
s for GPTQ models.
if
((
name
.
endswith
(
".bias"
)
or
name
.
endswith
(
"_bias"
))
and
name
not
in
params_dict
)
:
# Skip loading extra
parameter
s for GPTQ
/modelopt
models.
if
name
.
endswith
(
ignore_suffixes
)
and
name
not
in
params_dict
:
continue
# Skip layers on other devices.
if
is_pp_missing_parameter
(
name
,
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