Serving
Tensor & pipeline parallelism
Split a model across GPUs when it doesn’t fit on one.
What it is and why it exists
Tensor parallelism splits each layer’s matrices across GPUs (needs fast interconnect like NVLink, cuts latency); pipeline parallelism puts different layers on different GPUs (works across slower links, adds pipeline bubbles); expert parallelism spreads MoE experts across GPUs.
Quick prototype
—
In production, at scale
Tensor parallel within a node for big models, pipeline across nodes only when necessary, and replicas (data parallel) for throughput.
Vendors and tools
| vLLM --tensor-parallel-size | TP serving |
|---|---|
| Megatron-LM / DeepSpeed | Training-side parallelism |
How it fails
- Tensor parallel over a slow network
What the interviewer asks next
Replicas or tensor parallelism for more throughput?
If the model fits on one GPU, replicas scale throughput linearly with less overhead; tensor parallelism is for models that don’t fit or to cut per-token latency.