What is tensor parallelism? How one LLM runs across several GPUs
Tensor parallelism splits every LLM layer across GPUs. How it works, what it costs in GPU traffic, and when pipeline parallelism or replicas are better.

Tensor parallelism is a way to run one model on several GPUs by splitting each layer between them. Every GPU holds a slice of every weight matrix, computes its part of the layer, and then the GPUs combine their results before the next layer starts. It lets a model that is too big for one card run on two, four or eight cards, and it can cut the time per token. The price is constant traffic between the GPUs, so how fast they are connected decides how well it works.
Which setup for whom
- The model and its cache fit on one GPU → no parallelism. One card, no traffic between GPUs, the simplest setup.
- Many users, model fits on one or two cards → replicas. Run several independent copies and spread the requests. The GPUs do not talk to each other, so throughput grows almost in line with the number of cards.
- Model too big for one card, GPUs in one server → tensor parallelism, in the smallest group that fits. A tensor parallel size of 2 or 4 is usually cheaper in traffic than 8.
- Model too big for one server, or GPUs on a slow link → tensor parallelism inside a group, pipeline parallelism between groups.
- One very large model, lowest latency, eight GPUs → an NVLink system (HGX H100, H200 or B200), where GPU-to-GPU bandwidth is many times higher than PCIe.
- Several models or many users on 768 GB of GPU memory → a whole 8-GPU server. Our server in Sofia has eight RTX PRO 6000 Blackwell Server Edition cards and rents from $1.80 per GPU-hour, about $10,510 a month for the whole machine. It is rented into early 2027 and we take reservations for the period after. See the server.
How tensor parallelism works
A transformer layer is mostly large matrix multiplications. Tensor parallelism cuts those matrices into pieces and gives one piece to each GPU.
The method most frameworks use comes from NVIDIA's Megatron-LM paper (Shoeybi et al., 2019). In the feed-forward block, the first weight matrix is split by columns and the second by rows. Each GPU can then run both multiplications on its own slice without talking to the others, and only at the end of the block do the GPUs add up their partial results with an all-reduce. The attention block is split the same way, by attention heads. The result is two all-reduce operations per transformer layer in the forward pass.
With this scheme the authors trained an 8.3 billion parameter model on 512 GPUs with 8-way model parallelism and reported 76% scaling efficiency compared with a single GPU.
Two things follow from the design:
- Memory is shared out. With a tensor parallel size of 4, each GPU stores about a quarter of the weights and a quarter of the KV cache. That is why tensor parallelism is the usual answer when a model does not fit on one card. For the arithmetic, see How much VRAM does an LLM need?.
- Communication happens at every layer. A model with 80 layers needs 160 all-reduces for every forward pass, for every batch of tokens. If the link between GPUs is slow, the GPUs wait.
Tensor vs pipeline vs data parallelism
| Tensor parallelism | Pipeline parallelism | Replicas (data parallelism) | |
|---|---|---|---|
| What is split | Every layer, across GPUs | Groups of layers, one group per GPU | Nothing: each GPU or group has a full copy |
| GPU-to-GPU traffic | High, twice per layer | Low, only between stages | None for inference |
| Helps a model fit | Yes | Yes | No |
| Effect on latency per token | Can reduce it | Adds some delay | No change |
| Best on | Fast links inside one server | Slower links, several servers | Models that fit on one card or group |
The Megatron team's follow-up paper (Narayanan et al., 2021) combined the three: tensor parallelism inside a server, where GPUs share fast NVLink, and pipeline parallelism across servers. The same rule appears in the vLLM documentation for multi-node serving: set the tensor parallel size to the number of GPUs per node and the pipeline parallel size to the number of nodes.
How to turn it on in vLLM
In vLLM, tensor parallelism is one flag:
vllm serve <model> --tensor-parallel-size 4
To combine it with pipeline parallelism on eight GPUs, the vLLM documentation gives the example --tensor-parallel-size 4 --pipeline-parallel-size 2. vLLM also notes that pipeline parallelism splits along layers and accepts uneven splits, which helps when the GPU count does not divide the model evenly. SGLang and TensorRT-LLM have equivalent settings. For a comparison of the serving engines, see vLLM vs Ollama vs SGLang.
A practical limit: the model's attention heads are split between GPUs, so the number of heads has to divide evenly by the tensor parallel size. Sizes of 2, 4 and 8 work for most models.
Why the GPU link decides the result
Because GPUs exchange data at every layer, the interconnect sets the ceiling. NVIDIA lists 900 GB/s of NVLink bandwidth per GPU for Hopper (H100, H200) and 1,800 GB/s for Blackwell data centre GPUs. The RTX PRO 6000 Blackwell has no NVLink and talks over PCIe 5.0 x16, about 64 GB/s in each direction. The details are in Does the RTX PRO 6000 have NVLink?.
A public benchmark shows what this means. In November 2025 CloudRift tested vLLM on RTX PRO 6000, H100 and H200:
| Setup (CloudRift, vLLM) | RTX PRO 6000 | H100 SXM | H200 |
|---|---|---|---|
| 1 GPU, GLM-4.5-Air, 4-bit | 3,140 tokens/s | 2,987 tokens/s | not tested |
| 8 GPUs, tensor parallel, GLM-4.6, FP8 | about 900 tokens/s | about 2,700 tokens/s | about 3,600 tokens/s |
| 8 GPUs, 8 replicas of GLM-4.5-Air | 15,713 tokens/s | not reported | not reported |
On one card the RTX PRO 6000 was level with the H100. With one model split across eight cards, the H100 with NVLink was about three times faster. With eight independent copies, the PCIe cards scaled well. Our reading: on PCIe servers, replicas and small tensor parallel groups use the hardware far better than one tensor parallel group of eight.
Practical rules
- Use the smallest tensor parallel size that fits the model and its cache. More GPUs in the group means more traffic per token.
- Shrink the model first. FP8 or 4-bit weights can bring a model from four cards down to two or one. See What is NVFP4?.
- Fill the rest of the server with replicas. On eight GPUs, two groups of four or four groups of two usually give more total throughput than one group of eight.
- Check the link.
nvidia-smi topo -mshows how the GPUs connect. A card running at PCIe Gen4 or x8 by mistake halves the bandwidth. - Measure with your own prompts. Results depend on the model, batch size and prompt length, so published numbers are a guide, not a promise.
Questions
Is tensor parallelism the same as model parallelism? It is one kind of model parallelism. Model parallelism means any way of splitting a model across devices. Tensor parallelism splits within each layer; pipeline parallelism splits between layers.
Does tensor parallelism make inference faster? It can lower the time per token, because each GPU does a fraction of the work for each layer. On slow links the communication can eat that gain. For total throughput with many users, replicas are often better if the model fits.
Can I use tensor parallelism across two servers? It works, but traffic between servers is much slower than inside one. The usual approach is tensor parallelism inside each server and pipeline parallelism between them, as the vLLM documentation recommends.
Do I need tensor parallelism for a 70B model? Not always. In 4-bit, a 70B model fits on one 96 GB card with room for the cache. In FP16 it needs about 140 GB for the weights alone, so two or more cards.
Sources
- Shoeybi et al., Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelism, arXiv 1909.08053, 2019: intra-layer splitting of the MLP and attention blocks, 8.3B parameters on 512 GPUs, 76% scaling efficiency, checked 24 November 2026.
- Narayanan et al., Efficient Large-Scale Language Model Training on GPU Clusters Using Megatron-LM, arXiv 2104.04473, 2021: combining tensor, pipeline and data parallelism, checked 24 November 2026.
- vLLM, Parallelism and scaling:
--tensor-parallel-size,--pipeline-parallel-size, multi-node guidance, checked 24 November 2026. - NVIDIA, NVLink and NVLink Switch: 900 GB/s per GPU (fourth generation), 1,800 GB/s (fifth generation), checked 18 November 2026.
- NVIDIA, RTX PRO 6000 Blackwell Server Edition: 96 GB GDDR7, PCI Express Gen 5, checked 18 November 2026.
- CloudRift, RTX PRO 6000 vs datacenter GPUs, LLM inference benchmark, November 2025.


