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
ad32e3e1
Unverified
Commit
ad32e3e1
authored
Dec 03, 2025
by
Xieyang Xu
Committed by
GitHub
Dec 03, 2025
Browse files
enable multi-node in external launcher mode (#29833)
parent
1109f982
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
vllm/config/parallel.py
vllm/config/parallel.py
+6
-2
vllm/distributed/parallel_state.py
vllm/distributed/parallel_state.py
+21
-18
No files found.
vllm/config/parallel.py
View file @
ad32e3e1
...
...
@@ -593,10 +593,14 @@ class ParallelConfig:
"max_parallel_loading_workers is currently "
"not supported and will be ignored."
)
if
self
.
distributed_executor_backend
not
in
(
"mp"
,
"uni"
)
and
self
.
nnodes
>
1
:
allowed_backends
=
(
"mp"
,
"uni"
,
"external_launcher"
)
if
(
self
.
distributed_executor_backend
not
in
allowed_backends
and
self
.
nnodes
>
1
):
raise
ValueError
(
"nnodes > 1 can only be set when distributed executor "
"backend is mp
or uni
."
"backend is mp
, uni or external_launcher
."
)
@
property
...
...
vllm/distributed/parallel_state.py
View file @
ad32e3e1
...
...
@@ -1169,17 +1169,13 @@ def init_distributed_environment(
from
vllm.config
import
get_current_vllm_config
config
=
get_current_vllm_config
()
if
config
is
not
None
and
config
.
parallel_config
.
nnodes
>
1
:
parallel_config
=
config
.
parallel_config
ip
=
parallel_config
.
master_addr
rank
=
parallel_config
.
data_parallel_rank
*
world_size
+
rank
world_size
=
parallel_config
.
world_size_across_dp
port
=
parallel_config
.
master_port
distributed_init_method
=
get_distributed_init_method
(
ip
,
port
)
elif
(
if
(
config
is
not
None
and
config
.
parallel_config
.
data_parallel_size
>
1
and
config
.
parallel_config
.
distributed_executor_backend
!=
"external_launcher"
and
(
config
.
parallel_config
.
nnodes
>
1
or
config
.
parallel_config
.
data_parallel_size
>
1
)
):
parallel_config
=
config
.
parallel_config
# adjust to take into account data parallelism
...
...
@@ -1187,6 +1183,13 @@ def init_distributed_environment(
rank
=
parallel_config
.
data_parallel_rank
*
world_size
+
rank
# adjust the world size to take into account data parallelism
world_size
=
parallel_config
.
world_size_across_dp
# Use appropriate IP and port based on configuration
if
parallel_config
.
nnodes
>
1
:
ip
=
parallel_config
.
master_addr
port
=
parallel_config
.
master_port
distributed_init_method
=
get_distributed_init_method
(
ip
,
port
)
else
:
ip
=
parallel_config
.
data_parallel_master_ip
port
=
parallel_config
.
get_next_dp_init_port
()
distributed_init_method
=
get_distributed_init_method
(
ip
,
port
)
...
...
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