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
3f9af065
Commit
3f9af065
authored
May 15, 2025
by
zhuwenwen
Browse files
fix qwen3-235b run error and remove update_environment_variables of hip
parent
3c318dbe
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
vllm/executor/mp_distributed_executor.py
vllm/executor/mp_distributed_executor.py
+0
-3
vllm/model_executor/model_loader/utils.py
vllm/model_executor/model_loader/utils.py
+2
-1
vllm/model_executor/models/qwen3_moe.py
vllm/model_executor/models/qwen3_moe.py
+4
-1
vllm/utils.py
vllm/utils.py
+1
-1
No files found.
vllm/executor/mp_distributed_executor.py
View file @
3f9af065
...
...
@@ -52,9 +52,6 @@ class MultiprocessingDistributedExecutor(DistributedExecutorBase):
update_environment_variables
({
"CUDA_VISIBLE_DEVICES"
:
(
","
.
join
(
map
(
str
,
range
(
world_size
))))
})
update_environment_variables
({
"HIP_VISIBLE_DEVICES"
:
(
","
.
join
(
map
(
str
,
range
(
world_size
))))
})
def
_init_executor
(
self
)
->
None
:
...
...
vllm/model_executor/model_loader/utils.py
View file @
3f9af065
...
...
@@ -89,7 +89,8 @@ def get_model_architecture(
model_config
:
ModelConfig
)
->
Tuple
[
Type
[
nn
.
Module
],
str
]:
architectures
=
getattr
(
model_config
.
hf_config
,
"architectures"
,
[])
visions
=
getattr
(
model_config
.
hf_config
,
"visual"
,
[])
or
getattr
(
model_config
.
hf_config
,
"vision_config"
,
[])
support_nn_architectures
=
[
'LlamaForCausalLM'
,
'QWenLMHeadModel'
,
'Qwen2ForCausalLM'
,
'Qwen2VLForConditionalGeneration'
,
'Qwen2_5_VLForConditionalGeneration'
,
'Qwen2MoeForCausalLM'
,
'Qwen3ForCausalLM'
,
'Qwen3MoeForCausalLM'
,
# TODO: 'Qwen2_5_VLForConditionalGeneration',
support_nn_architectures
=
[
'LlamaForCausalLM'
,
'QWenLMHeadModel'
,
'Qwen2ForCausalLM'
,
'Qwen2VLForConditionalGeneration'
,
'Qwen2MoeForCausalLM'
,
'Qwen3ForCausalLM'
,
'Qwen3MoeForCausalLM'
,
'ChatGLMModel'
,
'Glm4ForCausalLM'
,
'ChatGLMForConditionalGeneration'
,
'BaichuanForCausalLM'
,
'BloomForCausalLM'
,
'TeleChat2ForCausalLM'
,
'MixtralForCausalLM'
,
'FalconForCausalLM'
,
'MedusaModel'
,
'MLPSpeculatorPreTrainedModel'
,
'DeepseekV2ForCausalLM'
,
'DeepseekV3ForCausalLM'
,
'DeepSeekMTPModel'
]
if
any
(
arch
in
architectures
for
arch
in
support_nn_architectures
):
...
...
vllm/model_executor/models/qwen3_moe.py
View file @
3f9af065
...
...
@@ -414,6 +414,9 @@ class Qwen3MoeModel(nn.Module):
params_dict
=
dict
(
self
.
named_parameters
())
loaded_params
:
Set
[
str
]
=
set
()
for
name
,
loaded_weight
in
weights
:
if
self
.
use_llama_nn
:
current_count
=
loaded_weight
.
current_count
total_count
=
loaded_weight
.
total_count
for
(
param_name
,
weight_name
,
shard_id
)
in
stacked_params_mapping
:
# Skip non-stacked layers and experts (experts handled below).
if
weight_name
not
in
name
:
...
...
@@ -490,7 +493,7 @@ class Qwen3MoeModel(nn.Module):
weight_loader
(
param
,
loaded_weight
)
loaded_params
.
add
(
name
)
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
:
if
self
.
use_llama_nn
and
self
.
quant_method
is
None
and
current_count
==
total_count
:
lay_key_words
=
[
"gate_up_proj.weight"
,
"down_proj.weight"
,
...
...
vllm/utils.py
View file @
3f9af065
...
...
@@ -690,7 +690,7 @@ def update_environment_variables(envs: dict[str, str]):
logger
.
warning
(
"Overwriting environment variable %s "
"from '%s' to '%s'"
,
k
,
os
.
environ
[
k
],
v
)
#
os.environ[k] = v
os
.
environ
[
k
]
=
v
def
chunk_list
(
lst
:
list
[
T
],
chunk_size
:
int
):
...
...
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