Skip to content

Conversation

ruisearch42
Copy link
Collaborator

@ruisearch42 ruisearch42 commented May 27, 2025

This PR adds support for DP with Ray, with support for multi-node and API server scale out.

We reuse ZMQ communication mechanism between frontend and engine cores, as in #15977 , and the same API server scale out mechanism, as in #17546

Main differences from those PRs:

  • The handshake between frontend and engine cores are greatly simplified, thanks to the Ray API
  • We can launch all DP ranks just on the head node

Examples

This will run DP=4 on the head node.

# Head node  (with ip address 10.99.48.128)
vllm serve $MODEL --data-parallel-size 4 --data-parallel-size-local 4 \
                  --data-parallel-address 10.99.48.128 --data-parallel-rpc-port 13345
                  --data-parallel-backend ray

This will run DP=4 with DP ranks 0 and 1 on the head node and ranks 2 and 3 on other nodes.

# Head node  (with ip address 10.99.48.128)
vllm serve $MODEL --data-parallel-size 4 --data-parallel-size-local 2 \
                  --data-parallel-address 10.99.48.128 --data-parallel-rpc-port 13345
                  --data-parallel-backend ray

This will run DP=4 with only the API server on the head node and all engines other nodes:

# Head node  (with ip address 10.99.48.128)
vllm serve $MODEL --data-parallel-size 4 --data-parallel-size-local 0 \
                  --data-parallel-address 10.99.48.128 --data-parallel-rpc-port 13345
                  --data-parallel-backend ray

Design

See the following illustration. DP Coordinator is omitted, but is the same as #17546 .

image

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link
Collaborator

@kouroshHakha kouroshHakha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good. There are some comments that need to be addressed and some follow ups that are not blockers.

Copy link

mergify bot commented May 28, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @ruisearch42.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label May 28, 2025
@ruisearch42 ruisearch42 force-pushed the ray_dp_rebase3 branch 3 times, most recently from 4d6f14a to c2978bc Compare May 30, 2025 17:09
@mergify mergify bot removed the needs-rebase label May 30, 2025
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ruisearch42 this looks pretty clean

ruisearch42 and others added 7 commits May 30, 2025 23:30
Signed-off-by: Rui Qiao <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Co-authored-by: Nick Hill <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
Signed-off-by: Rui Qiao <[email protected]>
@ruisearch42 ruisearch42 added the ready ONLY add when PR is ready to merge/full CI is needed label May 31, 2025
Signed-off-by: Rui Qiao <[email protected]>
@mergify mergify bot added the ci/build label May 31, 2025
Copy link

mergify bot commented May 31, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @ruisearch42.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify bot added the needs-rebase label May 31, 2025
@mergify mergify bot removed the needs-rebase label May 31, 2025
Copy link
Member

@njhill njhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ruisearch42

Curious why all of the new test dependencies, I thought various other tests already used ray.

@ruisearch42
Copy link
Collaborator Author

Curious why all of the new test dependencies, I thought various other tests already used ray.

list_nodes() is part of Ray state API, and requires ray[default].

@simon-mo simon-mo merged commit bdce64f into vllm-project:main Jun 3, 2025
91 of 93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build frontend ready ONLY add when PR is ready to merge/full CI is needed v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants