Training / distributed
Distributed
Once the model, its gradients and its optimiser state exceed a single accelerator, the question becomes what to shard and when to gather it again. The answers differ in how much communication they add to buy how much memory back.
8 entries.
Entries
02.05.1O(N)02.05.2O(n²·d/N)02.05.3O(P)02.05.4—02.05.5—02.05.6O(P/N)02.05.7O(P/N)02.05.8O(d/N)
Collective Communicationstandard
All-reduce, all-gather, reduce-scatter, all-to-all — the six primitives everything is built from.
Context Parallelismcommon
Split the sequence across devices, and pass the KV blocks around a ring.
Data Parallelismstandard
Replicate the model, split the batch, average the gradients.
Fault Tolerancecommon
At ten thousand devices something fails hourly; the run has to survive it.
Parallelism Compositionstandard
Four or five strategies at once, and the topology decides the order.
Pipeline Parallelismstandard
Layers on different devices, and the bubble that schedule design exists to shrink.
Tensor Parallelismstandard
Split each matrix across devices; two all-reduces per layer buy the memory back.
ZeRO Shardingstandard
Partition optimiser state, gradients and parameters across ranks.