When you need more than one GPU
vLLM’s parallelism guide starts with a simple rule: if the model fits on one GPU, run it on one GPU. Distributed inference adds communication on every token and more ways to fail. Split the model only when the weights plus a useful KV cache do not fit.
At 16-bit precision weights need about two bytes per parameter. A 70B model is about 140 GB, more than one 80 GB H100 holds, so it needs at least two GPUs and in practice four to leave room for traffic. A 405B model at 16-bit is about 810 GB, more than the 640 GB on an eight-GPU 80 GB node, so it needs a second node, a quantized checkpoint, or larger-memory GPUs. The LLM VRAM budget covers the KV cache side, and the base single-GPU setup is in deploy vLLM on a cloud GPU; this guide only covers splitting the model.
| Situation | vLLM docs recommend | Flags |
|---|---|---|
| Model fits on one GPU | Single GPU, no distribution | Defaults (tensor parallel size 1) |
| Too big for one GPU, fits in one node | Tensor parallelism | --tensor-parallel-size = GPUs used |
| Too big for one node | Tensor plus pipeline parallelism | -tp = GPUs per node, -pp = nodes |
| GPUs without NVLink, e.g. L40S | Pipeline parallelism instead of tensor | --pipeline-parallel-size |
| Fits on fewer GPUs than you have | Data parallel replicas | --data-parallel-size |
References: vLLM documentation: Parallelism and scaling · NVIDIA H100 specifications
Tensor, pipeline and data parallelism in one minute
Tensor parallelism splits every layer across GPUs. Each token’s computation needs all GPUs to exchange partial results several times per layer, so the interconnect sits on the critical path. In return, all GPUs work on every token, which lowers per-token latency.
Pipeline parallelism gives each GPU or node a contiguous block of layers and passes activations from stage to stage. It communicates far less, which suits slow links, but a single request moves through stages in sequence. Data parallelism runs full independent copies of the model and adds throughput, not capacity. For mixture-of-experts models, vLLM adds --enable-expert-parallel, which uses expert parallelism instead of tensor parallelism for the MoE layers.
References: vLLM documentation: Parallelism and scaling · vLLM documentation: vllm serve CLI arguments
Step 1: check the GPU topology and when NVLink matters
Before choosing sizes, run nvidia-smi topo -m on each node. NV# entries mean GPUs talk over NVLink; PIX, PHB, NODE and SYS mean traffic crosses PCIe switches, the CPU or the socket interconnect. Confirm the GPU count and memory with nvidia-smi as well.
The gap is large. NVIDIA lists 900 GB/s of NVLink bandwidth for H100 SXM against 128 GB/s for PCIe Gen5, and 600 GB/s NVLink for A100 SXM against 64 GB/s for PCIe Gen4. The L40S has no NVLink support and a PCIe Gen4 x16 link of 64 GB/s. That is why vLLM’s guide suggests pipeline parallelism for GPUs without NVLink, such as L40S. NVLink vs PCIe goes deeper.
| GPU | Memory | GPU-to-GPU link (vendor spec) | Tensor parallel fit |
|---|---|---|---|
| H100 SXM | 80 GB | NVLink 900 GB/s; PCIe Gen5 128 GB/s | Strong within a node |
| H100 NVL | 94 GB | NVLink 600 GB/s; PCIe Gen5 128 GB/s | Good within bridged pairs |
| A100 80 GB SXM | 80 GB | NVLink 600 GB/s; PCIe Gen4 64 GB/s | Strong within a node |
| A100 80 GB PCIe | 80 GB | NVLink bridge 600 GB/s for 2 GPUs; PCIe Gen4 64 GB/s | Good for bridged pairs |
| L40S | 48 GB | No NVLink; PCIe Gen4 x16 64 GB/s | Prefer pipeline parallelism |
References: NVIDIA System Management Interface · NVIDIA H100 specifications · NVIDIA A100 specifications · NVIDIA L40S specifications · vLLM documentation: Parallelism and scaling
Step 2: run vLLM tensor parallelism on one node
On a four-GPU node, start the server with vllm serve followed by the model ID and --tensor-parallel-size 4, or the short form -tp 4. The size must divide the model’s attention heads evenly; vLLM refuses to start otherwise with an error that the total number of attention heads must be divisible by tensor parallel size. Check num_attention_heads in the model’s config.json before choosing.
In Docker, add --ipc=host or a large --shm-size so worker processes can share memory, as the vLLM Docker docs describe. Set --max-model-len and --gpu-memory-utilization deliberately; the defaults are covered in the single-GPU runbook.
If GPUs lack NVLink, try -pp 4 instead of -tp 4, or a mix such as -tp 2 -pp 2 when GPUs are bridged in pairs. Then measure. vLLM’s docs state the direction of the trade-off, not a number for your model, so a short load test decides. Use the method in benchmark LLM inference.
References: vLLM documentation: Parallelism and scaling · vLLM documentation: vllm serve CLI arguments · vLLM documentation: Using Docker · vLLM source: model config parallel checks
Step 3: go multi-node with pipeline parallelism
For two nodes of eight GPUs, vLLM’s guide sets tensor parallel size to GPUs per node and pipeline parallel size to the number of nodes: --tensor-parallel-size 8 --pipeline-parallel-size 2. Every node needs the same vLLM version and the model at the same path, either downloaded to each node or on a shared file system.
The default multi-node runtime is Ray. The repository’s examples/ray_serving/run_cluster.sh starts containers on each node and joins them into a Ray cluster; check it with ray status and ray list nodes, then run vllm serve on the head node with --distributed-executor-backend ray. Without Ray, use the multiprocessing backend: the head node runs vllm serve with --nnodes 2 --node-rank 0 --master-addr set to its IP, and the worker runs the same command with --node-rank 1 and --headless. The default master port is 29501.
Cross-node traffic should use InfiniBand or RoCE with GPUDirect RDMA. Run once with NCCL_DEBUG=TRACE and look for [send] via NET/IB/GDRDMA in the log; [send] via NET/Socket means traffic is falling back to TCP, which the guide calls inefficient for cross-node tensor parallelism. InfiniBand vs Ethernet explains the fabric choice.
| Flag | Default | Meaning |
|---|---|---|
| --tensor-parallel-size, -tp | 1 | GPUs that split each layer, usually GPUs per node |
| --pipeline-parallel-size, -pp | 1 | Stages of layers, usually the number of nodes |
| --data-parallel-size, -dp | 1 | Independent model replicas |
| --enable-expert-parallel, -ep | False | Expert parallelism for MoE layers |
| --distributed-executor-backend | Chosen by vLLM | ray or mp (multiprocessing) |
| --nnodes, --node-rank | 1, 0 | Multi-node layout with the mp backend |
| --master-addr, --master-port | 127.0.0.1, 29501 | Head node address for the mp backend |
| --headless | False | Worker nodes that do not serve the API |
References: vLLM documentation: Parallelism and scaling · vLLM documentation: vllm serve CLI arguments
Step 4: secure the cluster
Only the head node’s API port should ever be reachable by clients, and even that should sit behind an SSH tunnel or an authenticated TLS proxy. vLLM’s CLI reference notes that --api-key protects only the /v1, /v2, /inference and /cohere prefixes, so do not rely on it alone.
Ray, NCCL and the multiprocessing master port need open traffic between nodes, not from the internet. Put the nodes on a private network, allow those ports only between the nodes’ private addresses, and keep the provider firewall closed to the public on everything except SSH. For development, reach the API with ssh -N -L 8000:localhost:8000 user@head-node, which the OpenSSH manual describes as local port forwarding without a remote command.
References: vLLM documentation: vllm serve CLI arguments · OpenSSH ssh(1) manual
Common vLLM tensor parallelism errors
The vLLM troubleshooting page recommends NCCL_DEBUG=TRACE and VLLM_LOGGING_LEVEL=DEBUG for any multi-GPU hang, and provides a test script to run with torchrun across the GPUs. If that script hangs, the page says the hardware or drivers are usually at fault, not vLLM. The NCCL timeout guide goes further.
| Symptom | Likely cause | Fix |
|---|---|---|
| Attention heads must be divisible by tensor parallel size | TP size does not divide the head count | Pick a TP size that divides num_attention_heads in config.json |
| Server hangs at start with several GPUs | NCCL cannot set up peer communication | NCCL_DEBUG=TRACE; run the torchrun test; try NCCL_P2P_DISABLE=1 to diagnose |
| NCCL init fails inside a container | Missing IPC_LOCK capability or /dev/shm | Add --ipc=host or --shm-size; check RDMA setup |
| Nodes cannot find each other | Wrong network interface or IP | Set VLLM_HOST_IP, GLOO_SOCKET_IFNAME and NCCL_SOCKET_IFNAME |
| Log shows [send] via NET/Socket | No GPUDirect RDMA across nodes | Fix InfiniBand config, e.g. NCCL_IB_HCA=mlx5 with --privileged |
| Low throughput on PCIe-only GPUs | Tensor parallel traffic over PCIe | Try pipeline parallelism or a mixed tp/pp split |
References: vLLM documentation: troubleshooting · vLLM source: model config parallel checks · vLLM documentation: Parallelism and scaling
Illustrative cost of splitting a model
Parallelism multiplies GPU-hours, so it should buy something you need. As an illustration at an assumed $2.00 per GPU-hour for 80 GB GPUs, a 70B model on four GPUs costs $8 an hour and about $5,840 for a 730-hour month. Two 8-GPU nodes for a 405B-class model cost $32 an hour, about $23,360 a month. A single replica of an 8B model on one GPU costs $2 an hour.
If a quantized checkpoint lets the model fit on half the GPUs with acceptable quality, it halves the bill; see LLM quantization for inference. Compare cost per million output tokens from your own load test, not GPU count.
| Layout (assumed $2.00 per GPU-hour) | GPUs | Per hour | Per 730-hour month |
|---|---|---|---|
| 8B model, single GPU | 1 | $2 | $1,460 |
| 70B model, -tp 4 | 4 | $8 | $5,840 |
| 70B model, -tp 8 | 8 | $16 | $11,680 |
| 405B-class model, -tp 8 -pp 2 | 16 | $32 | $23,360 |
Checklist and next step
Model confirmed too big for one GPU. nvidia-smi topo -m checked for NVLink. TP size equals GPUs per node and divides the attention heads. PP size equals nodes for multi-node. Same vLLM version and model path on every node. NCCL log shows GDRDMA across nodes. Inter-node ports private; API behind a tunnel or TLS proxy. Load test run before committing to the layout.
When you know the GPU type, count and interconnect you need, rent it. On NeuraMesh you choose the GPU, a plan, GPU count, hours and region, for example on the H100 rental page, and receive a confirmed quotation, typically within one business day, with nothing charged until you approve. Ask about NVLink and interconnect when you request the quote.
NeuraMesh prices for these GPUs
| GPU | Memory | Data center | Value |
|---|---|---|---|
| RTX 4090 | 24 GB | $0.46 | $0.40 |
| L40S | 48 GB | $1.26 | $0.54 |
| A100 | 80 GB | $1.56 | $0.98 |
| H100 | 80 GB | $2.88 | $2.00 |
Every order is confirmed in a quotation before you pay. See all GPU prices.
Questions readers ask
What should I set tensor-parallel-size to in vLLM?
The number of GPUs on one node that will share the model, and a value that divides the model’s attention heads evenly. On a single four-GPU node that is usually 4. Across nodes, set it to GPUs per node and add pipeline parallelism.
Does vLLM tensor parallelism need NVLink?
It works over PCIe, but every layer exchanges data between GPUs, so slow links cut throughput. vLLM’s docs suggest pipeline parallelism on GPUs without NVLink, such as L40S. Check nvidia-smi topo -m and measure both layouts.
What is the difference between tensor and pipeline parallelism in vLLM?
Tensor parallelism splits every layer across GPUs and communicates many times per token; pipeline parallelism gives each GPU or node a block of layers and passes activations between stages. vLLM combines them for multi-node: tensor within a node, pipeline across nodes.
Do I need Ray for multi-node vLLM?
No. Ray is the default multi-node runtime, but the multiprocessing backend works with --nnodes, --node-rank and --master-addr on each node, and --headless on workers.
Should I use data parallelism instead?
If the model fits on fewer GPUs than you have, yes: run replicas with --data-parallel-size or separate servers behind a load balancer. Data parallelism adds throughput without the per-token communication of tensor parallelism.
Sources and editorial notes
- vLLM documentation: Parallelism and scaling
- NVIDIA H100 specifications
- vLLM documentation: vllm serve CLI arguments
- NVIDIA System Management Interface
- NVIDIA A100 specifications
- NVIDIA L40S specifications
- vLLM documentation: Using Docker
- vLLM source: model config parallel checks
- OpenSSH ssh(1) manual
- vLLM documentation: troubleshooting
Primary documentation reviewed November 24, 2026. Provider descriptions reflect published documentation. Recommendations are our analysis; worked figures are illustrative unless explicitly stated otherwise. No independent provider benchmark or uptime ranking is claimed.
Need this GPU? Rent it from NeuraMesh: choose a GPU and plan, get a confirmed quotation, and pay only when you approve. See pricing.

