Skip to content
AI.info

Training and optimization

Monitoring Training Runs and Making Stop/Continue Decisions

Design phase-aware monitoring, escalation rules, and decision records that distinguish recoverable training noise from wasted or invalid compute.

By the end you can

A dashboard is evidence, not a verdict

At hour fourteen, validation loss rises while training loss keeps falling. The GPUs stay busy, but throughput has dropped and gradient norms oscillate after a data refresh. Wait, restart, or terminate?

No single chart answers that. Useful monitoring ties several signals to the current training phase, the known failure modes, the remaining budget, and a decision policy written down in advance. The rest of this lesson works from runs whose operators published their telemetry and the decisions they took on it: PaLM's twenty loss spikes, OPT-175B's restart chronicle, the 466 interruptions Meta counted in a 54-day window of Llama 3 405B pre-training, and the alarm statistics hospitals and federal investigators have collected on what happens to a monitoring channel nobody trusts.

Monitoring becomes valuable only when signals lead to defensible actions.

Case

A loss spike that needed the batch and the parameter state together

Twenty loss spikes, with the standard guardrail already switched on. That is what the largest PaLM model did during training — “a 540-billion parameter, densely activated, Transformer language model” running on “6144 TPU v4 chips”. Chowdhery and colleagues report it in one sentence: “For the largest model, we observed spikes in the loss roughly 20 times during training, despite the fact that gradient clipping was enabled.”

The remedy was procedural rather than architectural. The team restarted “from a checkpoint roughly 100 steps before the spike started, and skipped roughly 200–500 data batches”. After that, “the loss did not spike again at the same point”.

That result invites an obvious reading: bad data. The same section rules it out. “We do not believe that the spikes were caused by “bad data” per se, because we ran several ablation experiments where we took the batches of data that were surrounding the spike, and then trained on those same data batches starting from a different, earlier checkpoint. In these cases, we did not see a spike. This implies that spikes only occur due to the combination of specific data batches with a particular model parameter state.”

The operational content is in that last sentence. The failure is not a property of the batch. It is not a property of the weights. It is a property of the pair. A diagnosis that inspects only one of them will not reproduce the incident, and a fix aimed at only one of them cannot be shown to have worked. The team could say this at all only because it re-ran the suspect batches against an earlier checkpoint. That is an experiment, not a longer look at the chart.

Example

Dashboards that invite the wrong conclusion

These patterns look familiar, and each needs context before action. The cost of skipping that context has been measured.

An early-warning score in daily hospital use scored far worse when somebody else checked it. Epic's proprietary Sepsis Model was validated externally at Michigan Medicine across 27,697 patients and 38,455 hospitalizations. Wong and colleagues reported a hospitalization-level AUC of 0.63 (95% CI, 0.62–0.64) in JAMA Internal Medicine in 2021. The vendor had reported 0.76–0.83. The headline number was not the deployed number, and the operational consequence was counted rather than described: “The ESM also did not identify 1709 patients with sepsis (67%) despite generating alerts for an ESM score of 6 or higher for 6971 of all 38 455 hospitalized patients (18%), thus creating a large burden of alert fatigue.”

A second, independent validation covered 145,885 emergency-department encounters at two county EDs. It measured a sensitivity of 14.7% within a six-hour window. A monitor that alerts on 18% of admissions and misses two-thirds of the cases it exists to catch is a dashboard reading, not a verdict.

  • Warmup confusion: A slowly improving loss is labeled underfitting even though the learning rate has not reached its planned range.
  • Validation whiplash: A small validation set causes noisy swings, leading the team to select whichever checkpoint looks best by chance — the same selection pressure that lets a vendor-reported AUC of 0.76–0.83 arrive as 0.63 somewhere else.
  • Throughput illusion: Examples per second stays constant while sequence length falls, hiding reduced useful work per update.
  • Clipping blindness: Stable loss conceals the fact that nearly every step is clipped, so the intended optimizer dynamics never occur — PaLM's spikes happened with clipping enabled, so the reverse inference is unsafe too.
  • Slice averaging: Aggregate recall improves while the rare safety-critical slice deteriorates below its launch requirement. Buolamwini and Gebru audited three commercial gender classifiers on the Pilot Parliaments Benchmark in 2018. Overall accuracies of 87.9%–93.7% concealed a maximum error rate of 34.7% for darker-skinned females against 0.8% for lighter-skinned males. Darker females were 21.3% of the benchmark and 61.0%–72.4% of all classification error. Their own verdict on the headline metric: “The overall gender classification accuracy results show the obfuscating nature of single performance metrics.” NIST later ran 18.27 million images of 8.49 million people through 189 algorithms from 99 developers and found false positive rates varying across demographics by factors of 10 to beyond 100.

Visual

Five layers of evidence during a training run

A healthy top-line metric can hide failure lower in the stack. The bottom layer, resource and system health, is the one whose failure rate has actually been published.

In a 54-day window of Llama 3 405B pre-training, on up to 16,384 H100 GPUs, Meta's team counted every interruption: “During a 54-day snapshot period of pre-training, we experienced a total of 466 job interruptions. Of these, 47 were planned interruptions due to automated maintenance operations such as firmware upgrades or operator-initiated operations like configuration or dataset updates. The remaining 419 were unexpected interruptions, which are classified in Table 5.” Approximately 78% of the unexpected interruptions were attributed to confirmed or suspected hardware issues. GPU issues alone accounted for 58.7%; faulty GPUs, 148 events (30.1%); GPU HBM3 memory, 72 events (17.2%). The run still achieved higher than 90% effective training time.

That is a hardware interruption roughly every three hours, and not one of them is visible in a loss curve. Nor is it one company's bad luck. ByteDance's MegaScale team reports a production run of a model with hundreds of billions of parameters, on more than 10,000 GPUs, lasting several weeks. Training was restarted over 100 times.

Read the five layers with that base rate underneath them. Resource and system health carries throughput, memory, communication, I/O, checkpoint time and hardware errors. Data delivery carries batch composition, freshness, augmentation rates, masks, labels and duplicate or corrupt records. Numerical health carries finite losses, gradient scale, overflow, underflow, clipping and parameter statistics. Optimization behavior carries training loss, update-to-weight ratios, learning-rate phase and gradient noise. Generalization evidence carries validation metrics, slices, calibration and behavior on reserved examples. The upper four are all being sampled on top of a substrate that, on two published clusters, fails on a schedule of its own.

FigureLayers · 5 layers
  1. 01

    Resource and system health

    Throughput, memory, communication, I/O, checkpoint time, and hardware errors.

  2. 02

    Data delivery

    Batch composition, freshness, augmentation rates, masks, labels, and duplicate or corrupt records.

  3. 03

    Numerical health

    Finite losses, gradient scale, overflow, underflow, clipping, and parameter statistics.

  4. 04

    Optimization behavior

    Training loss, update-to-weight ratios, learning-rate phase, and gradient noise.

  5. 05

    Generalization evidence

    Validation metrics, slices, calibration, and behavior on reserved examples.

Comparison

Continue, intervene, or terminate

The action should follow from diagnosis and recoverability, not from impatience.

Continue when signals remain inside expected phase-specific ranges: loss follows the anticipated schedule, validation evidence has not invalidated the run, resources remain within budget, and no data or numerical contract is broken.

Intervene when the run may be recoverable without invalidating its evidence — a transient dataloader slowdown, for instance. Inspect before changing semantics. Preserve a decision log. Remember that ad hoc changes create a new experiment. PaLM's spike handling is the intervention done properly: a restart “from a checkpoint roughly 100 steps before the spike started, and skipped roughly 200–500 data batches”, and then an ablation to establish what had actually gone wrong. The restart was a diagnosis rather than a hope.

Terminate when continuing cannot produce trustworthy or worthwhile evidence: leakage or corrupt targets, persistent non-finite state, or an exhausted budget with no credible path. The first action on termination is to preserve artifacts before shutdown. The OPT and Llama 3 numbers below exist only because somebody kept the record.

FigureComparison · 3 columns

Continue

Signals remain inside expected phase-specific ranges.

  • Loss follows the anticipated schedule
  • Validation evidence has not invalidated the run
  • Resources remain within budget
  • No data or numerical contract is broken

Intervene

The run may be recoverable without invalidating its evidence.

  • Example: transient dataloader slowdown
  • Action: inspect before changing semantics
  • Requirement: preserve a decision log
  • Risk: ad hoc changes create a new experiment

Terminate

Continuing cannot produce trustworthy or worthwhile evidence.

  • Examples: leakage or corrupt targets
  • Examples: persistent non-finite state
  • Examples: exhausted budget with no credible path
  • Action: preserve artifacts before shutdown

Analogy

When one sensor drives an automated system and every alert arrives at once

One reading drove an automated response, and two aircraft went down. Lion Air flight 610 killed 189 people on 29 October 2018. Ethiopian Airlines flight 302 killed 157 on 10 March 2019. The FAA's own return-to-service summary lists as Safety Item #1: “Erroneous data from a single AOA sensor activated MCAS and subsequently caused airplane nose-down trim of the horizontal stabilizer.” Boeing's corrective action was to update the Flight Control Computer software “to eliminate MCAS reliance on a single AOA sensor signal by using both AOA sensor inputs”.

The crews were not short of information. They had too much of it arriving simultaneously — multiple flight-deck alerts at once. In September 2019 the NTSB stated that it was concerned, on preliminary information, that the accident pilots' responses to unintended MCAS operation were not consistent with the assumptions about pilot recognition and response that Boeing used, based on FAA guidance, in its flight control system functional hazard assessments. Of its recommendations A-19-10 through A-19-16, two ask for diagnostic tools that improve the prioritization and clarity of failure indications when multiple flight-deck alerts are present: A-19-15 and A-19-16.

That is the training-run problem in another domain. One input trusted further than it earned, and a console that presents every alert at once with no ranking and no procedure attached. The NTSB did not recommend that pilots look harder. It recommended that the indications be prioritized in advance. That is what a written stop/continue policy is, and it is why the policy has to exist before hour fourteen rather than during it.

A reliable decision combines state, trend, phase, consequence, and recoverability.

The decision log turns a run into organizational memory

Record the observation, the competing explanations, the action, the owner, the timestamp, and the evidence expected next. That makes a later postmortem more informative than a folder of charts. Across projects it also exposes repeated patterns: teams that routinely ignore clipping, stop too late, or compare runs after changing several variables at once.

The OPT-175B team published its own notes, which is rarer than it sounds. The paper reports that “hardware failures contributed to at least 35 manual restarts and the cycling of over 100 hosts over the course of 2 months”, alongside an estimated “70+ automatic restarts due to hardware failures”. The team's public chronicle, posted on 7 January 2022, puts the total higher still: “These notes cover ~90 restarts over the course of training the lineage of this current model”. The same document records the background rate in a parenthesis, “~2 machines go down every day”.

Thirty-five manual restarts in the paper, about ninety in the logbook. The two figures cover different scopes, and only the existence of the logbook makes that distinction visible at all. None of it appears in a loss curve. It survives because somebody wrote it down while it was happening.

Good monitoring preserves the reasoning behind interventions, not only the telemetry that preceded them.

An alert without an owner and action is decoration

Static thresholds often fire during normal phase changes — warmup, evaluation, checkpointing, batch-length variation. Repeated false alarms teach operators to ignore the system. Hospitals have measured that base rate, and then measured what ignoring it costs. The Joint Commission's Sentinel Event Alert 50, dated 8 April 2013, states: “It is estimated that between 85 and 99 percent of alarm signals do not require clinical intervention, such as when alarm conditions are set too tight; default settings are not adjusted for the individual patient or for the patient population; ECG electrodes have dried out; or sensors are mispositioned.” A direct measurement agrees with the estimate. Drew and colleagues logged 2,558,760 unique alarms across 77 ICU beds and 461 patients in 31 days, and found that “88.8% of the 12,671 annotated arrhythmia alarms were false positives.”

The consequence is recorded in the same alert. Between January 2009 and June 2012 the Joint Commission's Sentinel Event database recorded 98 alarm-related events. Eighty resulted in death, 13 in permanent loss of function and five in extended care. Among the contributing factors it counts “Alarm signals inappropriately turned off (36)”. Muting is the rational response of an operator facing a channel that is wrong most of the time. It is also how the channel kills someone.

Every alert should therefore name its scope, persistence rule, owner, diagnostic link, and permitted response. A phase-blind threshold on a training run is the same instrument. It will be right occasionally, wrong constantly, and eventually switched off by the person it was built to protect.

Alerts should encode operational knowledge, not merely expose raw metrics.

Visual

Run a structured training review

A review should be short enough to repeat and rigorous enough to change a decision. Six steps.

First, confirm identity: run ID, code, data snapshot, configuration, and current phase. Second, check hard invariants: finite values, data contracts, masks, synchronization, and checkpoint integrity. Third, compare with expectation using baseline bands and prior runs rather than an isolated visual impression — PaLM's ablation is what this looks like done properly, the suspect batches replayed from an earlier checkpoint to find out whether the data or the pair was to blame. Fourth, inspect the slices linked to the intended use rather than the aggregate. Overall accuracy of 87.9%–93.7% was compatible with a 34.7% error rate on one subgroup, and an AUC of 0.63 was compatible with alerting on 18% of hospitalizations while missing 67% of the cases. Fifth, estimate remaining value, comparing plausible improvement with time, money, and opportunity cost. Sixth, record the decision — continue, intervene, or terminate — with its evidence and the next review trigger.

FigureProcess · 6 steps
  1. 1. Confirm identity

    Verify run ID, code, data snapshot, configuration, and current phase.

  2. 2. Check hard invariants

    Inspect finite values, data contracts, masks, synchronization, and checkpoint integrity.

  3. 3. Compare with expectation

    Use baseline bands and prior runs rather than an isolated visual impression.

  4. 4. Inspect meaningful slices

    Review the examples and subgroups linked to the intended use.

  5. 5. Estimate remaining value

    Compare plausible improvement with time, money, and opportunity cost.

  6. 6. Record the decision

    Write continue, intervene, or terminate with evidence and the next review trigger.

Automate invariants before automating judgment

Non-finite values, missing batches, corrupt checkpoints and hard budget limits are strong candidates for automatic handling. Ambiguous validation changes or rare-slice tradeoffs usually need a human review. Two published frontier-training operations drew that boundary in almost the same place and, unusually, measured where it fell. MegaScale reports: “With the robust training framework, over 90% of software and hardware faults are automatically identified and fixed by the techniques detailed in §4. The rest of the problems are handled with the help of the troubleshooting tools described in §5.” On the Llama 3 side the human residue is smaller still. Across the 419 unexpected interruptions in those 54 days, “Despite the large number of failures, significant manual intervention was required only three times during this period, with the rest of issues handled by automation.”

Notice what was automated in both cases. It is detection, isolation and restart — MegaScale's robust training framework with heartbeat-based anomaly detection and diagnostic tests, Meta's automated handling of interruptions. It is not the judgment about whether the run remains worth finishing. Three human decisions across 419 unexpected interruptions is the target ratio, and it is reachable only because the rest were invariant violations with a defined response.

Automation should also fail safely and preserve state. An automatic stop that deletes evidence, or restarts with changed semantics, can make diagnosis harder than the original incident. It also destroys exactly the record that let the Llama 3 and OPT teams publish their numbers at all.

Use machines for reliable guardrails and people for consequential ambiguity.

Key takeaways