All glossary terms

Model architecture

Pipeline parallelism

The model is cut into stages that run on different GPUs, one after another. Adds capacity in whole-card chunks but does not speed one request.

Pipeline parallelism cuts the model by depth instead of width: the first layers live on one GPU, the next layers on another, and so on. A request walks the stages in order, passing activations down the line, so the model can be spread across cards that need no special interconnect - only a network link, because no two GPUs need to talk about the same layer.

The trouble with a plain pipeline is idleness: while one card works on stage two, the card holding stage four waits. Serving stacks fill the wait with microbatches - many requests in flight, each at a different stage - and the leftover idle time between fills is the bubble. More microbatches shrink the bubble; fewer make the cards idle more of the time.

The interview framing sets pipeline against tensor: pipeline adds capacity in whole-card chunks and tolerates slow links, tensor buys single-request speed and needs fast ones. Pipelines also set a floor on latency, because even an idle pipeline pays for the whole chain of stages on the first request in.

A worked example

A 70B model in 8-bit cut into 4 stages of about 17.5 GB each, run over cards linked by a slower network link, with the choice of 8 or 16 microbatches in flight.

  1. Stage memory: 70 GB / 4 = 17.5 GB per card, so four modest cards can each hold one stage.
  2. Bubble share with 4 stages and 8 microbatches: (4 - 1) / (4 + 8 - 1) = 3/11 = 27 percent of the cycle idles.
  3. With 16 microbatches: 3 / (4 + 16 - 1) = 3/19 = 16 percent idle.
  4. Aggregate throughput still scales toward 4 cards of capacity once the pipe fills; the very first request in still walks all 4 stages before any token appears.

Pipelines add capacity and tolerate slow links; the tax is the bubble, which microbatching buys down, and the latency floor comes from the stage count.

Where this shows up

Test yourself

Related terms