Parallel training, memory and recovery 00:00:01 Four machines, one training step Four machines with twenty-four gibibytes each sound like a ninety-six-gibibyte shelf. Dev has eighty gibibytes of persistent training state. Then a layer is gathered and a worker stops. What assumption did the arithmetic hide? Each device needs some combination of weights, gradients, optimizer state, activations and temporary communication buffers. Data parallel workers process different examples and aggregate gradients. Sharding can partition model state across workers. Tensor parallelism splits operations within a layer, pipeline parallelism partitions layers, and expert parallelism dispatches tokens to the devices hosting selected experts. Different data samples can share an optimizer step while parameter, gradient and optimizer storage are split by an explicit plan. Each device still needs activations, temporary buffers and any gathered weights at their peak. 00:00:56 Trace the layer across workers Four workers receive input slices according to the data-parallel plan. Each worker contributes its partition and holds transient buffers needed for computation. Measure collective time and identify an imbalanced expert or slow link before increasing the batch. Publish only after all shards and optimizer metadata are present. Ignore the incomplete later generation after restart. 00:01:20 Budget the temporary peak Full sharding keeps partitions of persistent state and temporarily materializes parameters for computation. Peak memory includes activations and communication buffers even if a simple division gives a small steady-state number. Sharding 80 gibibytes of persistent state over four balanced ranks gives 20 gibibytes per rank before gathered weights and temporary allocations. Microbatches help overlap stages, yet the slowest stage limits steady-state throughput. An expert router sending too many tokens to one expert creates an uneven workload and extra cross-device traffic. Three workers finish in 12 milliseconds and a fourth takes 30 milliseconds. A synchronized step waits for the fourth even though mean utilization looks acceptable. Commit a checkpoint manifest only when all required shards and training metadata have been written. On restart, restore one coherent step and verify the data cursor. Mixing shards from adjacent steps can silently corrupt the resumed run. A failed worker leaves three of four shards at step 901. Restore all four from committed step 900. Choose a partition by measuring the dominant constraint. Sharding a large optimizer state can trade memory for all-gathers. Splitting a single layer can place a collective on the critical path of every layer. A pipeline can leave devices idle while its first or last microbatch travels. A distributed checkpoint must represent one consistent training step across all shards. 00:02:51 What would resume step nine hundred? Why can four devices with 24 gibibytes each still fail to fit 80 gibibytes of sharded persistent state? The steady-state partition alone does not bound the peak during a training step. Dev records a consistent checkpoint at a completed update. He can restart from step nine hundred with the right state, and he sizes each device by its local peak rather than adding all the labels on the shelf.