liveBook · Manning

Pipeline parallelism

As explained in LLMs in Production

Pipeline parallelism is a distributed-computing technique that partitions a model into sequential stages placed on different devices.

When a model is too large for one GPU, pipeline parallelism splits it vertically into sequential stages on different GPUs. Input data moves from one device to the next until the full model has run, making execution possible rather than merely faster. section 3.3.2 section 3.5

The practical trade-offs are straightforward:

  • A naive one-batch pipeline creates a large utilization bubble: while one GPU processes its stage, other GPUs wait. section 3.3.2
  • Microbatching reduces the bubble by letting the first GPU forward smaller batches sooner and continue working while later stages process earlier batches. section 3.3.2
  • Pipeline parallelism can combine with tensor and data parallelism; together, data, tensor, and pipeline parallelism form 3D parallelism. section 3.5

How LLMs in Production covers it

How deep it goes
Explains vertical partitioning, device transfers, idle bubbles, and microbatching, but does not detail scheduling algorithms.
Examples
Uses a sequential multi-GPU flow and a bubble-versus-microbatching comparison to demonstrate execution and utilization.
What you can do after
Evaluate when pipeline parallelism is necessary and diagnose underutilization caused by pipeline bubbles.
How it connects
Connects pipeline parallelism with data parallelism, tensor parallelism, sequence parallelism, and 3D parallelism.

Also explained in

Compare how 4 books explain pipeline parallelism →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLMs in Production. The section links point to the parts of the book it draws on.