Unit 11 of 11 · about 3 hours · explain

Failed-run triage, all-attempt retention and hardware failure signatures

Successful runs alone hide instability and wasted budget. A defensible research result retains the attempts that did not finish and separates an observed signature from a proven cause.

You'll be able to

  • Explain why failed, stopped and retried attempts belong in the study's evidence and cost ledger.
  • Distinguish numerical, data, capacity and storage failures from evidence suggesting a device fault.
  • Explain a seeded incident using retained traces, a controlled repair and explicit limits on local evidence.

Covers

Failed-run triage, exclusion policy and all-attempt retentionHardware and interconnect failure signatures
1

Read

In this order, only the parts listed

0 of 3 done

  1. OPT: retain the interrupted training historyOPT: Open Pre-trained Transformer Language Models, Section 2.5 (Zhang et al., 2022)

    Section 2.5 Training Processes: Hardware Failures, Loss Divergences and Other Mid-flight Changes; Figures 1 and 2

    Read the incident narrative, not the model-scale recipe. The reported restarts and combined interventions do not isolate a universal repair or predict your GPU's failure rate.

  2. Recovery policy without blind retriesMachine Learning Engineering - Instabilities, Checkpoints and Debugging

    Queue up multiple training jobs; Frequent checkpoint saving; Kill switch; Save switch; Is-job-hanging watchdog and Low disk space alerts

    Extract the stop, evidence and last-good recovery ideas. Skip SLURM commands, spare-node provisioning and multi-replica recovery; no cluster or watchdog service is required.

  3. Hardware signatures are evidence, not verdictsMachine Learning Engineering - Instabilities, Checkpoints and Debugging

    Errors and diagnostics: Xid Errors and uncorrectable ECC error encountered; How to detect if you get the same broken node again and again

    Read only. Do not run stress tests, reset hardware or request administrator access. Skip the page's categorical claims that every uncorrectable error crashes the application and every correctable error has no impact; behavior depends on device and containment policy. ECC telemetry can be unavailable on consumer GPUs.

2

Focus on

  • Give every launch an attempt ID and parent checkpoint. Retain contract, seed, batch lineage, logs, exit status, stop reason, consumed tokens, elapsed time and last verified state, even for failed or cancelled attempts.
  • An out-of-memory error indicates a capacity or allocation problem, not proof of broken hardware. An invalid token index, nonfinite activation, full disk and stalled input path require different controls before any hardware hypothesis.
  • If available, preserve timestamped driver messages, Xid codes, ECC counters, GPU identity, temperature and software versions. These can support escalation, but a generic CUDA error or loss spike alone cannot establish a defective device.
  • Keep observation, hypothesis, intervention and outcome separate. State retry limits and who can authorize recovery. A CPU or one-GPU injection validates local detection and recovery only, not fleet reliability or real hardware failure rates.
Common mistakes · 3
  • Deleting failed seeds before averaging completed runs. Report completion counts and all-attempt cost alongside held-out outcomes; do not invent a final loss for an unfinished run.
  • Restarting repeatedly without changing a persistent cause such as a full filesystem. Bound retries, retain each attempt and stop for diagnosis.
  • Treating a passing replay as proof the original hardware is healthy. Intermittent faults and changed software state need separate evidence.
3

Try it yourself

Closed-book, before checking anything

Closed-book, reconstruct the seeded block-output failure from the instrumentation unit using only its retained evidence. Explain the first invalid module, the refused update, the last-good checkpoint and the successful same-batch control with injection disabled. Give the failed attempt and replay separate IDs and costs. List the missing evidence that prevents calling this a hardware fault; do not inject real device faults or fabricate driver logs.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.OPT reports at least 35 manual restarts. Is that its total restart count?Answer

    No. Section 2.5 also estimates over 70 automatic restarts due to hardware failures. Manual restarts alone undercount the interrupted history.

  2. 2.A run fails with a nonfinite loss and no available ECC telemetry. What can you conclude?Answer

    Only that numerical failure was observed and hardware telemetry is unavailable. Inspect data, precision, activations and update history; absent telemetry is neither proof of hardware health nor evidence of a fault.

  3. 3.A repair succeeds after both lowering the learning rate and replacing the input shard. Which cause is established?Answer

    Neither individually. Both changed. Preserve the combined outcome, then use controlled replays if safe to isolate the responsible mechanism.

You're done when

You can explain the seeded incident from its evidence, account for the failed and repaired attempts, and distinguish supported numerical findings from untested hardware and fleet hypotheses.

Only when you can do this without notes.

Leads to

Notes

Resources · 2 for this unit, 16 more in the section

Also in this section

  • OLMo-core and Official Training ScriptsAllen Institute for AI · primary

    Trace src/examples/llm/train.py through nn/transformer/, optim/, train/train_module/, train/trainer.py and train/callbacks/checkpointer.py. Note what Trainer.state_dict saves (loader, RNG and callback state) and how the data loader checks its fingerprint. The CPU integration test test_train_small_model_cpu needs extra packages and downloads external data, so point it at a small local fixture or treat the run as optional.

  • CS336 Assignment 1 - Training and SerializationStanford University · required

    Revisit only the optimizer, schedule, gradient clipping, data loading, checkpointing, training-together and decoding problems. Add kill-and-resume, tokenizer mismatch and corrupted-checkpoint tests beyond the foundation implementation.

  • Deep Learning Tuning PlaybookGoogle Research · required

    Read #a-scientific-approach-to-improving-model-performance (scientific, nuisance and fixed hyperparameters; incremental tuning), #determining-the-number-of-steps-for-each-training-run, #saving-checkpoints-and-retrospectively-selecting-the-best-checkpoint and the FAQ entries on schedules and #how-can-optimization-failures-be-debugged-and-mitigated. Write the run and triage protocol before launching comparisons; skip the batch-norm material.

  • Build a Large Language Model (From Scratch), Chapter 5 and Appendix DSebastian Raschka / Manning · support

    Use Chapter 5 (the loss, training loop and saving weights, pp. 128-167) and Appendix D (warmup, cosine decay and gradient clipping, pp. 313-321) as the first correct tiny pretraining loop before the large-run recipe.

  • nanoGPT Training LoopAndrej Karpathy · support

    Read train.py and model.py at commit 3adf61e and run the reduced CPU or small-GPU configuration. The repository is marked deprecated, its checkpoint holds no RNG, scaler or data-loader state, and the loop runs max_iters + 1 updates. Use those gaps for your kill-and-resume and atomic-save tests.

  • The Smol Training Playbook - Preflight and Training MarathonHugging Face · support

    Read the Preflight Checklist, the Training Marathon and the loss-spike stories for checks to run before and during a small pretraining run. The page has no stable anchors, so cite section names; its SmolLM numbers do not transfer to your model.

  • 2 OLMo 2 Furious, Sections 2.3, 3.1 to 3.4 and 6.3Allen Institute for AI · support

    Read the base training recipe (Section 2.3), the stability deep dive (repeated n-grams, initialization, norm and z-loss changes, embedding weight decay; Sections 3.1 to 3.4) and stability operations (Section 6.3) as the real narrative behind your tiny-run contracts.

  • Scaling Laws and Compute-Optimal Training Beyond Fixed Training Durations (Hagele et al., 2024) with MiniCPM Section 4EPFL; Tsinghua and ModelBest · support

    Read Hagele Sections 2 and 3 (constant learning rate plus cooldown matches cosine and allows mid-run evaluation) and MiniCPM Section 4 (warmup-stable-decay with a short decay phase). MiniCPM is at https://arxiv.org/abs/2404.06395. Both use sub-billion or small models.

  • Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfer (Yang et al., 2022)Microsoft and OpenAI · support

    Read Algorithm 1 (muTransfer) and Table 1 (which hyperparameters transfer and which do not), then one transfer figure. Transfer holds within one architecture, optimizer and data family.

  • Mixed Precision Training (Micikevicius et al., 2018)NVIDIA and Baidu · reference

    Read Section 3: FP32 master weights, loss scaling and FP32 accumulation, and the rule to unscale gradients before clipping. It predates BF16, which needs little or no loss scaling.

  • An Empirical Model of Large-Batch Training (McCandlish et al., 2018)OpenAI · reference

    Read Section 2: the gradient noise scale, the critical batch size and the steps-versus-examples trade-off in Figure 1. The noise scale grows as loss falls, so measure it at more than one point.

  • Modern LLM Notebook - Training and AccountingWalking Labs · support

    Use notebooks-en/part2-training/10-training-loss.ipynb and the appendix notebooks B-flops-memory-accounting.ipynb and C-mixed-precision-training.ipynb for the compact trainer, FLOP and memory accounting and mixed precision. Seed one numerical failure and reconcile the estimate with measurement.

  • TensorTonic - Training Reliability DrillsTensorTonic · support

    Solve Mixed-Precision Training Memory Accountant (cs336-l02-training-memory-accountant), Transformer Training FLOP Estimator (cs336-l02-training-flop-estimator), Gradient Accumulation Equivalence (cs336-l02-gradient-accumulation-step) and Generate a Warmup-Stable-Decay Schedule (cs336-l11-wsd-learning-rate). Validate each against your training harness. Public test cases check the listed edge cases, not gradients or the hidden grader, so keep your own tests beside each solution.

  • Decoder-Only Transformer Stack - Reliable TrainingRoadmap-Final · support

    Use the existing training, resume and arithmetic contracts as the small controlled system. Add stored evidence for data, numerical, state and throughput failure injections.

  • PyTorch 2.14 - AMP Examples and ProfilerPyTorch · reference

    AMP examples: Gradient clipping and Gradient accumulation, including effective-batch scale updates and skipped optimizer steps. Profiler reference: record_function, schedule and memory capture. Use with PyTorch 2.14.1.

  • Python - Atomic Replacement and File SynchronizationPython Software Foundation · reference

    Read os.replace and os.fsync for the local single-file publication extension. Atomic visibility is not a power-loss durability guarantee. Page read 2026-10-16.