Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable multi-GPU inference in vLLM with tensor parallelism #105

Merged
merged 2 commits into from
Feb 11, 2025

Conversation

YuhanLiu11
Copy link
Collaborator

This PR introduces support for tensor parallelism in vLLM engines by modifying the Helm chart template to include shared memory configuration when tensorParallelSize is set. This enables multi-GPU execution with tensor parallelism degree of more than one.

FIX #95

BEFORE SUBMITTING, PLEASE READ THE CHECKLIST BELOW AND FILL IN THE DESCRIPTION ABOVE


PR Checklist (Click to Expand)

Thank you for your contribution to production-stack! Before submitting the pull request, please ensure the PR meets the following criteria. This helps us maintain the code quality and improve the efficiency of the review process.

PR Title and Classification

Please try to classify PRs for easy understanding of the type of changes. The PR title is prefixed appropriately to indicate the type of change. Please use one of the following:

  • [Bugfix] for bug fixes.
  • [CI/Build] for build or continuous integration improvements.
  • [Doc] for documentation fixes and improvements.
  • [Feat] for new features in the cluster (e.g., autoscaling, disaggregated prefill, etc.).
  • [Router] for changes to the vllm_router (e.g., routing algorithm, router observability, etc.).
  • [Misc] for PRs that do not fit the above categories. Please use this sparingly.

Note: If the PR spans more than one category, please include all relevant prefixes.

Code Quality

The PR need to meet the following code quality standards:

  • Pass all linter checks. Please use pre-commit to format your code. See README.md for installation.
  • The code need to be well-documented to ensure future contributors can easily understand the code.
  • Please include sufficient tests to ensure the change is stay correct and robust. This includes both unit tests and integration tests.

DCO and Signed-off-by

When contributing changes to this project, you must agree to the DCO. Commits must include a Signed-off-by: header which certifies agreement with the terms of the DCO.

Using -s with git commit will automatically add this header.

What to Expect for the Reviews

We aim to address all PRs in a timely manner. If no one reviews your PR within 5 days, please @-mention one of YuhanLiu11
, Shaoting-Feng or ApostaC.

Signed-off-by: YuhanLiu11 <[email protected]>
Copy link
Collaborator

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

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

Can we also increase the minor version number in Chart.yaml (

version: 0.0.3
)?
This is to update the release helm charts on the github pages.

@ApostaC
Copy link
Collaborator

ApostaC commented Feb 11, 2025

Also, please fix the problems in the functionality test. Seems like there will be an error if $modelSpec.vllmConfig does not exist.

Thanks!

@YuhanLiu11
Copy link
Collaborator Author

Also, please fix the problems in the functionality test. Seems like there will be an error if $modelSpec.vllmConfig does not exist.

Thanks!

Fixing it now!

@Shaoting-Feng
Copy link
Collaborator

LGTM

Copy link
Collaborator

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

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

LGTM!

@ApostaC ApostaC merged commit 8d4b05a into vllm-project:main Feb 11, 2025
7 checks passed
sitloboi2012 pushed a commit to sitloboi2012/production-stack that referenced this pull request Feb 13, 2025
…ect#105)

* Adding TP>1 support and adding shm size as a configurable parameter

Signed-off-by: YuhanLiu11 <[email protected]>
Signed-off-by: sitloboi2012 <[email protected]>
sitloboi2012 pushed a commit to sitloboi2012/production-stack that referenced this pull request Feb 13, 2025
…ect#105)

* Adding TP>1 support and adding shm size as a configurable parameter

Signed-off-by: YuhanLiu11 <[email protected]>
Signed-off-by: sitloboi2012 <[email protected]>
@YuhanLiu11 YuhanLiu11 deleted the tp-shm branch February 18, 2025 21:00
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.

Usage: How to run model with multi GPU
4 participants