-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Closed
Labels
usageHow to use vllmHow to use vllm
Description
Your current environment
This is about API usage rather than an environment issue.
How would you like to use vllm
I want to run batch inference using two models in the same process and spread them across distinct GPUs.
Here's an example code snippet i've been trying to figure out how to get correct:
from vllm import LLM
llm1 = LLM(
model="meta-llama/Llama-2-70b-hf",
tensor_parallel_size=2
)
llm2 = LLM(
model="CohereForAI/c4ai-command-r-v01",
tensor_parallel_size=2,
)In this scenario, if I have 4 A100 80Gs on a single node, I should be able to fit model one on GPUs 1 and 2, then fit model two on GPUs 3 and 4. I was hoping that Ray's backend would get this right but instead this doesn't work. I typically run out of vRAM.
Is there a way to configure two LLM instances such that they work on distinct subsets of my available GPUs all while running the same process? Do I need to use device right?
Metadata
Metadata
Assignees
Labels
usageHow to use vllmHow to use vllm