Distributed Training Runbook

Distributed training splits a model or its data across multiple devices to fit larger models or finish faster. The conceptual layer is Distributed training; this note focuses on public operational checks.

For scheduler-managed multi-node jobs, use Distributed training on HPC. This page remains a compact training-side checklist.

The first question is not “how many GPUs can I use?” but which limit the single-device run already hit.

When To Scale

SignalBetter First MoveScale-Out Move
model does not fitactivation checkpointing, mixed precision, smaller batchsharded data parallel or model parallel
step is compute-boundlarger local batch, fused kernels, precision checkdata parallel if communication remains small
GPU waits for datadataloader, cache, shard format, storage pathdo not add GPUs yet
validation needs many independent runsjob array or multi-run scheduler plandistributed training may be unnecessary
walltime risk is highcheckpoint/resume and shorter jobsdistributed only if recovery is defined

Batch and Step Contract

Record the batch arithmetic before interpreting a learning curve:

where is gradient accumulation. If changes, the optimizer step, learning-rate schedule, warmup, gradient clipping, and number of consumed examples per step may change too.

The training log should make these counters unambiguous:

CounterMeaning
micro-stepone forward/backward on a local micro-batch
optimizer stepone parameter update after accumulation and synchronization
global stepshared step index used by checkpoint, scheduler, and logging
consumed samplesexamples processed across all workers

Single-GPU Gate

Do not debug distributed behavior before a small single-device run is sane.

CheckEvidence
loss decreases on a small runshort training curve
data order is deterministic enoughseed and sampler policy
checkpoint can save and resumestate dict, optimizer, scheduler, scaler, step
memory is understoodweight, activation, optimizer, batch contribution
dataloader keeps updataloader wait or step timing

Communication Gate

For data parallel training, useful scaling depends on communication not dominating compute:

where is single-device step time and is step time with workers. Low efficiency can be a valid tradeoff, but the note should say why.

SymptomLikely Cause
speed barely improvesall-reduce, input pipeline, sync logging, small batch
loss changes after scalingeffective batch, sampler, LR schedule, batch norm, nondeterminism
hang at startuplauncher, rank environment, rendezvous setting, filesystem, NCCL setup
OOM only after scalinggradient buckets, shards, per-rank batch, validation batch

Practical Checks

  • Start with data parallelism (DDP); reach for model/pipeline parallel only when memory forces it.
  • Verify gradients are synchronized and the effective batch size is what you intend.
  • Watch communication overhead — interconnect bandwidth often caps scaling.
  • Confirm a single-GPU run matches loss curves before scaling out.
  • Checkpoint regularly so a failed node does not lose a long run.
  • Use GPU bottleneck taxonomy to separate single-device bottlenecks from communication bottlenecks.

Public Run Record Fields

FieldWhy
world size and local batchreconstructs effective batch
accumulation stepsseparates micro-step from optimizer step
precision and checkpointingexplains memory and stability
launcher and parallelism typedistinguishes DDP, sharding, pipeline, model parallel
checkpoint contentsproves resume boundary
hardware classenough context without publishing private node names
failure classuseful for future runs without exposing logs

Boundary

Keep this page about the training-side run contract. Move cluster-specific commands, partitions, node placement, and Slurm diagnostics to Distributed training on HPC. Move hardware bottleneck details to GPU and Storage and Network.