-
NVIDIA Quantum-2 QM9700
Rated 4.50 out of 5USD33,600 -
AI Bridge LTE TS2-08: The Ultimate 8/16-Channel Edge AI Analytics Powerhouse with LTE & GPS
USD7,200
-
HPE ProLiant DL380A Gen12: The Ultimate 4U Dual-Socket AI Server with Intel® Xeon® 6 CPUs and 10 Double-Width GPU Support
USD80,000
-
NVIDIA A2 Tensor Core GPU: Entry-Level AI Acceleration for Edge Computing
USD3,040
-
3.84TB SSD NVMe Palm Disk Unit: Revolutionary Compact Storage for Modern Data Centers
USD3,200
-
Huawei OceanStor Dorado 6000 V6 – All-Flash NVMe Storage System for Mission-Critical Enterprise Applications
USD25,600
Products Mentioned in This Article
Tensor vs Pipeline Parallelism: What Each Means for GPU Hardware
Tensor parallelism splits each layer of a model across GPUs, so the GPUs must exchange data several times per layer and need a very fast link such as NVLink. Pipeline parallelism gives each GPU a block of whole layers and only passes activations to the next stage, so it tolerates slower links but leaves GPUs idle unless the pipeline is kept full. In practice the choice is made by your interconnect: tensor parallelism inside the NVLink domain, pipeline parallelism across it.

Two ways to cut a model
When a model or its training state no longer fits in one GPU, you have to divide it. The two classic ways divide it in different directions.
- Tensor parallelism (TP) cuts across the width of each layer. A large matrix multiplication is split so that each GPU computes part of the result. The method was popularised for transformers by the Megatron-LM paper, which splits the attention heads and the two MLP matrices so that each transformer layer needs only a small number of all-reduce operations.
- Pipeline parallelism (PP) cuts along the depth of the model. GPU 1 holds the first group of layers, GPU 2 the next group, and so on. A batch is divided into micro-batches that flow through the stages like parts on an assembly line.
Both reduce the memory needed per GPU for weights. They differ sharply in how much they talk, and when.
What each one asks of the hardware
| Property | Tensor parallelism | Pipeline parallelism |
|---|---|---|
| Communication pattern | All-reduce among all TP GPUs, inside every layer | Point-to-point, between neighbouring stages |
| Volume per step | High, repeated many times per forward and backward pass | Low: activations at stage boundaries only |
| Sensitivity to latency | Very high; GPUs wait on each collective | Moderate |
| Main inefficiency | Communication time | Pipeline “bubble” (idle stages) |
| Natural home | GPUs joined by NVLink / NVSwitch | Across servers, or PCIe-only GPUs |
| Effect on inference | Lowers latency per token | Raises throughput when many requests are in flight |
The bubble in plain terms
With a simple schedule, the first stage starts work while the others wait, and at the end the last stage finishes while the others sit idle. The study by Narayanan et al. on Megatron-LM at scale gives the idle fraction as roughly (p − 1) / m, where p is the number of stages and m the number of micro-batches. More micro-batches shrink the bubble, but each one needs memory for its activations. Interleaved schedules, where each GPU holds several smaller chunks of layers, reduce the bubble further at the cost of more communication.
The rule that falls out of this
The same paper reaches a practical conclusion that still holds: use tensor parallelism up to the number of GPUs that share a fast NVLink fabric, and use pipeline parallelism (plus data parallelism) beyond that. NVIDIA’s TensorRT-LLM sharding guide gives the same starting point for inference: if the model fits on one GPU, do not shard; if it fits in one node, start with TP; across nodes, TP inside each node and PP between them. It also notes the exception: rack-scale NVLink systems such as NVL72 extend the fast domain to 72 GPUs, so TP is not limited by the server boundary there.

What this means when you choose a server
HGX-class servers with NVSwitch
Eight SXM GPUs connected through NVSwitch can all talk to each other at full NVLink speed. TP of 2, 4 or 8 inside the box is the normal layout. If you plan to train or serve models that need eight GPUs’ worth of memory, this is the platform where TP behaves well; an example is the HGX H200 8-GPU server.
PCIe servers
Without NVLink, every all-reduce crosses PCIe and often the CPU. TP of 2 on a pair of GPUs under the same PCIe switch can still work, and some PCIe cards support NVLink bridges in pairs. Beyond that, PP usually wastes less time. Our comparison of NVLink vs PCIe GPUs explains the topology in more detail.
Multi-node clusters
Between servers, PP traffic is modest, but data-parallel gradient synchronisation is not. That is why training clusters still use one high-speed NIC per GPU and a non-blocking fabric. See InfiniBand vs RoCEv2 for the network side.
A worked layout (hypothetical example)
Assume a model whose weights, optimiser state and activations need about four GPUs’ worth of memory, and two servers with eight NVLink-connected GPUs each.
- Set TP = 4 inside each server, so each layer is split over four GPUs on NVLink.
- That leaves two TP groups per server and four in total. Use them as data-parallel replicas (DP = 4), or as two pipeline stages (PP = 2) if the model grows.
- Check that TP × PP × DP equals the total GPU count: 4 × 1 × 4 = 16.
- Measure step time, then try TP = 8 with DP = 2 and compare. Fewer, larger TP groups reduce memory per GPU but increase communication.
The numbers here are illustrative. The method is what matters: keep TP inside the fast fabric, then fill the rest with PP and DP, and measure.
Other kinds of parallelism you will meet
- Data parallelism: each replica holds the full model (or a shard of its state, as in ZeRO/FSDP) and processes different data.
- Sequence/context parallelism: splits long sequences across GPUs, often alongside TP.
- Expert parallelism: for mixture-of-experts models, places different experts on different GPUs; it produces all-to-all traffic that also favours a fast fabric.
For the wider server build, including CPUs, storage and software stack, see our guide to multi-GPU training server configuration.
Checklist before you commit to a layout
- Find the size of your NVLink domain: 2 (bridge), 8 (HGX) or 72 (NVL72).
- Keep TP degree within that domain and a divisor of the attention-head count.
- Set enough micro-batches that (p − 1) / m is small.
- Balance layers so no pipeline stage is much slower than the others.
- Run collective benchmarks before the real job to confirm the links perform as expected.
Frequently asked questions
Is tensor parallelism faster than pipeline parallelism?
For latency on NVLink-connected GPUs, usually yes. For total throughput, or on slower links, pipeline parallelism can win. It depends on the interconnect and the batch.
Can I use tensor parallelism across two servers?
You can, but every layer then waits on the inter-node network, which is much slower than NVLink in a standard server. It is normally avoided unless the servers share a rack-scale NVLink fabric.
Does pipeline parallelism save memory?
Yes, each stage holds only its layers. But in-flight micro-batches add activation memory, so the saving is less than a simple division suggests.
Do I need either one for inference on a single GPU?
No. If the model and its KV cache fit, one GPU per replica avoids all communication overhead.
Which frameworks support both?
Megatron-LM, NeMo, DeepSpeed and PyTorch training stacks support them, and inference engines such as vLLM and TensorRT-LLM expose TP and PP settings.
Summary
Tensor parallelism trades heavy communication for lower latency and needs NVLink. Pipeline parallelism trades idle time for light communication and travels well across servers. Know your NVLink domain first; the layout follows from it.
Last update at December 2025
