Skip to content

Conversation

hiyouga
Copy link
Contributor

@hiyouga hiyouga commented Mar 16, 2025

This PR fixes the vllm's offline inference when using torchrun as the external launcher in veRL broken after #13591

When we launch vllm using torchrun with tp = 2 on 8 GPUs, the layout of the distributed world should be (DP = 4 * PP = 1 * TP = 2). However, we find setting VLLM_DP_SIZE to 4 causes the process to hang after generation. So, we use the parallel_config to determine how to compute the dp size. (actually we don't know why, maybe #13591 is not fully compatible with external launchers)

This modification is also the same as https://verl.readthedocs.io/en/latest/README_vllm0.7.html#use-vllm-v1-engine described

Regarding the get_pp_indices function, we take the modulus of the pp rank by the pp size to ensure that the pp rank is always smaller than the pp size.

This PR has been validated using the latest veRL on the GSM8K task.

image

I'm a newbie in vLLM. Please feel free to let me know if there are any problems.

cc @youkaichao

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.

🚀

@simon-mo simon-mo modified the milestone: v0.8.0 Mar 17, 2025
Signed-off-by: youkaichao <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Copy link
Member

@youkaichao youkaichao left a comment

Choose a reason for hiding this comment

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

thanks for the investigation!

@youkaichao youkaichao enabled auto-merge (squash) March 18, 2025 11:07
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Mar 18, 2025
@vllm-bot vllm-bot merged commit 4149191 into vllm-project:main Mar 18, 2025
43 of 46 checks passed
@simon-mo simon-mo added this to the v0.8.0 milestone Mar 18, 2025
simon-mo pushed a commit that referenced this pull request Mar 18, 2025
Signed-off-by: hiyouga <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Co-authored-by: youkaichao <[email protected]>
lulmer pushed a commit to lulmer/vllm that referenced this pull request Apr 7, 2025
Signed-off-by: hiyouga <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Co-authored-by: youkaichao <[email protected]>
Signed-off-by: Louis Ulmer <[email protected]>
shreyankg pushed a commit to shreyankg/vllm that referenced this pull request May 3, 2025
Signed-off-by: hiyouga <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Co-authored-by: youkaichao <[email protected]>
RichardoMrMu pushed a commit to RichardoMrMu/vllm that referenced this pull request May 12, 2025
Signed-off-by: hiyouga <[email protected]>
Signed-off-by: youkaichao <[email protected]>
Co-authored-by: youkaichao <[email protected]>
Signed-off-by: Mu Huai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants