What this thread does
Do first: If the model fits on one GPU, use that GPU. Otherwise size tensor parallelism (TP) and pipeline parallelism (PP) for the topology.
Short answer
Use TP within a node and combine TP with PP when the model needs multiple nodes. These sizes describe one model replica.
What to do
| Topology / control | Value / action |
|---|---|
| Four GPUs, one node | vllm serve facebook/opt-13b --tensor-parallel-size 4 |
| Eight GPUs total, TP plus PP | vllm serve gpt2 --tensor-parallel-size 4 --pipeline-parallel-size 2 |
| Two nodes, eight GPUs per node | On a ready Ray cluster: vllm serve /path/to/the/model/in/the/container --tensor-parallel-size 8 --pipeline-parallel-size 2 --distributed-executor-backend ray; replace the model path |
| Alternative for the same cluster | TP 16, backend ray; requires efficient cross-node communication |
| Python API names | tensor_parallel_size, pipeline_parallel_size, distributed_executor_backend |
| Executor choices / defaults | mp = Python multiprocessing, default for one node; ray = Ray, default across nodes |
| Uneven GPU split, or no NVLINK (for example L40S) | Prefer PP; for uneven splits use tensor_parallel_size=1, PP = GPU count |
For Ray, install the optional dependency with pip install ray. Keep model paths and Python packages identical on all nodes. The helper examples/ray_serving/run_cluster.sh uses --head on the head node and --worker on workers, with image vllm/vllm-openai. Set VLLM_HOST_IP separately to each node's private IP; keep the helper shells open. Inspect resources with ray status and ray list nodes. Run server commands inside the containers when Ray runs there.
For multi-node multiprocessing, launch on both nodes with --tensor-parallel-size 8 --pipeline-parallel-size 2 --nnodes 2 --master-addr <HEAD_NODE_IP>; the head adds --node-rank 0, the worker adds --node-rank 1 --headless. Replace the address placeholder.
Check startup capacity lines GPU KV cache size and Maximum concurrency. The documented example is 643,232 cached tokens and 15.70x concurrency at 40,960 tokens/request; the request length comes from ModelConfig.max_model_len. These are example outputs, not promised capacity.
Limits and open questions
- TP across nodes benefits from InfiniBand. For the helper, the page gives
--privileged -e NCCL_IB_HCA=mlx5as an example; profiling counters need--cap-add=CAP_SYS_ADMIN. - GPUDirect RDMA: Kubernetes needs
IPC_LOCKand a memory-backed/dev/shm; the Docker example uses--gpus all --ipc=host --shm-size=16G -v /dev/shm:/dev/shmwithvllm/vllm-openai. The pod example requests and limitsnvidia.com/gpu: 8. - With
NCCL_DEBUG=TRACE,[send] via NET/IB/GDRDMAidentifies RDMA;[send] via NET/Socketidentifies TCP. - Cluster traffic is unencrypted; keep the network inaccessible to untrusted parties. Capacity still depends on model and hardware.
Not for: llama.cpp GPU layer offload.
Sources
- Parallelism and Scaling, vllm-project, page dated 2026-10-15.
- Official documentation source, vllm-project.
Checked
2026-11-16; read Parallelism and Scaling and its official Markdown source, including single-node, multi-node, communication and RDMA sections; no command was run.
Started from a post by @vLLM contributors, packaged by the editor. Original post