LESSON 11.10 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Data parallelism and DDP
Watch four GPUs train one model on a split batch, then sync their gradients.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 11.10 · DDP BAY4 GPUS · 2 SAMPLES EACH · SAME WEIGHTS
01
Stage 1 of 6 · Split the batch
Each GPU holds the same 4 layers. Data parallelism gives each GPU 2 of the 8 samples.
Explain it simply
You see four GPUs, and each one holds the same model: the same 4 layers of weights. The batch of 8 samples is split, so each GPU gets two of them. On the right, one GPU alone takes all 8, the normal way to train. Each GPU now does only a quarter of the work.
4 GPU columns hold the same weight grid. Each has 2 of the 8 samples. A dashed column on the right holds all 8.
samplesweightsgradients, backwardAllReduceone GPU, whole batch
Toy: 4 tanh layers (2×2 weights, 2 biases), 8 samples, η 0.5; timing: same layers at 20 MB, 10 GB/s
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each GPU gets an equal share of the batch.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.