Log inStart free
LESSON 11.C1 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

Splitting one model across 16 GPUs

Watch one training step run on a grid of 16 GPUs.


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/mo
EXPLAINER · 11.C1 · GRID BAY16 GPUS · 3–4 OF 24 NUMBERS EACH
01
Stage 1 of 6 · The grid
3D parallelism puts 16 GPUs on a 2 × 2 × 4 grid. Each GPU keeps part of one layer and half of the samples.
Explain it simply

Each column of boxes is a pipeline stage with one layer. Each block of 2 rows is a data replica: a full copy on 4 of the 8 samples. Inside a block, 2 GPUs split each layer in half: by column or row of A in lesson 11.12. Each box's tag says which. The 1 GPU box holds everything.

There are 16 GPU boxes. They form 4 columns, one per pipeline stage and layer, and 4 rows: 2 data replicas of 2 tensor GPUs. Each GPU keeps 3 or 4 of the 24 numbers and 4 of the 8 samples. A box named 1 GPU shows 1 GPU with the whole model.

samples, kept inputs, forwardweightsgradients, backwardcollectivesnot on this GPU1 GPUidle time
stage 0 · layer 1stage 1 · layer 2stage 2 · layer 3stage 3 · layer 4replica 0t0t1replica 1t0t1GPU 0columnGPU 1columnGPU 2columnGPU 3columnGPU 4rowGPU 5rowGPU 6rowGPU 7rowGPU 8columnGPU 9columnGPU 10columnGPU 11columnGPU 12rowGPU 13rowGPU 14rowGPU 15row1 GPUwhole batch · 18 ms a step512 B of memorythe grid of 16 GPUs2 data × 2 tensor × 4 pipeline = 16 GPUsdata 11.10ZeRO 11.11tensor 11.12pipeline 11.13sequence 11.14stage 0 · layer 1stage 1 · layer 2stage 2 · layer 3stage 3 · layer 4replica 0t0t1replica 1t0t1GPU 0columnGPU 1columnGPU 2columnGPU 3columnGPU 4rowGPU 5rowGPU 6rowGPU 7rowGPU 8columnGPU 9columnGPU 10columnGPU 11columnGPU 12rowGPU 13rowGPU 14rowGPU 15row1 GPUwhole batch · 18 ms a step512 B of memorythe grid of 16 GPUs2 data × 2 tensor × 4 pipeline = 16 GPUsdata 11.10ZeRO 11.11tensor 11.12pipeline 11.13sequence 11.14
Toy: 8 samples, 16 B a parameter, 2 B a kept input
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
N=D⋅T⋅P\sy{n}{param}{N} = D \cdot T \cdot P
N=2⋅2⋅4=16N = 2 \cdot 2 \cdot 4 = 16

The GPU count is the product of the three axis sizes.

Common mix-ups

MYTH16 GPUs make one training step 16 times faster.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With 1 microbatch instead of 2, does the step take more or less time?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

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.