Primer engineering infrastructure

Pausing and resuming a training run

A frontier training run is thousands of GPUs marching in lockstep for months, and hardware fails under it constantly: Meta's Llama 3 run was interrupted 466 times in 54 days, about once every three hours. The runs survive because training is not really a march. It is a march plus a rhythm of photographs: complete snapshots of the training state, written to disk (or memory) on a schedule, so any interruption costs minutes of progress instead of the run. The catch is what a complete photograph contains. For a 70-billion-parameter model it is 840 gigabytes, six times the size of the model file everyone downloads, and leaving any piece out turns a resume into a different, quieter kind of restart.

Ink illustration of a long freight train loaded with metal plates, photographed by a giant bellows camera, with a stack of photographic plates beside it
A training run as a freight train, and the checkpoint as its photograph: not a picture of the cargo alone, but of the engine's gauges, the driver's memory, the timetable, and the mile marker. Resume means rehydrating the photograph until the train cannot tell it ever stopped.
The one sentence to keep

A resumable checkpoint is six things in one file set: weights, the full-precision master copy, both of the optimizer's moment arrays, the learning-rate schedule, the random-number state, and the bookmark in the data; miss one and you did not resume, you restarted with a head start.

Researched October 2026. Sizes are worked from the standard per-parameter byte counts (the ZeRO and mixed-precision anatomy in the sources); interruption figures are from the Llama 3 herd paper.

How it works

What is in the photograph, what a real run's interruptions actually look like, and how big the photograph gets as models grow.

Figure 1: anatomy of a checkpoint, in gigabytes

Build a resumable checkpoint for a 70B model, one component at a time. The running total is the lesson: the model file is the smallest part of its own training state.

Tap the arrows to step through

Figure 2: 466 interruptions, or why the photograph exists

The Llama 3 herd paper (arXiv, July 2024) published something rare: the failure census of a 54-day run on 16,384 H100 GPUs. Step through what broke, and what the team did about the other kind of interruption, the deliberate rollback.

Tap the arrows to step through

Figure 3: the photograph at three scales

Pick a model size. The bars use the standard anatomy: 2 bytes per parameter for the BF16 file, 4 for full precision, 12 for the canonical resumable checkpoint (master weights plus both AdamW moments), 14 if the working BF16 copy is stored too.

The road here

Landmarks only: from restart scripts to async, reshardable, in-memory state.

Tap the arrows to step through

Key voices

The teams who published the failure data, built the formats, and left the honest logs.

The Llama 3 team
Meta, the herd paper, July 2024

The field's reference census: 466 interruptions in 54 days on 16,384 H100s, 419 of them unexpected, faulty GPUs and HBM at the top, only 3 needing significant human intervention, and still over 90 percent effective training time. Their mitigations are the modern checklist: fast checkpoint load, fast job start, flight recording for the network fabric, automated fault isolation.

The PyTorch checkpointing team
Distributed Checkpoint (DCP), 2023 onward

Built the format property that matters most: shards plus a manifest, so a checkpoint written by 16,384 ranks can be loaded by a different number of ranks under different parallelism. Their later work (async save, then the 2026 torch_checkpointing library, async by default) attacks the other cost: the pause itself must not stall the fleet.

The Megatron-Core team
NVIDIA, torch_dist checkpointing

The other resharding format, tuned for tensor, pipeline, data, and expert parallelism in any combination, with fully parallel and async saves (the team claims up to 50 times lower checkpoint overhead than the native path). Their documented caveat is the honest kind: optimizer state does not reshard across the EP=1 versus EP>1 boundary.

The Hugging Face Trainer docs
The fine print, stated by the vendor

Trainer restores model, optimizer, scheduler, and RNG on resume, and its docs now state the trap out loud: train with save_only_model and the optimizer and scheduler files are absent, so the optimizer restarts from scratch at your resume point. They also document that data position is recovered by skipping batches, which is re-derivation, slow at scale, not a stored cursor.

The PaLM team
Google, Chowdhery et al., 2022

Source of the rollback protocol: when the loss spiked, rewind about 100 steps and skip 200 to 500 batches of data around the event. Their subtler finding: replaying the same batch from the same checkpoint often did not reproduce the spike. Instability lives in the interaction of optimizer state and data, not in either alone, which is why a checkpoint alone does not explain a run.

The OPT logbook
Meta, 2022, published in full

The messiest honest document in training: a public log of a 175B run's rollbacks, learning-rate cuts, hardware failures, and a mid-run optimizer change that was tried and reverted. Read it once and the idea that frontier training is a clean line from step 0 to done is gone for good; it is a supervised process, and checkpoints are the supervision's handle.

The Gemini team (Microsoft Research)
SOSP 2023; not Google's Gemini model

The in-memory camp: checkpoint every iteration into CPU RAM plus peer replicas, fall back to disk hierarchically, and recover in seconds rather than minutes. Their argument: at enough scale, disk checkpointing's interval math stops working, so the photograph should live where the training already is. Google's Gemini model report separately describes in-memory state replication for TPU training (via secondary summaries).

Where the field agrees

Exact-state resume is the normal path

Nobody serious treats checkpoints as backups anymore; they are the mechanism by which runs are scheduled, migrated, debugged, and salvaged. Frontier runs are pause-saturated by construction: planned maintenance, preemption, and failures all route through the same restore path, and the shipped models are the evidence it works.

Reshardability is a format property, bought early

Whether a checkpoint can move to different hardware and different parallelism is decided by the format chosen on day one (DCP, Megatron torch_dist), not by effort at rescue time. Legacy per-rank files strand runs; sharded formats with manifests travel.

Where it splits

Split 1, Side A: the pause is operationally free

The practitioner consensus. Complete-state restores continue loss curves; a run interrupted 466 times shipped on quality. If resuming cost anything measurable, the pause-saturated way frontier labs actually train would show it in the models.

Split 1, Side B: unmeasured is not free

The measurement skeptics. No controlled pause-versus-no-pause comparison exists in the primary literature, and the confounds are real (restarts coincide with interventions, hardware swaps, and data skips). The honest claim is narrower: no harm has been detected at operational resolution.

Split 2, Side A: checkpoint to disk, on an interval

The DCP and Megatron mainstream. Periodic sharded writes to durable storage, async so the fleet barely notices, restore in minutes. Simple blast radius: a fire takes the data center's power, not your only copy, because the copy is storage, replicated like everything else in the building.

Split 2, Side B: checkpoint to memory, every step

The Gemini camp. Keep the state in RAM and on peers, recover in seconds, and never pay the interval tradeoff at all. The counter they accept: correlated failures can take the replicas with the original, so memory is layered over disk, not instead of it.

Takeaways

So, pausing and resuming training, in one paragraph: the run stops being a process and becomes a state, written out whole (weights, master copy, both optimizer moments, schedule, dice, data bookmark) at six times the model file's size for the canonical 70B case, and a resume is that state rehydrated, possibly on different hardware under different parallelism if the format allows it. What the Llama 3 census adds is the reason this is the central infrastructure of modern training and not a convenience: at frontier scale, interruption is the steady state, about once every three hours, and the photograph is what makes it boring.

  • Remember the six-times rule. A resumable checkpoint runs about 6x the BF16 weights file (12 bytes per parameter against 2): 140 GB becomes 840 GB at 70B, and about 4.9 TB at 405B. Storage budgets follow from that one ratio.
  • Completeness is the whole game. Weights plus optimizer plus schedule plus RNG plus data position, or it is not a resume. The most dangerous checkpoint bug is the silent one, like save_only_model, where the run restarts its optimizer and nobody is told.
  • Hardware is the enemy, not software. In the Llama 3 census, GPUs and their memory dominate the unexpected interruptions (148 faulty GPUs, 72 HBM failures, 2 CPU-caused). Checkpoint intervals are set by failure rates, not by tidiness.
  • Choose the format before you need it. Resharding to different hardware and parallelism is a property of DCP and torch_dist-style formats. A run saved in per-rank files is a run married to its cluster shape.
  • A weights-only restart is a fine-tune, not a resume. Zeroed moments and a misaligned schedule change the trajectory measurably. Sometimes that is the right tool (it is how many adaptations start); just do not bill it as continuing the run.
  • Nobody has proven the pause is free. The evidence is that pause-saturated frontier runs ship excellent models and that incomplete resumes demonstrably differ. Hold both: resume with confidence, and keep the state complete.

Keep exploring

Sources

Every load-bearing number traces to one of these.

PaperThe Llama 3 Herd of Models (arXiv, 2024)
The interruption census (466 total, 419 unexpected, 47 planned, over a 54-day snapshot on 16,384 H100s), the failure breakdown (faulty GPU 148, HBM3 72, CPU 2), the mitigations, and the over-90-percent effective training time. Note: the paper's printed percentages for two rows do not match its own counts; this primer uses the counts.
PaperZeRO: Memory Optimizations Toward Training Trillion Parameter Models (arXiv, 2019)
The per-parameter byte anatomy behind Figure 1 and Figure 3: the 16-bytes-per-parameter training-state convention (weights, gradients, and optimizer states) from which the checkpoint arithmetic is derived.
DocsPyTorch Distributed Checkpoint documentation
The sharded save and load model, the .metadata manifest, load-time resharding to a different world size, and async_save.
DocsHugging Face Trainer documentation
What resume_from_checkpoint restores (model, optimizer, scheduler, RNG), the save_only_model caveat, and batch-skipping as the data-position mechanism.
PaperPaLM: Scaling Language Modeling with Pathways (arXiv, 2022)
The loss-spike protocol: rewind about 100 steps, skip 200 to 500 batches, and the observation that replaying the same batch from the same checkpoint often did not reproduce the spike.
PaperOPT: Open Pre-trained Transformer Language Models (arXiv, 2022)
The paper whose public logbook documents rollbacks, learning-rate cuts, and a reverted mid-run optimizer switch during a real 175B training run.
PaperGemini: Fast Failure Recovery in Distributed Training with In-Memory Checkpoints (Microsoft Research, SOSP 2023)
The in-memory design: checkpoints in CPU RAM with peer replicas every iteration and hierarchical fallback to persistent storage. The publisher page refuses scripted checks; content confirmed in a browser during research. Note the name collision the page itself flags implicitly: this is Microsoft's system, not Google's model.