Data parallelism replicates the model on each GPU and splits the batch; simple, but every GPU holds a full copy of weights, gradients and optimizer states.
FSDP and DeepSpeed ZeRO shard optimizer states (stage 1), gradients (stage 2) and parameters (stage 3) across GPUs, so models far larger than one GPU's memory can be trained with data-parallel simplicity.
Tensor parallelism splits individual matrix operations across GPUs; pipeline parallelism splits layers into stages. These are used for very large models and combine with sharding.
Communication cost matters: fast interconnects (NVLink, InfiniBand) and overlapping communication with compute are key.
Loading…