Long-lived
持续数周;checkpoint 只离散保存部分状态。
AEGIS · SDCHunter · OpGuard
从真实事故、技术机制到分布式系统方法论
一个长期运行、同步推进、每一步都依赖上一步状态的
distributed optimization process
持续数周;checkpoint 只离散保存部分状态。
成百上千设备共同决定一个 logical step 的结果。
一个错误 update 会污染后续 parameter、optimizer 和 checkpoint。
训练轨迹是一个跨模型、软件、通信与硬件的分布式状态机。
bad sample · wrong mask · optimizer / routing policy
OpGuard Bug 14: MoE routing drift ← histogram-bin mismatchoverflow · precision change · reduction associativity
OpGuard Bug 10: different NCCL topology ← different FP reduction treerace · stale buffer · missing barrier · bad fusion
OpGuard Bug 1 / 18: embedding race / Triton missing barriercollective order · rank mapping · async dependency
OpGuard Bug 4 / 17: stream race / activation-offload stream misuseDUE · HBM / compute corruption · defective GPU
AEGIS: matrix-unit fault + HBM bit flip without ECC signalmixed version · data cursor · missing durable state
OpGuard Bug 20: resume divergence ← optimizer step variable overwrite同一个 loss spike 可以来自其中任何一层。
Silent Data Corruption
数据被非预期改变,但改变发生时没有 error signal。
“silent”描述的是 corruption point,不是说运行永远没有后续症状。
| Term | At fault time | Possible outcome |
|---|---|---|
| DUE | hardware / software detects unrecoverable error | abort, reset, explicit failure |
| SDC | bad value escapes without signal | wrong update, later NaN, shape error, crash |
| Software bug | may be detected or silent | can look identical to SDC |
| Numerical variation | often expected | may be benign or amplify a real fault |
Seen: grad-norm alert after >3,000 steps, at different steps across reruns.
Origin: a race in fused embedding backward changed only a few rows.
OpGuard Bug 1 · manual 5 days → reported 15 minSeen: periodic wrong positions in a GEMM output.
Origin: matrix-core MMA on one execution unit; vector-core execution stayed correct.
AEGIS Case 1 · workload-specific hardware faultSeen: forward activation and backward read no longer matched.
Origin: one bit in a saved fp32 intermediate changed; ECC did not fire.
可见症状、corruption point、root-cause class 是三件不同的事。
Paper-reported cases: OpGuard §6.2 / Table 2; AEGIS §7.6.
Paper cases: grad-norm alert after 3,000+ steps ← embedding-backward race (OpGuard Bug 1);shape mismatch about 30 ops later ← one-bit scatter SDC (OpGuard Bug 12);resume divergence ← optimizer-step state overwrite (OpGuard Bug 20)。
loss 和 gradient norm 适合报警,不适合归因。
坏值数十个 op 或数千 step 后才可见。
Bug 1: backward race,后续 forward 才出现症状少数 float 被 aggregation 与低精度 metric 掩盖。
Bug 1 / 16: only a few gradient entries changed健康重跑也可能因 reduction / schedule 不同而变化。
Bug 10: NCCL topology changed accumulation order一次 rerun 占用大规模集群,可尝试实验很少。
OpGuard cases report 3–14 day manual investigationsfault 依赖 input、unit、placement 和 pressure。
SDCHunter: observed replay rate 100% → 10⁻⁶%同步、dump、缩模型、换卡可能让 bug 消失。
OpGuard: heavy tensor dump made stream races harder to reproduce“机器看起来没问题”
不是可消费的结论。
系统团队不能证明一个无限的 negative;能做的是缩小 claim,并交付可审计证据。
报错行可能完全正确。
坏状态早已在上游产生。
Determinism is an observability substrate.
它把“感觉训练不对”变成 oracle violation;
但还没有自动回答 hardware or software?
Fix: input + implementation + launch
Expect: bitwise-identical output
Use: AEGIS local replay
Fix: checkpoint + data + RNG + layout + communication
Expect: same training trajectory
Use: SDCHunter exact replay
Fix: durable state + post-restart execution plan
Expect: resumed step = uninterrupted step
同一 token 的结果不依赖 batch position / composition。
Example: DeepSeek-V4 kernel design.
不同 kernel、fusion、framework 在共享 semantic boundary 产生相同 tensor。
Example: OpGuard.
MAI-Thinking-1 展示的是更完整的 data、checkpoint、kernel、collective 和 restart contract。先说清 scope,才有资格讨论 exactness。
algebraic identity
self-equivalence
peer majority
known-good run
把 tensor dump 压成可在线记录的 compact evidence。
从 operator、recompute chain、PP tensor 到 model-level op。
sample、coarse-to-fine、pipeline bubble、offline replay。
Our synthesis. These are overlapping operating modes, not three mutually exclusive pipeline stages.
当前正在运行的 job,某个受保护计算是否发生了 silent corruption?
cheap sensing on-path · definitive verification off-path
bf16 output 求 checksum,round-off noise 会淹没小 corruption;fp32 accumulator 累积 checksum,再与代数等价路径比较;1ᵀdV = 1ᵀdO;方法论:checker 必须理解数值路径;“加一个 checksum”并不自动可靠。
forward activation 与 backward recomputation 本就执行同一逻辑;比较 XOR fingerprint。
deterministic chain 只在末端观察,仍覆盖链内 corruption,减少 vTask。
优先使用 PP bubble;step 尾部只留固定小 time slice,并动态调整 sampling。
AEGIS 也抓到过 framework 越界写造成的 SDC-like mismatch:exact mismatch 不是硬件分类器。
一个已知 faulty GPU 的 corruption 落在 Transformer backbone 外;轻量 elementwise / 未保护区域仍可能漏。
Paper-reported deployment results; not independently reproduced.
loss spike、NaN、shape error 或 fail-stop,究竟是不是坏卡?是哪张物理 GPU?
exact-workload replay · group first · device later
同一 checkpoint 的 spike 可以出现在完全不同 step;“这次没复现”几乎不构成反证。
不要先做 minimal reproducer。
先保存 the workload that made the fault observable.
model · checkpoint · data window · RNG · operator sequence
parallel layout · rank mapping · physical device · topology
memory footprint · overlap · communication order · timing-sensitive behavior
缩模型、换卡、加同步、dump 全 tensor,都可能“修好”这个 bug。
健康系统应产生
bitwise-aligned trace
关键系统选择:先恢复昂贵 job,再离线完成 device-level diagnosis。
至少一个 replica 健康;两副本无 majority 时,引入第三个 spare healthy replica。
只在缩小后的 group 做 fine-grained replay;framework 知道 tensor ownership 与 rank placement。
vendor diagnostics + 反复重放 alert-triggering trace,给出 hardware-actionable evidence。
Pathological limit: identical correlated corruption across all replicas cannot be resolved by consensus.
方法论:恢复服务与完成根因诊断,是两个不同 SLO。
suspect 与 reference execution,第一次不再实现相同语义计算的位置在哪里?
semantic boundaries · schedule-tolerant alignment · certified prefix
Root cause: racy embedding backward.
Fault 在前一步 backward;症状在后续 forward。
Root cause: different NCCL topology.
Reduction tree 是 numerical contract 的一部分。
Root cause: one-bit scatter SDC.
Forward token misroute,约 30 ops 后才报错。
Root cause: optimizer-step variable overwrite.
Checkpoint / restart state 属于 correctness contract。
Representative cases from OpGuard Table 2; debugging times are engineer estimates reported by the paper.
比较的是 model-level materialized tensors,不是 kernel identity。
编译、fusion、kernel schedule 可以不同;只要 boundary-to-boundary transformation 遵守同一 numerical contract。
对 input / output tensor 做 scale-independent XOR hash;不复制完整 tensor。
probe 放在 operator 自己的 stream 和 dependency graph 上,不增加 global synchronization。
operator · rank · stream · callsite · shape · dtype · local timestamp。
固定 data / RNG / kernel choice / numeric mode / collective order,消除 comparison noise。
不强制全局 deterministic scheduler;race、missing sync、未初始化内存如果改变输出,就是待测系统的 evidence。
Anchors: 先用高置信事件切窗口。
Banded DP: 容忍 overlap、fusion、local reorder。
Pivot p*: first mismatching aligned boundary。
| Mode | When | Boundary coverage | Reported overhead |
|---|---|---|---|
| Online SDC | continuous | sparse communication boundaries | 1.00–1.01× |
| Trusted | reactive default | skip small allowlist of trusted primitives | 1.25–1.45× |
| Full | difficult cases | every available operator boundary | 1.78–1.94× |
区别不只在“能抓什么错”,而在 boundary × reference × output × budget。
compute / recompute boundaries
cheap sensing → deferred confirmation
sparse communication boundaries
fingerprint inconsistency → suspect machine
loss spike · NaN · shape error · crash
or another detector's alert
Phase 1: incident-triggered deterministic replay at PP communication signatures → suspicious group.
Phase 2: layer-wise signatures → first bad tensor → physical GPU.
Compare suspect and reference runs at model-level semantic boundaries → certified identical prefix → first divergent operator.
Our synthesis: compatible branches, not a mandatory sequence. SDCHunter Phase 1 and OpGuard online both observe communication boundaries, but at different times and for different outputs.
Shared assumptions create shared blind spots.
两个健康执行其实没有遵守同一 comparison contract:
Result: exact mismatch 是真的,但不能归因于 software bug 或 hardware SDC。
Result: clean replay 只覆盖当前 observation setup,不是全局“系统无错”证明。
Useful redundancy requires different failure modes—not merely more copies of the same comparison.
明确 fixed state、allowed variation、numerical policy;不要笼统说 deterministic。
checkpoint 之外,还保存 input window、placement、comm plan、kernel choices 和 alert context。
先 group / boundary,再 tensor / kernel;把昂贵观察移出 critical path。
mismatch、software bug、hardware defect、repair decision 是四层结论。
复现失败可能是 rate 太低,也可能是诊断改变了 workload。
algebraic、self-equivalent、cross-device、known-good、vendor diagnostic 交叉佐证。
| All three | Yun Zhang, Shuguang Wang |
| SDCHunter ↔ AEGIS | 6 shared authors |
| SDCHunter ↔ OpGuard | 5 shared authors |
| AEGIS ↔ OpGuard | 3 shared authors |
fixed-layout bitwise
restart / reshard
versioned numerical policy
data cursor + RNG + FP8
optimizer causal state
comm plan + rank map
PP / TP / CP / EP signatures
semantic taps in fused MoE
async fingerprinting
CI / always-on / replay policy
alert-triggering evidence bundle
independent confirmation
预训练可靠性不是“模型训练 + 一些监控”,
而是分布式系统的 correctness engineering。
| Next / previous | → ← · Space · PgUp/PgDn |
| Overview | O |
| Speaker notes | N |
| Fullscreen | F |
| First / last | Home / End |
| Print to PDF | browser print, landscape, no margins |