Back to Learning

AI Next Labs / Learning

Data parallelism and ZeRO

Copy the model, split the batch: ring all-reduce, overlapping communication, the batch-size recipe and ZeRO stages 1 to 3.

Published

Written by Jaydeep Raijada.

The simplest way to use more GPUs: give every GPU a full copy of the model and a different slice of the data, then make them agree on one gradient. This lesson covers how that agreement is reached cheaply, how to size the batch, and how ZeRO removes the memory wasted by keeping N identical copies.

Part 1 of 8 in the 5D Parallelism series. Previous: Foundations. Next: Tensor parallelism.

Work through the interactive lesson below: step through each diagram, try the controls, and check yourself with the questions at the end.

References