6.1.7 · D5Scaling & Efficient Architectures

Question bank — Model parallelism (tensor, pipeline)

1,294 words6 min readBack to topic

This page hunts the misconceptions that live inside Model parallelism (tensor, pipeline). Each line is a question ::: answer reveal. Cover the question, commit to an answer out loud, then reveal — if your reason doesn't match the reason given, you found a gap.

Before you start, three words we lean on constantly:


True or false — justify

Tensor parallelism reduces the number of parameters the model has.
False. The parameter count is unchanged; the same weights are just sliced across devices so each device stores of them. The model is mathematically identical.
Data parallelism and tensor parallelism solve the same problem.
False. Data Parallelism replicates the whole model and splits the data (helps throughput, not per-device memory). Tensor parallelism splits the model to fit weights that don't fit on one GPU. They are complementary, often combined.
In column-wise tensor parallelism the input is split across devices.
False. For with column-split, every device needs the full ; only (and therefore the output ) is sliced. must be broadcast, not partitioned.
Pipeline parallelism can give perfect (100%) device utilisation with a single mini-batch.
False. With one batch and stages the bubble is of the time — most devices idle. You need many micro-batches to fill the pipeline.
GPipe and PipeDream (1F1B) differ only in speed, not memory.
False. Their steady-state activation memory differs: GPipe stores activations for all micro-batches; 1F1B keeps only about micro-batches live because it frees activations by running backward passes early.
The MLP block's column-then-row split needs one all-reduce per linear layer.
False. It is designed so the intermediate hidden state stays sliced (no comm after ), and only one all-reduce happens after — one per MLP block, not per layer.
Increasing the number of micro-batches is always free.
False. Larger shrinks the bubble but activation memory grows with (in GPipe), so you eventually run out of memory before the bubble disappears.
Splitting attention across heads requires communication inside each head's computation.
False. Heads are independent, so each device computes its heads fully locally; communication (all-reduce) only comes after the output projection combines them.

Spot the error

"Column-parallel then column-parallel gives the cleanest attention MLP."
Wrong pairing. The efficient pattern is column-parallel then row-parallel , so the sliced hidden state feeds directly into the row-split second matrix and only one all-reduce is needed.
"After the row-parallel second layer we do an all-gather to build the output."
Wrong collective. Row-parallel outputs are partial sums over the shared output dimension, so they need an all-reduce (sum), not an all-gather (concat).
"To get in column-parallel, each device just uses its own slice — no communication."
Wrong. ; the chain rule sums over all output columns, so you need an all-reduce to add every device's contribution.
"GPipe bubble fraction is where is the batch size."
Wrong variable. With micro-batching the bubble is where is the number of micro-batches, not the raw batch size — splitting the batch is the whole point.
"Pipeline parallelism removes the sequential dependency between layers."
Wrong. The dependency is fundamental — layer still needs layer 's output. Micro-batching only hides the waiting by overlapping different micro-batches, it doesn't remove the ordering.
"Activation checkpointing lets you raise with zero extra cost."
Wrong. Activation Checkpointing trades memory for compute: it recomputes activations in the backward pass, adding roughly 33% more compute. It reduces memory pressure but is not free.

Why questions

Why does column-wise splitting of produce independent output slices?
Because — each column block of maps to its own column block of , so device can compute with no knowledge of the other blocks.
Why is the backward pass the one that forces communication in column-parallel layers?
Forward outputs are independent slices, but the input gradient mixes all output columns via , so the per-device contributions must be summed (all-reduce) before flowing to earlier layers.
Why place row-parallel after column-parallel in the MLP?
Column-parallel leaves the hidden state sliced along its columns; a row-parallel matrix consumes exactly that sliced dimension as its rows, so the two fit together with no reshuffle and only a single final all-reduce.
Why does 1F1B (PipeDream) save memory versus GPipe?
By running a backward pass as soon as a micro-batch finishes its forward, it frees that micro-batch's activations early, so only ~ micro-batches are alive at once instead of all .
Why do more micro-batches shrink the pipeline bubble?
With more micro-batches the pipeline stays filled: while stage 0 works on a new micro-batch, later stages are busy on earlier ones, so the fixed fill/drain cost is amortised over more useful work.
Why combine tensor parallelism with Mixed Precision Training and Gradient Accumulation?
They attack different parts of the memory budget: tensor parallelism splits weights across GPUs, mixed precision halves bytes-per-parameter, and gradient accumulation lets a large effective batch fit without storing it all at once.

Edge cases

What does tensor parallelism with reduce to?
The single-device baseline — one "slice" is the whole matrix, no communication, no memory saving. It is the degenerate case that must match ordinary training exactly.
What happens to pipeline utilisation when ?
The bubble , so utilisation approaches 100% — but activation memory (in GPipe) grows without bound, so memory, not the bubble, becomes the limit.
What is the bubble when (one pipeline stage)?
Zero: . With one stage there is nothing downstream to wait for, so pipeline parallelism gives no benefit and no bubble.
In 1F1B, why can early stages see gradients from stale micro-batch versions?
Because forward and backward for different micro-batches interleave, a stage may apply a weight update while later micro-batches were computed on the older weights — a version mismatch that schedules like PipeDream must manage.
If the whole model already fits on one GPU, is model parallelism ever worth it?
Rarely for memory, but it can still help if a single layer's compute is the bottleneck; usually Data Parallelism is preferred first, since model parallelism adds communication overhead you don't otherwise need.
What limits how far you can push tensor parallelism ( very large)?
GPU Memory Hierarchy and interconnect bandwidth: each layer needs all-reduces across all devices, so beyond a point communication cost outweighs the memory saved — practical is capped by fast intra-node links.
Recall One-line self-test

Column-parallel forward needs which collective, and backward needs which? ::: Forward needs an all-gather (concat the output slices); backward needs an all-reduce (sum the input-gradient contributions).