06.03

Tensor, expert, and pipeline parallelism

skillmaxingInference EngineeringTensor, expert, and pipeline parallelism
Visual lesson

Tensor, expert, and pipeline parallelism

Included with Pro · 5:20
Lessons · 1,246 words

A model is split across GPUs when its weights plus useful KV cache do not fit on one, or one GPU is too slow. There are three basic cuts. Tensor parallelism slices every weight matrix so each GPU holds a piece of every layer. Pipeline parallelism gives each GPU a consecutive run of whole layers. Expert parallelism, for mixture-of-experts models, places whole experts on different GPUs and sends each token to wherever its chosen experts live.

Each cut decides how often GPUs talk and how much they send, which must match the wire between them. Inside a node, NVLink gives each H100 900 GB/s of total bandwidth. Between nodes, a 400 Gb/s InfiniBand NIC carries 50 GB/s. The usual rule, tensor parallelism inside a node and pipeline or expert parallelism across nodes, follows from that arithmetic.

Pro

Continue reading

Pro unlocks every video lesson, the full notes, worked sizing and cost calculations, and runnable configs across the Inference Engineering course, from GPUs and kernels to quantization, speculative decoding, disaggregation and production autoscaling.

Unlock full access to
Python with AIInference EngineeringAI researchComplete system design
30% off with LAUNCH30first payment
Buy now
View all plans ·Already Pro? Sign in