GPipe is a pipeline-parallel method that splits a model's sequence of layers into several stages placed on different GPUs, and further divides each mini-batch into smaller micro-batches that flow through in order like an assembly line. It can train large models that do not fit on one GPU across multiple GPUs while keeping GPU idle time down.
If the model is simply cut along its sequence of layers and distributed across GPUs, GPU 2 waits until GPU 1 finishes, and in the backward pass GPU 1 in turn waits for the GPUs above it. Only one GPU works at any moment, so adding more GPUs does not make it faster (top of the figure above).
In a 2019 paper (NeurIPS), Huang et al. split the mini-batch into micro-batches and fed them through in sequence, so that different GPUs can compute different micro-batches at the same time (bottom of the figure above). Because the gradients are accumulated over the whole mini-batch before updating, the updates are the same as training on a single device, regardless of the number of stages. With this method they trained a 557M-parameter AmoebaNet and a 128-layer, 6B-parameter multilingual translation Transformer.
As an analogy, consider an assembly line in which washing, drying, and folding are each handled by one person. If all the laundry goes through as one big pile, the person drying can do nothing until all the washing is done. If it is split into small baskets passed along one after another, all three can work at the same time.

