Skip to content

Fix vLLM server-mode communicator initialization to use the current A…#6417

Merged
kashif merged 1 commit into
huggingface:mainfrom
sywangyi:accel
Jul 22, 2026
Merged

Fix vLLM server-mode communicator initialization to use the current A…#6417
kashif merged 1 commit into
huggingface:mainfrom
sywangyi:accel

Conversation

@sywangyi

@sywangyi sywangyi commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

…ccelerator device instead of always querying CUDA.

What does this PR do?

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline, Pull Request section?
  • Was this discussed/approved via a GitHub issue? Please add a link to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

AI writing disclosure

We welcome the use of AI tools to help with contributions. For transparency and to help us improve our review process, please indicate the level of AI involvement in this PR.

  • No AI usage: the PR was written entirely by a human.
  • AI-assisted: some parts were suggested or improved by AI, but the PR was written and reviewed by a human.
  • AI-generated: the PR was mostly or fully generated by an AI tool.

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.


Note

Low Risk
One-line device argument change in server-mode initialization only; no auth, data, or broad behavioral refactors.

Overview
In vLLM server mode, weight-sync communicator setup now passes accelerator.device into VLLMClient.init_communicator instead of torch.cuda.current_device().

That matches the device Accelerate assigned for the training main process, so server-mode weight updates work on non-CUDA backends (and stay correct when CUDA index and Accelerate’s device differ).

Reviewed by Cursor Bugbot for commit a78ca1a. Bugbot is set up for automated code reviews on this repo. Configure here.

…ccelerator device instead of always querying CUDA.

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@sywangyi

Copy link
Copy Markdown
Contributor Author

@qgallouedec please help review

@sywangyi

Copy link
Copy Markdown
Contributor Author

@IlyasMoutawwakil please help review

@IlyasMoutawwakil IlyasMoutawwakil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kashif
kashif enabled auto-merge (squash) July 21, 2026 10:44
@IlyasMoutawwakil

Copy link
Copy Markdown
Member

@qgallouedec please merge when you can 🙏

@kashif
kashif merged commit 8b5db4b into huggingface:main Jul 22, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants