Training fault tolerance

Also known as: straggler mitigation · training job restart

On this page 7

Training fault tolerance is the ability of a large model training job to detect failures, recover from them and continue with minimal loss of compute and progress. In AI infrastructure it covers checkpointing, failure detection, job restart, straggler mitigation and elastic resizing, which together keep thousands of accelerators productive over runs that last weeks or months in artificial intelligence research and production.

The need grows with scale. A cluster of tens of thousands of GPUs contains so many components that some part fails every few hours, and synchronous distributed training normally stops when a single rank stops. Fault tolerance turns such interruptions from lost days into minutes of recovery.

Why large training jobs fail

Distributed training is tightly coupled: in data parallelism, tensor parallelism and pipeline parallelism every step waits for collective communication such as all-reduce. A failure on one node therefore stalls the whole job, and the probability of at least one failure rises roughly in proportion to the number of components.

Operators of very large runs have reported interruptions every few hours at the scale of 16,000 GPUs, with the majority caused by hardware rather than software. The table below groups the most common failure sources.

Failure sourceExampleTypical effect
GPU faultsUncorrectable memory errors, fallen-off-bus devicesRank crash and job stop
Network faultsFlapping links, switch failuresCollective timeouts or hangs
Host faultsKernel panics, power or cooling eventsLoss of all ranks on a node
Storage faultsSlow or unavailable file systemStalled data loading or checkpoint writes
Software faultsDriver bugs, out-of-memory errorsCrash or silent slowdown
Silent data corruptionFaulty arithmetic unitsWrong values and loss spikes
Typical failure sources in large training clusters

Core mechanisms of fault-tolerant training

The foundation is periodic checkpointing: the job saves model weights, optimizer state, learning rate scheduler, random number generator state and data loader position so that training can resume from an exact step. Distributed checkpointing lets each rank write its own shard in parallel, which cuts save time for models with hundreds of billions of parameters.

Around checkpointing, a fault-tolerant system adds detection and orchestration layers. The following table summarizes the main mechanisms and what each protects against.

MechanismWhat it doesProtects against
Distributed checkpointingSaves sharded state at intervalsLoss of all progress
Asynchronous checkpointingCopies state to host memory, writes in backgroundLong training pauses during saves
In-memory replicasKeeps checkpoint copies on peer nodesSlow reloads from remote storage
Health checks and heartbeatsDetects dead or hung ranksSilent hangs that waste hours
Automatic job restartReplaces bad nodes and relaunchesManual recovery delays
Elastic trainingContinues with fewer or more workersWaiting for spare hardware
Mechanisms and what they protect

Hot spare nodes reduce recovery time further. Instead of waiting for a scheduler to allocate new hardware, the orchestrator swaps a pre-warmed spare into the failed position and reloads the latest checkpoint.

Straggler mitigation and silent errors

Not every fault is a crash. Stragglers are workers that run slower than their peers because of thermal throttling, a degraded link or a noisy neighbor. In synchronous training the slowest rank sets the pace for all ranks, so a single straggler can reduce cluster throughput by a large margin without producing any error message.

Straggler mitigation relies on per-rank step-time telemetry, automatic identification of outliers and removal or replacement of the slow node. Some systems also use backup workers or bounded staleness, although these techniques change the optimization dynamics and are less common for large language models.

Silent data corruption is harder still. A faulty chip may produce wrong results without raising an error, which can show up as sudden loss spikes or NaN values. Defenses include loss anomaly detection, redundant computation on suspect nodes, gradient norm monitoring and rolling back to an earlier checkpoint when values diverge.

Choosing a checkpoint interval

The checkpoint interval is a trade-off between overhead and lost work. Frequent saves waste time on writing state; rare saves lose more steps when a failure occurs. A classic approximation, the Young-Daly formula, balances both costs: the best spacing grows with the square root of save duration multiplied by the mean time between failures, scaled by a factor of two inside the root.

The decision table below illustrates how scale and save speed influence the choice.

SituationSuggested approachReason
Small job, few nodesSave every one to several hoursFailures are rare
Thousands of GPUsSave every 10 to 30 minutesFailures arrive every few hours
Slow shared storageAsynchronous saves to local memory firstHides write latency
Fast in-memory checkpointsSave every few minutes or stepsOverhead becomes negligible
Checkpoint interval guidance by situation

The useful metric is effective training time ratio, sometimes called goodput: the share of wall-clock time spent on steps that are not later lost or repeated. Well-engineered large runs aim for goodput above 90 percent despite frequent interruptions.

Limitations and common mistakes

Fault tolerance is a system property, so gaps in any layer undermine the rest. Teams frequently checkpoint model weights carefully but forget the data loader position, which causes repeated or skipped samples after a restart and subtly alters the training data distribution.

  • Untested restore paths fail exactly when needed; restoring should be exercised regularly.
  • Collective timeouts set too high let hung jobs waste hours before anyone notices.
  • Elastic resizing changes the global batch size, so learning rate and batch settings must be adjusted deliberately.
  • Keeping only the latest checkpoint is risky, because corrupted saves require an older fallback.

Stripped to the essentials

Big AI models learn for weeks while thousands of chips work together. Some chips will break during that time. Without protection, one broken part can stop everything.

Training fault tolerance is the safety net. The system saves its progress often, like saving a long video game. It watches every machine for trouble. When one fails, it swaps in a healthy machine and continues from the last save. Only a few minutes of work are lost instead of days.

Where it is applied

A research lab pretrains a language model on 8,192 GPUs for about two months. In the first week, the job stops roughly twice a day because of memory errors and network link failures, and each manual restart takes over an hour, so the cluster loses a significant share of its time.

The infrastructure team introduces asynchronous distributed checkpoints every 15 minutes, a pool of hot spare nodes, heartbeat monitoring with a five-minute collective timeout and automatic relaunch. A dashboard flags ranks whose step time exceeds the median by more than ten percent. After these changes, typical recovery drops to under ten minutes, two silent stragglers are removed early, and the run reaches goodput above 90 percent for the rest of the training schedule.