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

[Misc] Define common requirements #3841

Merged
merged 17 commits into from
Apr 5, 2024
Merged

[Misc] Define common requirements #3841

merged 17 commits into from
Apr 5, 2024

Conversation

WoosukKwon
Copy link
Collaborator

@WoosukKwon WoosukKwon commented Apr 4, 2024

This PR factors out the common dependencies to requirements-common.txt to better manage the dependencies across different backends.

@WoosukKwon WoosukKwon marked this pull request as draft April 4, 2024 03:27
setup.py Outdated Show resolved Hide resolved
@WoosukKwon
Copy link
Collaborator Author

Tbh, I'm not sure whether introducing requirements-common.txt is a good decision, since people can mistakenly skip pip install -r requirements-common.txt.

Alternatively, we can duplicate the contents of requirements-common.txt to all requirements-*.txt, while clearly separating the common requirements and backend-specific requirements. For example, requirements-coda.txt can be:

# Common dependencies (must be same for all `requirements-*.txt`)
cmake>=3.21
ninja  # For faster builds.
psutil
sentencepiece  # Required for LLaMA tokenizer.
numpy
requests
py-cpuinfo
transformers >= 4.39.1  # Required for StarCoder2 & Llava.
fastapi
uvicorn[standard]
pydantic >= 2.0  # Required for OpenAI server.
prometheus_client >= 0.18.0
outlines == 0.0.34
tiktoken == 0.6.0  # Required for DBRX tokenizer

# Dependencies for NVIDIA GPUs
ray >= 2.9
torch == 2.1.2
xformers == 0.0.23.post1  # Required for CUDA 12.1.
pynvml == 11.5.0
triton >= 2.1.0

while requirements-neuron.txt can be:

# Common dependencies (must be same for all `requirements-*.txt`)
cmake>=3.21
ninja  # For faster builds.
psutil
sentencepiece  # Required for LLaMA tokenizer.
numpy
requests
py-cpuinfo
transformers >= 4.39.1  # Required for StarCoder2 & Llava.
fastapi
uvicorn[standard]
pydantic >= 2.0  # Required for OpenAI server.
prometheus_client >= 0.18.0
outlines == 0.0.34
tiktoken == 0.6.0  # Required for DBRX tokenizer

# Dependencies for Neuron devices
transformers-neuronx >= 0.9.0
torch-neuronx >= 2.1.0
neuronx-cc

@WoosukKwon WoosukKwon marked this pull request as ready for review April 4, 2024 04:34
requirements-cuda.txt Outdated Show resolved Hide resolved
@njhill
Copy link
Collaborator

njhill commented Apr 4, 2024

Tbh, I'm not sure whether introducing requirements-common.txt is a good decision, since people can mistakenly skip pip install -r requirements-common.txt.

@WoosukKwon you can ref one requirements file from another, so requirements-cuda.txt could be:

# Common dependencies
-r requirements-common.txt

# Dependencies for NVIDIA GPUs
ray >= 2.9
torch == 2.1.2
xformers == 0.0.23.post1  # Required for CUDA 12.1.
pynvml == 11.5.0
triton >= 2.1.0

Copy link
Collaborator

@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 @WoosukKwon, I really like the de-duplication!

setup.py Outdated Show resolved Hide resolved
@WoosukKwon WoosukKwon requested a review from njhill April 4, 2024 17:07
@youkaichao
Copy link
Member

@WoosukKwon #3859 is merged. If you merge main into this PR, it should resolve the vllm-nccl problem.

@WoosukKwon WoosukKwon merged commit cfaf49a into main Apr 5, 2024
35 checks passed
@WoosukKwon WoosukKwon deleted the cleanup-req branch April 5, 2024 15:16
z103cb pushed a commit to z103cb/opendatahub_vllm that referenced this pull request Apr 22, 2024
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.

None yet

3 participants