Some models do not fit on one GPU, and some workloads need more throughput than one GPU can give. The answer is parallelism, but there are four different ways to split the work, and each trades memory, latency, throughput and communication differently. This lesson explains tensor, pipeline, data and expert parallelism, shows the sizing arithmetic that tells you when you need them, and gives you a rule of thumb for combining them across GPUs and nodes.
- Decide when a model needs more than one GPU from its size and your context needs
- Explain what tensor, pipeline, data and expert parallelism each split
- Predict the communication each strategy needs and where it should run
- Combine strategies for multi-GPU and multi-node deployments
- Avoid the common mistake of adding parallelism that adds latency without benefit
When one GPU isn't enough
Start with memory. A model needs its weights plus enough KV cache for useful concurrency plus working space. A 70-billion-parameter model in FP16 is about 140 GB of weights: it cannot fit on one 80 GB GPU at all, and two would leave little room for cache, so four is the practical minimum. In FP8 the same model is about 70 GB, which technically fits on one 80 GB card but leaves almost no cache, so two GPUs is still the sensible floor. A model of around 405 billion parameters is roughly 405 GB in FP8 and 810 GB in FP16: one eight-GPU node in FP8, two nodes in FP16.
The second reason is throughput: a model fits on one GPU, but you need more requests per second than one GPU serves within your latency target. That calls for copies, not splitting, and it is a different strategy entirely.
The four strategies
| Strategy | Splits | Communication | Best for |
|---|---|---|---|
| Tensor (TP) | Each layer's weight matrices across GPUs | All-reduce inside every layer | Fitting a model; lower latency per token; within one node |
| Pipeline (PP) | Groups of layers into stages on different GPUs | Activations passed stage to stage | Spanning nodes over slower links |
| Data (DP) | Nothing: full replicas | None between replicas | More throughput when the model fits |
| Expert (EP) | Experts of a mixture-of-experts model | All-to-all token routing per MoE layer | Large MoE models |
Tensor parallelism cuts each big matrix into slices, one per GPU; each GPU computes its slice and the partial results are combined with an all-reduce, typically twice per transformer layer. Every GPU holds a fraction of the weights and of the KV cache, and because work per token is split, per-token latency can drop. The price is constant, latency-sensitive communication, which is why TP belongs on NVLink inside a node, usually at 2, 4 or 8.
Pipeline parallelism puts the first layers on one GPU, the next on another, and so on. Only activations cross between stages, once per stage, so it tolerates slower links and is the usual way to span nodes. It does not make a single token faster; each extra stage adds a hop. Throughput depends on keeping every stage busy with different micro-batches; idle stages are called bubbles.
Data parallelism simply runs more copies behind a load balancer. Expert parallelism places the experts of a mixture-of-experts model on different GPUs and sends each token to the GPUs holding its chosen experts, an all-to-all exchange per MoE layer that needs a fast fabric and good load balancing across experts.
Combining them
- Fits on one GPU with room for cache: no splitting. Add replicas (DP) for throughput.
- Needs several GPUs, fits in one node: TP across that node's NVLink-connected GPUs, then replicate the whole TP group for throughput.
- Needs more than one node: TP inside each node, PP across nodes (for example TP 8, PP 2 on two eight-GPU nodes).
- Large MoE model: EP for the expert layers, often with DP or TP for the attention layers; engines expose this as a combination of flags.
- Very long contexts: context or sequence parallelism splits the sequence itself across GPUs, an advanced option some engines provide.
# one node, 4 GPUs, model split four ways
vllm serve "$MODEL_ID" --tensor-parallel-size 4
# two nodes of 8 GPUs: TP inside each node, PP across nodes
vllm serve "$MODEL_ID" --tensor-parallel-size 8 --pipeline-parallel-size 2
# TensorRT-LLM equivalents
trtllm-serve "$MODEL_ID" --tp_size 8 --pp_size 2More parallelism is not automatically better. TP 8 on a model that fits comfortably on 2 GPUs spends most of its time communicating; four TP-2 replicas usually deliver far more throughput from the same eight GPUs. Use the smallest split that fits your model and cache, then replicate.
Choosing with numbers
A reliable procedure: compute weight memory at your precision; decide the KV cache you need from your concurrency and context targets (the KV-cache lesson's formula); add about 10% for overhead; divide by usable memory per GPU and round up to a power of two for TP. If that exceeds one node, add pipeline stages across nodes. Then benchmark the candidate layouts, for example TP 4 with two replicas versus TP 8 with one, on your workload, and pick the higher goodput per GPU.
Remember what each choice does to the KV cache: TP splits it across GPUs too, so a TP 4 group holds four times the cache of one GPU minus the weights, which is often why moving from TP 2 to TP 4 increases concurrency more than you expect.