读见

在 Amazon SageMaker HyperPod 上检测并恢复静默数据损坏 | Amazon Web Services

原题Detecting and recovering from silent data corruption on Amazon SageMaker HyperPod | Amazon Web Services

约 30 分钟约 7,266 字原文英文已翻译

推荐理由AWS 将梯度检查、重放审计与权重指纹用于发现静默数据损坏,并连接到故障节点恢复。训练团队可学习怎样识别看似正常却已经污染结果的硬件错误。

读前速览

3 个要点

本文介绍了一套用于检测和恢复分布式训练中静默数据损坏(SDC)的三步策略,包括非有限梯度检查、环形重放审计和权重指纹比对,并将这些机制集成到 SageMaker HyperPod 环境中。

  1. 静默数据损坏(SDC)是分布式训练中的一种严重故障模式:硬件会返回错误数值,却不发出错误标记,导致梯度和权重遭到破坏。

    与会触发错误代码的常见硬件故障不同,SDC 表现为细微但错误的计算结果(例如 4.0001 而不是 4.0000),并会在网络中传播。由于硬件不会报告故障,标准监控工具和 ECC 检查都无法发现问题,因此必须直接验证计算输出是否正确。

  2. 该解决方案在训练循环中集成了三种不同的检查机制来检测 SDC:非有限梯度检查、环形重放审计和权重指纹比对。

    非有限梯度检查会标记本地梯度中的 NaN 或 Inf,以发现明显异常值。环形重放审计则让每个 GPU 重新计算来自另一个节点的微批次,并比对计算结果,以发现有限但错误的数值。权重指纹比对可确保所有副本上的最终模型权重保持一致,从而捕获优化器步骤或权重存储过程中发生的错误。

  3. 检测到故障后,系统会将问题定位到具体的 GPU 节点,隔离故障硬件,并启动恢复流程。

    确定可疑 rank 后,系统会利用 Kubernetes 元数据将其映射到对应的物理主机(节点)。随后,系统会隔离故障节点,以防止数据继续损坏,并通过诊断检查验证其健康状况。如果确认节点存在故障,系统就会将其替换,并从干净的检查点重新启动训练任务。

完整摘要

静默数据损坏(SDC)是指硬件返回错误但看似合理的数值,却不触发任何错误,可能导致训练任务功亏一篑。本文介绍了一种解决方案,将三项检测机制嵌入 PyTorch DDP 训练循环:识别非有限梯度、审计微批次重放,以及比对权重指纹。检测到故障后,系统会将问题定位到具体的 GPU 节点,隔离数据损坏,并通过 SageMaker HyperPod 启动节点更换流程。

目录 · 29 节

查看原文

静默数据损坏(SDC)是指硬件(例如 GPU)返回一个错误但看似合理的数值,却不报错。在分布式训练中,这个错误数值可能会传递到每个副本的梯度和权重中。损失值可能数小时看起来都正常,而等团队发现无法解释的偏离或模型性能变弱时,计算资源已经消耗殆尽。大规模训练中确实会发生这种情况:在使用多达 16K 块 H100 GPU 进行为期 54 天的 Llama 3 405B 预训练期间,Meta 将 419 次意外作业中断中的 6 次归因于静默数据损坏;而这仅包括那些导致作业中断、且经追查确认由 SDC 引起的情况。Silent data corruption (SDC) happens when hardware, such as a GPU, returns a wrong but plausible number and raises no error. In distributed training, the wrong number can flow into the gradients and weights of every replica. Loss can still look normal for hours, and by the time a team notices an unexplained divergence or a weaker model, the compute is spent. It happens at scale: during a 54-day period of Llama 3 405B pre-training on up to 16K H100 GPUs, Meta attributed 6 of 419 unexpected job interruptions to silent data corruption, and those were only the cases that interrupted the job and were traced to SDC.

Amazon SageMaker HyperPod 已经能够替换报告故障的节点:健康监控代理会监测 GPU 错误,深度健康检查会对节点进行压力测试,自动节点恢复则会更换有问题的硬件。SDC 能绕过所有这些功能,因为硬件从未报告任何问题。检测必须由训练任务本身来完成。Amazon SageMaker HyperPod already replaces nodes that report a fault: the health-monitoring agent watches for GPU errors, deep health checks stress-test nodes, and automatic node recovery swaps out bad hardware. SDC slips past all of these features, because the hardware never reports anything. Detection has to come from the training job itself.

在这篇文章中,我们为 PyTorch DistributedDataParallel (DDP) 训练循环添加了三项检查,以检测 SDC。检查触发时,我们会将可疑 rank 定位到对应节点,遏制数据损坏,并由 SageMaker HyperPod 替换该节点。每项检查针对故障可能发生的不同位置:In this post, we add three checks to a PyTorch DistributedDataParallel (DDP) training loop to detect SDC. When a check fires, we map the suspect rank to its node, contain the corruption, and have SageMaker HyperPod replace the node. Each check covers a different place where a fault can land:

  1. 非有限值梯度检查可在问题发生的当步捕获 GPU 前向或反向传播中的 NaN、Inf 和溢出,以及梯度全归约引入的 NaN 或 Inf。
    A non-finite gradient check catches NaN, Inf, and overflow in a GPU’s forward or backward pass, on the step it happens, and NaN or Inf that the gradient all-reduce introduces.
  2. 环形重放审计能够捕获有限但错误的数值。在审计步骤中,每个 GPU 都会从另一个节点重新计算一个微批次,并逐位比较损失值、通过指纹比较梯度。
    A ring replay audit catches finite wrong values. On audit steps, every GPU recomputes a micro-batch from another node and compares the loss bit for bit and the gradients by fingerprint.
  3. 通过在更新后比较每个副本的权重,权重指纹比较可以检测优化器步骤和存储权重中的损坏。
    A weight fingerprint comparison catches corruption in the optimizer step and in stored weights, by comparing every replica’s weights after the update.

我们在一个包含 4 个 ml.p5.48xlarge 实例(共 32 块 NVIDIA H100 GPU)的 SageMaker HyperPod 集群上,通过软件注入故障对这些检查进行了测试;此外,我们还在三个实例上重复了每项测试,这是这些检查所需的最少实例数。该解决方案的完整代码可在随附的 GitHub 代码库中获取。We tested the checks with software-injected faults on a SageMaker HyperPod cluster with 4 ml.p5.48xlarge instances (32 NVIDIA H100 GPUs), and repeated every test on three instances, the minimum the checks need. The full code of this solution is available in the accompanying GitHub repository.

静默数据损坏是如何发生的,以及为什么常规检查会漏掉它How silent data corruption happens and why the usual checks miss it

SDC 源于制造缺陷(漏过供应商筛选的性能临界晶体管),以及特定计算单元中的硅老化;该单元通常是张量核心中的乘加通道,而这正是模型训练时会反复重压的硬件。这个性能临界电路大多数时候都能正确计算,但只会在高温、电压骤降或特定操作数模式等压力条件下出错。由于算术逻辑通路没有 ECC 或奇偶校验(与内存不同),错误结果(例如 4.0001 而不是 4.0000)永远不会被标记出来,并会经由激活值和梯度传播到每个副本的权重中。SDC comes from manufacturing defects (marginal transistors that slip past vendor screening) and silicon aging in a specific compute unit, most often a multiply-accumulate lane in a tensor core, which is exactly the hardware model training hammers. That marginal circuit computes correctly most of the time and wrong only under stress: high temperature, voltage droop, or specific operand patterns. Because the arithmetic logic path has no ECC or parity (unlike memory), the wrong result, say 4.0001 instead of 4.0000, is never flagged, and it flows through activations and gradients into every replica’s weights.

之所以很难发现,是因为 SDC 位于计算路径中,而你现有的每项完整性检查保护的都是不同的边界:The reason it is so hard to catch is that SDC is in the compute path, and every integrity check you already have guards a different boundary:

Check What it guards Why it misses SDC
ECC memory Catches bit flips in memory, not wrong math. There is no ECC on a tensor-core result.
Xid errors (NVRM) GPU driver/hardware faults The GPU raises an Xid when it detects a fault. SDC by definition raises none, so nothing lands in /aws/sagemaker/Clusters/ HMA logs.
DCGM deep health check hardware faults Misses defects that need your workload’s operands, thermal state, or timing. Runs on an idle node, outside your job.
NVLink / PCIe / EFA checksums transport Verify bytes arrived as sent, not that they were computed correctly.
Checkpoint checksums storage round-trip A poisoned-but-consistent checkpoint checksums fine.

捕获 SDC 的方法是检查计算本身的结果。The way to catch SDC is to check the result of the computation itself.

解决方案概述Solution overview

该循环包含四个步骤。你的训练作业负责前两个步骤,后两个步骤则使用 Kubernetes 和 SageMaker HyperPod 功能:The loop has four steps. Your training job does the first two, and the last two use Kubernetes and SageMaker HyperPod features:

步骤 1. 检测:训练循环中的三项检查通过比较数据并行副本来识别可疑 GPU。Step 1. Detect: Three checks in your training loop name a suspect GPU by comparing data-parallel replicas.

步骤 2. 定位:在由 Amazon Elastic Kubernetes Service (Amazon EKS) 编排的 SageMaker HyperPod 集群中,Kubernetes 节点名称包含实例 ID,因此只需查询即可将可疑 rank 映射到节点。Step 2. Localize: On SageMaker HyperPod clusters orchestrated by Amazon Elastic Kubernetes Service (Amazon EKS), the Kubernetes node name contains the instance ID, so mapping a suspect rank to a node is a lookup.

步骤 3:遏制并关联分析:停止作业,将节点设为不可调度状态,并在 SageMaker HyperPod 可观测性仪表板中查看其 GPU 指标。Step 3. Contain and correlate: Stop the job, cordon the node, and look at its GPU metrics in the SageMaker HyperPod observability dashboards.

步骤 4:确认并恢复:当警报含义不明确时进行确认,审核后替换节点,并从可疑时间窗口之前保存的检查点恢复。Step 4. Confirm and recover: Confirm when the alarm is ambiguous, replace the node after review, and resume from a checkpoint saved before the suspect window.

Architecture of a SageMaker HyperPod EKS cluster with three p5 nodes where node 1 raises an SDC alarm for rank 13 and the recovery steps replace it

图 1:一个 SageMaker HyperPod EKS 集群,包含三个运行训练 Pod 和 SDC 检查的 p5 节点。节点 1 针对 rank 13 发出告警,建议的步骤是将该节点设为不可调度、检查 GPU 指标、更换该节点并重启训练。Figure 1: A SageMaker HyperPod EKS cluster with three p5 nodes running training pods and SDC checks. Node 1 raises an alarm for rank 13, and the proposed steps cordon the node, check GPU metrics, replace it, and restart training

将循环看作由多层组成会更容易理解,每一层都增添了不同的内容:It helps to see the loop as layers, each adding something different:

Layer Source What it adds Catches truly silent SDC?
1. Non-finite gradient check Your training script Names a GPU whose local gradient is NaN or Inf, before the all-reduce, and stops the step if the reduced gradient is NaN or Inf Only faults that become NaN, Inf, or overflow
2. Ring replay audit Your training script Every GPU recomputes another node’s micro-batch and compares the loss bits and gradient fingerprints Yes, for finite compute-path faults that change the loss or a gradient, on audit steps
3. Weight fingerprint comparison Your training script Names a replica whose weights differ from a strict majority after the update Yes, for optimizer-step and stored-weight faults on one copy. Blind to compute-path faults and to sharded weights
4. Localization Your training script, using SageMaker HyperPod node names Maps a suspect rank to an instance ID from the Kubernetes node name n/a: it localizes
5. DCGM correlation HyperPod observability add-on The suspect GPU’s DCGM metrics around the alarm It confirms faults only where they also appear in hardware counters. Clean telemetry doesn’t clear a node.
6. Deep health check StartClusterHealthCheck (DCGM L4) An on-demand hardware diagnostic on the suspect node It catches hardware defects its own test patterns trigger. Triage, not proof
7. Repeat-offender history A query you build over retained alarms and telemetry Nodes that alarm repeatedly Partly: it surfaces nodes worth checking early

第 1 至第 3 层是唯一能够检测静默 SDC 的层,它们位于你的训练代码中。第 4 层会将它们的告警转换为实例 ID,而 HyperPod 各层则会佐证告警并形成闭环。Layers 1–3 are the only layers that detect silent SDC, and they live in your training code. Layer 4 turns their alarm into an instance ID, and the HyperPod layers corroborate the alarm and close the loop.

前置条件Prerequisites

要跟着操作,你需要:To follow along, you need:

  • 由 Amazon EKS 编排的 SageMaker HyperPod 集群,至少包含三个 GPU 节点。环形审计对其判定的每项比较都需要三个不同的节点;权重比较则需要每个权重的三个副本,才能找出其中不同的那个。请参阅《使用 Amazon EKS 编排 SageMaker HyperPod 集群》。
    A SageMaker HyperPod cluster orchestrated by Amazon EKS, with at least three GPU nodes. The ring audit needs three different nodes for every comparison it settles, and the weight comparison needs three copies of each weight to name the odd one out. See Orchestrating SageMaker HyperPod clusters with Amazon EKS.
  • 一个 PyTorch DDP 训练作业,其中每个副本都会独立执行优化器步骤,并且数据流水线能够重建任意 rank 在指定步骤中的微批次,例如使用带种子的采样器。
    A PyTorch DDP training job in which every replica runs its own optimizer step, with a data pipeline that can rebuild any rank’s micro-batch for a given step, such as a seeded sampler.
  • 检查点应存储在共享存储中,例如 Amazon FSx for Lustre 或 Amazon Simple Storage Service (Amazon S3)。替换节点会销毁其根卷和辅助卷,包括本地 NVMe 上的所有内容。
    Checkpoints on shared storage, Amazon FSx for Lustre or Amazon Simple Storage Service (Amazon S3). Replacing a node destroys its root and secondary volumes, including anything on local NVMe.
  • 关联步骤所需的 SageMaker HyperPod 可观测性附加组件。若要获取 ECC、NVLink 和节流计数器,请启用高级 DCGM 指标。
    The SageMaker HyperPod observability add-on for the correlation step. Turn on advanced DCGM metrics if you want ECC, NVLink, and throttling counters.
  • 通过 kubectl 访问集群,并拥有 sagemaker:StartClusterHealthCheck 和 sagemaker:BatchReplaceClusterNodes 的 AWS Identity and Access Management (IAM) 权限。请参阅“手动隔离、替换或重启节点”。
    Access to the cluster through kubectl, and AWS Identity and Access Management (IAM) permissions for sagemaker:StartClusterHealthCheck and sagemaker:BatchReplaceClusterNodes. See Manually quarantine, replace, or reboot a node.

步骤 1:在训练循环中通过三项检查进行检测Step 1: Detect with three checks in your training loop

数据并行会同时训练模型的多个副本。每个副本都在批次的不同切片上训练。每次反向传播后,都会通过全归约操作对各副本的梯度求平均值,然后每个副本都在 optimizer.step() 中应用这个相同的平均值。下面以学习率为 0.1 时,三个副本上的同一个权重为例:Data parallelism trains several copies of the model, called replicas, at the same time. Each replica trains on a different slice of the batch. After each backward pass, an all-reduce averages the replicas’ gradients, and every replica applies that same average in optimizer.step(). Here’s one weight across three replicas, with a learning rate of 0.1:

replica 0 replica 1 replica 2
weight at start 0.500 0.500 0.500 same
local gradient 0.20 0.40 0.30 different (different data)
averaged gradient 0.30 0.30 0.30 same, after the all-reduce
weight after step 0.470 0.470 0.470 same

局部梯度各不相同,因为每个副本看到的数据不同。而在优化器更新步骤之后,权重必须完全一致,逐位相同。Local gradients differ, because each replica sees different data. And after the optimizer step, the weights must be identical, bit for bit.

故障发生的位置决定了哪种检查能够发现它。如果副本 1 算出的本地梯度是 4.00,而不是 0.40,那么 all-reduce 会将这个错误传播到每个副本:三个副本都会应用同一个错误更新,而它们的权重仍然一致。只有副本 1 的本地梯度看起来不同,而且这种差异只会持续到 all-reduce 之前。相反,如果副本 1 在优化器步骤期间或之后篡改了某个权重,它的权重就会与其他副本不再一致。只有一种例外:如果某个副本的权重中出现 NaN 或 Inf,它会通过下一次 all-reduce 传播到每个副本,此后各副本又会重新一致。all-reduce 内部发生的故障也会以完全相同的方式传播到每个副本,例如某个 GPU 错误地累加了部分和。Where a fault lands decides which check can see it. If replica 1 computes a local gradient of 4.00 instead of 0.40, the all-reduce spreads that error to every replica: all three apply the same wrong update, and their weights still match. Only replica 1’s local gradient looked different, and only before the all-reduce. If instead replica 1 corrupts a weight during or after the optimizer step, its weights no longer match the others. There’s one exception: a NaN or Inf in one replica’s weights reaches every replica through the next all-reduce, and after that the replicas agree again. A fault inside the all-reduce itself, such as a GPU that adds a partial sum wrong, also reaches every replica identically.

因此,必须在优化器步骤之前捕获计算路径故障,此时还可以丢弃有问题的梯度;而更新过程中的故障或更新后存储权重中的故障,则必须在此后捕获。有限但错误的数值需要重新计算:比较各副本的梯度范数只能捕获 NaN 和 Inf(参见“为什么不比较本地梯度范数?”)。因此,每个训练步骤中,每个 DP rank 都要按固定顺序执行三项检查:So compute-path faults must be caught before the optimizer step, while the bad gradient can still be discarded, and faults in the update or in stored weights after it. Finite wrong values need recompute: comparing gradient norms across replicas catches only NaN and Inf (see Why not compare local gradient norms?). That gives three checks on every DP rank, in a fixed order within each training step:

  1. 非有限梯度检查——在 all-reduce 之前,标记本地梯度为 NaN 或 Inf 的所有 rank。这样可以在 GPU 的前向或反向传播中数值爆炸的当步捕获问题,并指出是哪块 GPU。all-reduce 之后、更新之前,也要检查归约后的梯度是否为 NaN 或 Inf。
    Non-finite gradient check – Before the all-reduce, flag any rank whose local gradient is NaN or Inf. This catches values that blow up in a GPU’s forward or backward pass, on the step they happen, and names the GPU. After the all-reduce, check the reduced gradient for NaN or Inf too, before the update.
  2. 环形重放审计——在审计步骤中,优化器更新之前,每个 rank 都会重新计算另一个节点上某个 rank 的微批次。它会逐位比较损失值,并在使用确定性内核时,比较每个参数的梯度指纹。这可以捕获计算路径中有限但错误的数值。
    Ring replay audit – On audit steps, before the optimizer step, every rank recomputes the micro-batch of a rank on another node. It compares the loss bit for bit and, with deterministic kernels, every parameter’s gradient fingerprint. This catches finite wrong values in the compute path.
  3. 权重指纹比较——在优化器步骤之后,每隔 N 步以及每次保存检查点之前,比较所有副本的权重指纹。这可以检测优化器步骤和已存储权重中的故障。
    Weight fingerprint comparison – After the optimizer step, every N steps and before every checkpoint, compare every replica’s weight fingerprints. This catches faults in the optimizer step and in stored weights.

此步骤中的代码适用于 PyTorch DDP。有关张量并行、流水线并行或上下文并行,请参阅《超越 DDP》。The code in this step is for PyTorch DDP. For tensor, pipeline, or context parallelism, see Beyond DDP.

执行顺序Order of execution

Flowchart of one training step: two NaN/Inf checks and the ring replay run before the optimizer step and stop the step. The weight check runs after it and blocks the checkpoint.

图 2:一个训练步骤的流程图。检查 1(all-reduce 前后的 NaN/Inf 梯度)和检查 2(在审计步骤中进行环形重放)在优化器步骤之前运行,若触发则停止该步骤。检查 3(权重指纹)在优化器步骤之后运行,并阻止生成检查点。Figure 2: Flowchart of one training step. Check 1 (NaN/Inf gradients, before and after the all-reduce) and check 2 (ring replay, on audit steps) run before the optimizer step and stop the step if they fire. Check 3 (weight fingerprints) runs after it and blocks the checkpoint

为什么不比较局部梯度范数?Why not compare local gradient norms?

一种直观的初始设计,也是我们最初采用的设计,是标记出其局部梯度范数与该步骤的中位数相差超过 k 个中位数绝对偏差(MAD)的 rank。我们记录了在 4 个实例上进行的三次无故障运行中每一步各 rank 的局部梯度范数(共 22,800 步,见“无故障运行”),训练的是一个拥有 9.53 亿参数的模型,使用 32 张 H100;结果发现这个测试行不通:A natural first design, and the one we started with, flags a rank whose local gradient norm is more than k median absolute deviations (MADs) from the median of that step. We recorded every rank’s local gradient norm on every step of the three fault-free runs on 4 instances (22,800 steps, see Fault-free runs) on 32 H100s training a 953-million-parameter model, and the test doesn’t work:

  • 健康数据的分布范围过宽——每个 rank 看到的数据都不同,因此健康状态下的局部基准在前 800 步中就已达到 224 个 MAD,在所有健康步骤中则达到 1,240 个 MAD。
    The healthy spread is too wide – Each rank sees different data, so healthy local norms already reached 224 MADs in the first 800 steps, and 1,240 MADs over all healthy steps.
  • 一个安静的阈值检测不到任何有限故障——在 k = 336 时,也就是前 800 个健康步骤中最高得分的 1.5 倍,它在剩余的 22,000 个健康步骤中产生了 11 次误报。而没有任何有限故障接近这个阈值:即使将一次激活乘以 10,000,故障排名的得分也从未超过 6.9。
    A quiet threshold sees nothing finite – At k = 336, 1.5 times the highest score in the first 800 healthy steps, it raised 11 false alarms in the remaining 22,000 healthy steps. And no finite fault came close: the faulty rank’s score never exceeded 6.9, even with one activation multiplied by 10,000.

根据指纹进行比较Compare by fingerprint

检查 2 和 3 会比较不同 GPU 上的张量。传输整个张量成本太高,因此我们将每个张量归约为一个指纹:对其原始位模式求两个 64 位和,一个普通求和,另一个按位置加权求和。对于元素少于 2³² 个、且每个元素最多为 4 字节的张量,任意一个或两个元素发生变化都会改变指纹。这涵盖了我们注入的所有权重故障。原则上,规模更大的变化可能会相互抵消,因此指纹相同是张量相同的有力证据,但并非证明。按位置加权求和很重要:在我们的测试中,交换两个权重值并对另外两个值做补偿性更改后,普通求和保持不变,只有加权求和才能检测到这些变化。Checks 2 and 3 compare tensors across GPUs. Sending whole tensors would cost too much, so each tensor is reduced to a fingerprint: two 64-bit sums of its raw bit patterns, one plain and one weighted by position. Any change to one or two elements of a tensor changes the fingerprint, for tensors with fewer than 2³² elements of up to 4 bytes each. That covers every weight fault we injected. Larger changes could, in principle, cancel out, so equal fingerprints are strong evidence of equal tensors, not proof. The position-weighted sum matters: in our tests, a swap of two weight values and a compensating change to two values left the plain sum unchanged, and only the weighted sum caught them.

_INT_VIEW = {1: torch.uint8, 2: torch.int16, 4: torch.int32, 8: torch.int64}

@torch.no_grad()
def fingerprints(tensors, chunk=1 << 24):
    # ... picks the device and allocates out: one row of two int64 per tensor
    for k, t in enumerate(tensors):
        if t is None:
            continue
        bits = t.detach().contiguous().view(-1).view(_INT_VIEW[t.element_size()])
        for i in range(0, bits.numel(), chunk):  # chunked to bound temporary memory
            b = bits[i:i + chunk].to(torch.int64)
            pos = torch.arange(i + 1, i + 1 + b.numel(), dtype=torch.int64, device=dev)
            out[k, 0] += b.sum()
            out[k, 1] += (b * pos).sum()
    return out

检查 1:all-reduce 前后的 NaN/Inf 梯度Check 1: NaN/Inf gradients, before and after the all-reduce

DDP 通信钩子会在平均梯度之前记录每个 rank 的本地梯度。它会存储每个梯度桶的平方范数,并在确定性审计步骤中记录每个参数梯度的指纹(供检查 2 使用)。随后,它会将梯度桶传递给 PyTorch 的标准 all-reduce 操作。A DDP communication hook records each rank’s local gradient before it’s averaged. It stores the squared norm of every gradient bucket and, on deterministic audit steps, the fingerprints of every parameter’s gradient (used by check 2). Then it passes the bucket to PyTorch’s standard all-reduce.

反向传播之后,nonfinite_ranks 会从每个 rank 收集一个标量,并返回本地梯度范数为 NaN 或 Inf 的 rank。第一个被标记的 rank 就是出错的 rank。如果执行这一步,NaN 会在下一步传播到每个 rank。After backward, nonfinite_ranks gathers one scalar from every rank and returns the ranks whose local gradient norm is NaN or Inf. The first rank flagged is the faulty one. If the step were applied, the NaN would reach every rank on the next step.

def local_stats_hook(stats, bucket):
    stats.sq.append(bucket.buffer().float().pow(2).sum())
    if stats.record_fingerprints:  # per parameter, before allreduce_hook divides in place
        rows = [stats.row[p.data_ptr()] for p in bucket.parameters()]
        stats.fp[rows] = fingerprints(bucket.gradients())
    return allreduce_hook(stats.dp_group, bucket)

def attach(ddp_model, dp_group):
    stats = LocalStats(dp_group, list(ddp_model.module.parameters()))
    ddp_model.register_comm_hook(state=stats, hook=local_stats_hook)
    return stats

def nonfinite_ranks(stats):
    """After backward: global ranks whose local gradient norm is NaN or Inf."""
    local = torch.stack(stats.sq).sum().sqrt().reshape(1)
    n = dist.get_world_size(stats.dp_group)
    gathered = [torch.empty_like(local) for _ in range(n)]
    dist.all_gather(gathered, local, group=stats.dp_group)
    bad = ~torch.isfinite(torch.cat(gathered).cpu())
    return [dist.get_global_rank(stats.dp_group, r) for r in bad.nonzero().flatten().tolist()]

train() 还会在 all-reduce 之后检查梯度。在归约过程中产生的 NaN 或 Inf 会以相同的方式到达每个副本,因此各副本的副本仍然一致,检查 3 会让它们通过。如果没有这项检查,NaN 就会变成每个副本上的 NaN 权重,而恰好在这一步保存的检查点也会包含这些权重,并被标记为通过。clip_grad_norm_ 已经会计算归约后梯度的范数,因此这项检查每步只额外增加一次单元素 all-reduce。归约中的有限值错误仍会通过所有检查。train() also checks the gradient after the all-reduce. A NaN or Inf produced inside the reduction reaches every replica the same way, so the copies still match and check 3 passes them. Without this check, the NaN becomes NaN weights on every replica, and a checkpoint due on that step is saved with them and tagged as passing. clip_grad_norm_ already computes the norm of the reduced gradient, so the check adds only one one-element all-reduce per step. A finite error in the reduction still passes every check.

如果使用 fp16 和梯度缩放器进行训练,请排除缩放器已经跳过的溢出步骤。bf16 不会出现这类步骤。If you train with fp16 and a gradient scaler, exclude the overflow steps the scaler already skips. bf16 doesn’t have them.

检查 2:优化器步骤之前的环形重放Check 2: Ring replay, before the optimizer step

在调用 optimizer.step() 之前,每个副本都持有相同的权重。因此,在反向传播和优化器更新之间,任何 rank 都可以重新计算其他 rank 的任意微批次;使用确定性内核时,计算结果的每一位都必须相同。Every replica holds the same weights until optimizer.step(). So, between the backward pass and the optimizer step, any rank can recompute any other rank’s micro-batch, and with deterministic kernels it must get the same bits.

在审计步骤中,每个 rank 都会重新计算 rank r + 8 的微批次:向前间隔 8 个位置,这在 p5 实例上相当于相隔一个节点。它使用未包装的模块,因此不会执行全归约,并会在之后恢复梯度、模块缓冲区和随机数状态。无论有多少个 rank 执行回放,都会阻塞作业,因此审计每个 rank 所耗费的实际时间与只审计一个 rank 相同。On an audit step, every rank r recomputes the micro-batch of rank r + 8: 8 positions ahead, which is one node away on p5 instances. It uses the unwrapped module, so nothing is all-reduced, and it restores the gradients, the module’s buffers, and the random-number state afterwards. A replay blocks the job no matter how many ranks do one, so auditing every rank costs the same wall-clock time as auditing one.

因此,每个 rank 都会参与两次比较:一次是由其他 rank 重放它自己的微批次,另一次是它为其他人重放的微批次。Each rank then appears in two comparisons: its own micro-batch, replayed by a peer, and the micro-batch it replayed for someone else.

  • 两处比较结果都不匹配:两边计算出的秩都错了,所以问题就出在它身上。
    Both comparisons mismatch: That rank computed wrong in both, so it’s the culprit.
  • 只有一处不匹配:任一方都可能有问题。通过确认即可就地判定:让位于第三个节点、在目标之后第八个位置的 GPU,以及目标本身,再次重放目标的微批次。这样也能区分持续性故障(目标会再次复现)和瞬态故障(目标不会再次复现)。
    Only one mismatches: Either side could be wrong. confirm settles it in place: the GPU eight positions after the target, on a third node, and the target itself replay the target’s micro-batch again. That also tells a persistent fault, which the target reproduces, from a transient one, which it doesn’t.
def ring_audit(module, compute_loss, rebuild_batch, step, stats, local_loss, offset, with_grads):
    # ... g is the DP group, n its size, and me this rank's position in it
    target = dist.get_global_rank(g, (me + offset) % n)
    replay = _replay(module, compute_loss, rebuild_batch(step, target), with_grads)
    # ... v = [this rank's own loss bits and gradient fingerprints, its replay of target]
    dist.all_gather_into_tensor(out, v, group=g)
    table = out.view(n, 2, -1).cpu()  # per DP rank: [own result, its replay of its target]
    pairs = [(dist.get_global_rank(g, (r + offset) % n), dist.get_global_rank(g, r))
             for r in range(n) if not torch.equal(table[(r + offset) % n, 0], table[r, 1])]
    return pairs, table

def localize(pairs):
    hits = Counter(r for p in pairs for r in p)
    culprits = sorted(r for r, c in hits.items() if c >= 2)
    ambiguous = [p for p in pairs if not set(p) & set(culprits)]
    return culprits, ambiguous

def confirm(module, compute_loss, rebuild_batch, step, pair, table, stats, offset, with_grads):
    # ... the third GPU (target + offset) and the target replay the target's micro-batch again
    third_r, self_r = v.cpu()
    orig, peer = table[ti, 0], table[ri, 1]
    if torch.equal(third_r, orig):
        return {"pair": pair, "third": third, "suspect": replayer, "kind": "replayer computed wrong"}
    if torch.equal(third_r, peer):
        kind = ("persistent" if torch.equal(self_r, orig) else
                "transient" if torch.equal(self_r, third_r) else "unclear")
        return {"pair": pair, "third": third, "suspect": target, "kind": kind}
    return {"pair": pair, "third": third, "suspect": None, "kind": "unattributable"}

只有当三块 GPU 分别位于三个不同节点上时,这项确认才是独立的。check_topology 会在训练开始前,根据每个 Pod 的 NODE_NAME 检查所有节点对是否符合这一条件,否则就会报错。The confirmation is only independent if the three GPUs are on three different nodes. check_topology verifies that for every pair before training starts, from each pod’s NODE_NAME, and raises an error otherwise.

选择审计模式:Choose the audit mode:

  • 默认内核:仅比较损失。这需要前向传播的损失能够按位复现,我们的测试结果也符合这一点:正常重放得到的损失与原始损失逐位一致。梯度无法用这种方式比较,因为注意力机制的默认反向传播并非确定性的。这种模式能够捕获会改变损失的前向传播故障。
    Default kernels: Compare the loss only. This needs a forward pass whose loss is bitwise reproducible, which held in our tests: healthy replays matched the original loss bit for bit. Gradients can’t be compared this way, because attention’s default backward pass isn’t deterministic. This mode catches forward-pass faults that change the loss.
  • 确定性内核(deterministic_audits=True):整个审计步骤都使用确定性算法和数学注意力内核运行。此时梯度指纹也会匹配,因此审计还能发现仅在反向传播中出现的故障。没有确定性实现的算子会报错,而不是产生误报。在我们的模型上,确定性审计步骤的耗时是默认步骤的 2.4 倍。
    Deterministic kernels (deterministic_audits=True): The whole audit step runs with deterministic algorithms and the math attention kernel. Gradient fingerprints then match too, so the audit also catches backward-only faults. An op with no deterministic implementation raises an error instead of producing a false alarm. On our model, a deterministic audit step cost 2.4 times a default one.

切勿只在可疑 GPU 上重放可疑任务。存在持续性缺陷的 GPU 可能会再次给出错误结果。Never replay a suspect’s work on the suspect alone. A GPU with a persistent defect can reproduce its own wrong answer.

检查 3:优化器更新后检查权重指纹Check 3: Weight fingerprints, after the optimizer step

在 optimizer.step() 之后,每个副本的权重都必须完全一致,因此无需调整容差。每个 rank 都会为每个权重张量生成指纹,并收集所有人的指纹。After optimizer.step(), every replica’s weights must be identical, so there’s no tolerance to tune. Each rank fingerprints every weight tensor and gathers everyone’s fingerprints.

只有当某个 rank 上的张量副本与严格多数(超过一半)的副本不同时,才会点名该 rank。若只有两个副本,或出现没有严格多数的分歧,比较结果会报告不一致,但不会指出任何 rank。A rank is named only when its copy of a tensor differs from a strict majority, more than half of the copies. With two copies, or a split with no strict majority, the comparison reports a disagreement without naming any rank.

def find_divergent_ranks(params, dp_group):
    local = fingerprints(params).flatten()
    # ... all-gathers every rank's fingerprints into table: [dp_size, num_tensors, 2]
    differs = (table != table[0]).any(dim=2).any(dim=0)
    if not differs.any():
        return {"diverged": False, "suspects": []}
    suspects = set()
    for k in differs.nonzero().flatten().tolist():
        copies = [tuple(row) for row in table[:, k].tolist()]
        value, count = Counter(copies).most_common(1)[0]
        if 2 * count <= n:
            return {"diverged": True, "suspects": None}  # no strict majority for tensor k
        suspects.update(r for r, c in enumerate(copies) if c != value)
    return {"diverged": True,
            "suspects": sorted(dist.get_global_rank(dp_group, r) for r in suspects)}

每隔 N 步运行一次,并在每个检查点步骤运行。它是唯一一个在更新后运行的检查,因此也只有它能阻止从已损坏的副本写入检查点。在我们的测试中,某个权重在一次更新后立即损坏,并在下一个检查点步骤被检测到,因此没有执行保存。如果没有这项强制检查,保存就会基于已损坏的副本继续进行,而环形审计要到五步后的下一次审计才会发现问题。Run it every N steps and on every checkpoint step. It’s the only check that runs after the update, so it’s the only one that can stop a checkpoint from being written out of a corrupted copy. In our tests, a weight corrupted right after one update was caught at the next checkpoint step, and the save didn’t happen. Without the forced check, the save went ahead from the corrupted copy, and the ring audit noticed only at the next audit, five steps later.

在一个拥有 9.53 亿个参数的模型上,每次检查耗时 31.1 毫秒:每 10 个步骤运行一次时,占一个步骤耗时的 2%】【。It costs 31.1 ms per check on a 953-million-parameter model: 2 percent of a step when it runs every 10 steps.

将检查放入训练循环中Put the checks in the training loop

train 按照图 2 中的顺序执行每个步骤,并在首次触发警报时停止。它会在前向传播之前判断当前步骤是否为审计步骤,因为确定性比较要求原始计算本身也是确定性的。当检查 1 或 2 触发时,它会将梯度清零并直接返回,不执行裁剪或应用更新,因此错误梯度不会传递到权重或优化器状态中,而精确状态仍会保留以供确认。裁剪后,它会检查缩减后的梯度是否为 NaN 或 Inf;如果是,就在更新之前返回。只有在没有任何检查触发时,它才会保存检查点。train runs each step in the order of Figure 2 and stops at the first alarm. It decides whether a step is an audit step before the forward pass, because a deterministic comparison needs the original computation to be deterministic too. When check 1 or 2 fires, it zeros the gradients and returns without clipping or applying the update, so the bad gradient never reaches the weights or the optimizer state, and the exact state is still there for confirmation. After clipping, it checks whether the reduced gradient is NaN or Inf, and if it is, returns before the update. It saves a checkpoint only if nothing fired.

def train(ddp_model, stats, optimizer, batches, compute_loss, rebuild_batch, save_checkpoint,
          sched, start_step=0):
    # ... setup, including check_topology(dp_group, sched.peer_offset)
    for step, batch in enumerate(batches, start_step):
        audit = step % sched.audit_every == 0  # 0. decide first
        det = audit and sched.deterministic_audits
        # ... resets the hook's per-step state
        with deterministic() if det else nullcontext():
            loss = compute_loss(ddp_model, batch)  # 1. forward, backward
            loss.backward()
        nonfinite = nonfinite_ranks(stats)  # 2. non-finite check
        pairs, table = [], None
        if audit or nonfinite:  # 3. ring replay
            pairs, table = ring_audit(module, compute_loss, rebuild_batch, step, stats,
                                      loss, sched.peer_offset, with_grads=det)
        if nonfinite or pairs:  # 4. gate
            optimizer.zero_grad(set_to_none=True)  # step not applied
            culprits, ambiguous = localize(pairs)
            verdicts = [confirm(module, compute_loss, rebuild_batch, step, p, table, stats,
                                sched.peer_offset, with_grads=det) for p in ambiguous]
            return {"step": step, "check": "compute", "nonfinite": nonfinite,
                    "mismatched_pairs": pairs, "culprits": culprits, "verdicts": verdicts,
                    "suspect_window": _window(last_audit, step, start_step),
                    "last_audit_pass": last_audit, "last_weight_check_pass": last_weights}
        if audit:
            last_audit = step
        grad_norm = torch.nn.utils.clip_grad_norm_(params, sched.max_grad_norm)
        bad = (~torch.isfinite(grad_norm)).to(torch.int32).reshape(1)  # reduced gradient
        dist.all_reduce(bad, op=dist.ReduceOp.MAX, group=dp_group)
        if bad.item():
            optimizer.zero_grad(set_to_none=True)  # step not applied
            return {"step": step, "check": "reduced gradient", "suspect_window": [step, step],
                    "last_audit_pass": last_audit, "last_weight_check_pass": last_weights}
        optimizer.step()
        optimizer.zero_grad(set_to_none=True)
        ckpt = step % sched.ckpt_every == 0
        if step % sched.check_every == 0 or (ckpt and sched.check_on_checkpoint):
            wc = find_divergent_ranks(params, dp_group)  # 5. weight check
            if wc["diverged"]:
                return {"step": step, "check": "weights", "suspects": wc["suspects"],
                        "suspect_window": _window(last_weights, step, start_step),
                        "last_audit_pass": last_audit, "last_weight_check_pass": last_weights}
            last_weights = step
        if ckpt:  # 6. checkpoint
            save_checkpoint(step, tags={"last_audit_pass": last_audit,
                                        "last_weight_check_pass": last_weights})
    return None

警报的 suspect_window 是自触发警报的检查上次通过以来的步骤范围。自故障开始后,每一步都处于活动状态的故障,其起始时间就在这个范围内。间歇性故障可能更早出现,而未被任何检查发现的故障可能存在于任意检查点,因此应将这些标签视为该步骤检查已通过的记录,而不是已保存状态无故障的证明。The alarm’s suspect_window is the range of steps since the last pass of the check that fired. A fault that was active on every step since it started began inside it. An intermittent fault can be older, and a fault that no check sees can be in any checkpoint, so treat the tags as a record that the checks passed at that step, not as proof that the saved state is clean.

训练脚本这样调用它:A training script calls it like this:

# ... imports, and the model, optimizer, and dataset setup
import sdc_order as S

stats = S.attach(ddp_model, dp_group)  # registers the comm hook, once
sched = S.Schedule(audit_every=10, deterministic_audits=True, check_every=10,
                   ckpt_every=100, peer_offset=8)  # 8 = GPUs per node

def compute_loss(model, batch):  # used for training AND replay
    x, y = batch
    with torch.autocast("cuda", dtype=torch.bfloat16):
        logits = model(x)
    return F.cross_entropy(logits.float().flatten(0, 1), y.flatten())

def rebuild_batch(step, rank):  # exactly the micro-batch `rank` trained on
    return dataset.micro_batch(step, rank)

# ... batches(start) yields this rank's micro-batches and sets the learning rate
alarm = S.train(ddp_model, stats, optimizer, batches(start), compute_loss, rebuild_batch,
                save_checkpoint, sched, start_step=start)
if alarm is not None:
    report_sdc(alarm)  # metric + log line; Step 2 maps the rank to a node
    sys.exit(3)

回放依赖以下内容:The replay depends on these:

  • 精确的微批次:rebuild_batch(step, rank) 必须准确返回该 rank 训练时使用的微批次,例如通过带种子的采样器生成。
    Exact micro-batches: rebuild_batch(step, rank) must return exactly the micro-batch that rank trained on, for example from a seeded sampler.
  • 相同的损失函数:训练和重放时的 compute_loss 必须是同一个函数,包括 autocast;其中的任何随机性(例如 dropout)都必须按 step 和 rank 设定种子。
    Same loss function: compute_loss must be the same function in training and in replay, including autocast, and any randomness inside it, such as dropout, must be seeded per step and rank.
  • 模型中不能包含集合通信或会影响输出的状态:确认性重放只在两个 rank 上运行,即目标 rank 和第三块 GPU,因此,如果模型在前向或反向传播中调用集合通信(例如 SyncBatchNorm),遇到含糊不清的告警时就会挂起。如果某个缓冲区既被前向传播读取又被更新,那么健康状态下的重放结果就会有所不同。
    No collectives or output-affecting state in the model: The confirmation replay runs on only two ranks, the target and the third GPU, so a model that calls a collective inside its forward or backward pass (SyncBatchNorm, for example) hangs on an ambiguous alarm. A buffer that the forward pass both reads and updates makes a healthy replay differ.
  • 确定性设置:在训练进程启动前设置 CUBLAS_WORKSPACE_CONFIG=:4096:8,并确保模型中的每个算子都有确定性实现。
    Deterministic setup: Set CUBLAS_WORKSPACE_CONFIG=:4096:8 before the training process starts, and make sure every op in the model has a deterministic implementation.
  • Peer offset:按节点逐个排列 DP rank,因此当 peer_offset 等于每个节点的 GPU 数量时,每个 replayer 都会位于另一个节点上。如果布局不满足这一条件,check_topology 会拒绝该布局。
    Peer offset: Number DP ranks node by node, so that peer_offset equal to the GPUs per node puts every replayer on another node. check_topology refuses a layout where it doesn’t.
  • 此处未经测试:未使用的参数、梯度累积、BatchNorm,以及带有副作用的前向钩子。对于未使用的参数,请设置 deterministic_audits=False;该设置仅比较损失。
    Untested here: Unused parameters, gradient accumulation, BatchNorm, and forward hooks with side effects. With unused parameters, set deterministic_audits=False, which compares the loss only.

audit_every 是成本与稳健性之间权衡的主要设置:audit_every is the main cost-versus-robustness setting:

  • 检测延迟:如果持续性有限故障也发生在审计运行的内核中,则会在 audit_every 步内被捕获。确定性审计会运行确定性内核和数学注意力内核,因此,如果故障仅限于其他步骤使用的默认内核,就永远不会被审计发现。
    Detection delay: A persistent finite fault is caught within audit_every steps if it also occurs in the kernels the audit runs. Deterministic audits run deterministic kernels and the math attention kernel, so a fault confined to the default kernels used on the other steps is never audited.
  • 损坏的更新:在审计发现之前,最多可以应用 audit_every − 1 个损坏的更新。它们位于警报的 suspect_window 内。
    Corrupted updates: Up to audit_every − 1 corrupted updates can be applied before the audit catches it. They’re inside the alarm’s suspect_window.
  • 一次性故障:单个非审计步骤中发生的有限故障若不再出现,则完全无法被发现。
    One-time faults: A finite fault on a single non-audit step that doesn’t recur isn’t caught at all.

将 ckpt_every 设为 audit_every 和 check_every 的公倍数,以便每个检查点步骤都能在更新前接受审计,并在更新后进行指纹校验。Make ckpt_every a multiple of both audit_every and check_every, so every checkpoint step is audited before its update and fingerprinted after it.

我们在 953M 模型和 32 张 H100 上,针对每种调度方案连续运行 1,000 步,测量端到端的平均步耗时。所有启用这些检查的调度方案也会每 10 步运行一次权重检查:We measured the average step time end to end, over 1,000 consecutive steps per schedule, on the 953M model and 32 H100s. Every schedule with the checks also runs the weight check every 10 steps:

Schedule Average step time Over plain DDP
Plain DDP, no checks 157.4 ms —
Checks, no audits 169.0 ms +7.4%
Deterministic audits every 10 steps 211.9 ms +34.7%
Default-kernel audits every 10 steps 177.0 ms +12.5%
Deterministic audits every 100 steps 173.3 ms +10.1%
Default-kernel audits every 100 steps 169.3 ms +7.6%

每种调度中,约有 7 个百分点的开销与审计无关:梯度钩子、每一步执行的两项 NaN/Inf 检查,以及每 10 步执行一次的权重检查。生产环境中,一个合理的起点是每 100 步进行一次确定性审计,在这里开销为 10%。这样仍能在 100 步内捕获持续性故障,包括仅发生在反向传播中的故障;代价是最多需要回滚 99 次已被污染的更新。如果需要更快地检测,例如在新容量上进行预热期间,或监视可疑节点时,可以每 10 步审计一次。请在自己的模型上测量开销:确定性注意力会使用数学内核,其开销随序列长度的平方增长。About 7 percentage points of each schedule’s cost don’t depend on audits: the gradient hook and the two NaN/Inf checks on every step, and the weight check every 10 steps. A reasonable starting point for production is deterministic audits every 100 steps, which cost 10 percent here. They still catch a persistent fault within 100 steps, including a backward-only one, at the price of up to 99 corrupted updates to roll back. Audit every 10 steps when you need faster detection, for example during a burn-in on new capacity or while you watch a suspect node. Measure the cost on your own model: deterministic attention uses the math kernel, whose cost grows with the square of the sequence length.

在无故障运行中,15,320 次审计步骤和 3,080 次权重检查均未触发警报;据此,误报率上限约为每 5,100 次审计步骤 1 次(95% 置信度)。In the fault-free runs, 15,320 audit steps and 3,080 weight checks raised no alarm, which bounds the false-alarm rate at about 1 in 5,100 audit steps (95 percent confidence).

步骤 2:将可疑秩定位到一个节点Step 2: Localize the suspect rank to a node

rank 是一个逻辑 ID。要对其执行操作,你需要实例和物理 GPU。在 HyperPod EKS 上,Kubernetes 节点名称是在实例 ID 前加上 hyperpod- 前缀。通过 Kubernetes Downward API 将其传递给 Pod:A rank is a logical ID. To act on it, you need the instance and the physical GPU. On HyperPod EKS, the Kubernetes node name is the instance ID with a hyperpod- prefix. Pass it to your pod with the Kubernetes downward API:

env:
- name: NODE_NAME  # on HyperPod EKS, spec.nodeName is "hyperpod-<instance-id>"
  valueFrom:
    fieldRef:
      fieldPath: spec.nodeName

作业开始时,记录一张表,列出每个 rank 对应的节点、实例和 GPU UUID:At job start, log a table that maps every rank to its node, instance, and GPU UUID:

import os
import torch
import torch.distributed as dist

node = os.environ["NODE_NAME"]  # "hyperpod-i-0123456789abcdef0"
instance_id = node.removeprefix("hyperpod-")  # "i-0123456789abcdef0", what the Replace API takes
gpu_uuid = "GPU-" + str(torch.cuda.get_device_properties(torch.cuda.current_device()).uuid)
info = {"rank": dist.get_rank(), "node": node,
        "instance_id": instance_id, "gpu_uuid": gpu_uuid}
table = [None] * dist.get_world_size()
dist.all_gather_object(table, info)
if dist.get_rank() == 0:
    print("rank_map", table)  # log at every job start

如果某个作业已经在未启用 downward API 的情况下运行,您可以在外部使用 `kubectl get pod <pod> -o jsonpath='{.spec.nodeName}'` 将 Pod 映射到其所在节点。If a job is already running without the downward API, you can map a pod to its node from outside with kubectl get pod <pod> -o jsonpath='{.spec.nodeName}'.

步骤 3:控制损失并检查 GPU 指标Step 3: Contain the damage and check the GPU metrics

告警触发时,先停止作业。然后在调查期间,将疑似节点设为不可调度,阻止新的工作负载调度到该节点上:When an alarm fires, stop the job first. Then stop new work from landing on the suspect node by cordoning the node while you investigate:

kubectl cordon <node-name>  # marks the node unschedulable; existing pods keep running

然后打开 SageMaker HyperPod 可观测性插件中的 GPU 健康状况仪表板,筛选出可疑节点和 GPU,并查看警报触发时的时间点。如果该 GPU 的可纠正 ECC 错误、PCIe 重放、降频或温度有所上升,就更有理由认为问题出在硬件上。仪表板上没有异常也不能排除节点故障:纯粹的 SDC 往往不会在硬件遥测数据中留下痕迹。Then open the GPU health dashboard in the SageMaker HyperPod observability add-on, filter to the suspect node and GPU, and look at the time the alarm fired. A rise in correctable ECC errors, PCIe replays, throttling, or temperature on that GPU raises confidence that the hardware is at fault. A clean panel doesn’t clear the node: pure SDC often leaves no trace in hardware telemetry.

步骤 4:确认,然后替换节点Step 4: Confirm, then replace the node

在第 1 步的检查运行时,告警已经指出了一块疑似故障的 GPU。如果你发现某种症状但没有告警,比如损失值突然飙升,或者想在更换任何硬件之前排除软件问题,就先从容易排查的原因入手。大多数损失值飙升都不是 SDC;如果问题出在数据错误上,却去追查 SDC,只会白白浪费好几天:With the Step 1 checks running, an alarm already names a suspect GPU. When you see a symptom without an alarm, such as a loss spike, or want to rule out software before you replace anything, start with the cheap explanations. Most loss spikes aren’t SDC, and chasing SDC on a data bug wastes days:

Loss anomaly / suspected corruption
- Reproduces with the same seed on DIFFERENT nodes? -> deterministic bug, not SDC
- Goes away, or follows one node, when you move the job? -> strong SDC candidate
- DP replicas that must be bitwise identical disagree? -> strong SDC signal
- One rank's step replayed on another node gives different bits? -> strong SDC signal
- One rank's pre-all-reduce gradient is NaN or Inf? -> SDC candidate (use the first step it fired)
- Fleet-wide and gradual? -> likely recipe or optimizer
- Started at a data, config, or library change? -> usually software, but not proof

区分 SDC 与软件问题的测试方法是:看问题是否会随硬件一起转移:The test that separates SDC from software is whether the problem follows the hardware:

  • 可复现的故障并不能排除 SDC——Meta 将一个失败的工作负载固定在单个核心上,对特定输入每次都得到相同的错误答案。
    A reproducible failure doesn’t rule out SDC – Meta pinned a failing workload to one core and got the same wrong answer every time for specific inputs.
  • 软件变更引发的故障也不例外——Google 将一次事故追溯到一次正确的库更新:该更新开始在有缺陷的处理器核心上使用很少用到的指令。
    Neither does a failure that starts at a software change – Google traced one incident to a correct library update that began using rarely used instructions on defective cores.
  • 不要指望全局损失能指出故障位置——前向故障会先改变故障所在 rank 自身的损失,随后 all-reduce 会将其梯度传播到每个副本。通过逐 rank 检查和重放,才能确定故障的局部位置。
    Don’t expect the global loss to point anywhere – A forward fault first changes the faulty rank’s own loss, and the all-reduce then spreads its gradient to every replica. Per-rank checks and replays give you the locality.

确定警报的含义Decide what the alarm means

Alarm Meaning Suggested action
check == "weights", suspects == [r] Rank r’s copy differs from a strict majority after the update Keep r’s node cordoned. Replace it after review
check == "weights", suspects is None Copies disagree, but no strict majority Ambiguous: keep the nodes involved cordoned. Check DCGM and run deep health checks
culprits == [r] Both of r’s ring comparisons mismatched. This assumes at most one faulty GPU among the GPUs that replay each other (the GPUs with the same local index). With two, a healthy GPU can be named Keep cordoned. Replace after review, or after the fault repeats
Verdict persistent The target reproduced its own wrong answer, and a third GPU agreed with the replayer Keep cordoned. Replace after review
Verdict transient The target’s retry came out right and agreed with the third GPU. An intermittent fault can look the same Keep cordoned until an audit with the node as the target, or a deep health check, passes. Replace it if it happens again
Verdict replayer computed wrong The replaying GPU, not the target, was wrong Treat the replayer as the suspect, and confirm again
nonfinite set, no mismatched pairs NaN or Inf in a backward pass that the loss doesn’t show, or a gradient norm too large for float32 (above about 1.8 × 10¹⁹) Ambiguous: audit with the suspect as the target, or check DCGM and run a deep health check
check == "reduced gradient" The gradient was NaN or Inf after the all-reduce, although every rank’s local gradient was finite. No rank is named Ambiguous: keep the job stopped, check DCGM and run deep health checks on every node in the job, and resume from a checkpoint saved before the alarm step
Verdict unattributable or unclear The three GPUs don’t line up Ambiguous: check DCGM and run deep health checks on the nodes involved

在生产环境中,在你自己的工作负载上有证据证明这些检查的精确率之前,每次替换都应保留人工审批。像我们这样的合成测试无法证明这一点。In production, keep a human approval on every replacement until you have evidence of the checks’ precision on your own workload. Synthetic tests like ours don’t establish it.

确认一个含义不明确的警报Confirm an ambiguous alarm

深度健康检查是处理模糊告警的主要工具。其压力测试可以捕捉硬件报告的故障,而细微的数据依赖型故障往往能通过检查。要在可疑实例组上运行该检查:A deep health check is the main tool for ambiguous alarms. Its stress tests catch faults that the hardware reports, and subtle data-dependent faults often pass. To run one on the suspect instance group:

aws sagemaker start-cluster-health-check \
    --cluster-name <cluster-name> \
    --deep-health-check-configurations '[{"InstanceGroupName":"<instance-group>","InstanceIds":["i-0123456789abcdef0"],"DeepHealthChecks":["InstanceStress"]}]'

替换节点Replace the node

准备好更换节点后,有两种选择。两种选择都会触发相同的 SageMaker HyperPod 恢复流程,相关说明请参阅“手动隔离、更换或重启节点”。When you’re ready to replace the node, you have two options. Both trigger the same SageMaker HyperPod recovery process, described in Manually quarantine, replace, or reboot a node.

如果启用了自动节点恢复,您可以为节点添加标签,并让 SageMaker HyperPod 替换该节点,这便于实现自动化:If automatic node recovery is turned on, you can label the node and let SageMaker HyperPod replace it, which is convenient for automation:

kubectl label node <node-name> \
    sagemaker.amazonaws.com/node-health-status=UnschedulablePendingReplacement --overwrite

若要改用 API,请运行:To use the API instead, run:

aws sagemaker batch-replace-cluster-nodes --cluster-name <cluster-name> --node-ids <instance-id>

在使用 Karpenter 进行自动扩缩容的集群中,BatchReplaceClusterNodes 会终止该节点,但只有在有待调度的 Pod 需要节点时才会创建替代节点。替代节点加入后,训练作业会通过 SageMaker HyperPod 训练算子或作业的重启策略重新启动,训练脚本则会从告警的 suspect_window 开始之前保存的最新检查点恢复。加载检查点后、执行第一步之前,立即调用 find_divergent_ranks。替换节点会销毁该节点的根卷和辅助卷,因此请将检查点保存在共享存储中。On clusters that use Karpenter for autoscaling, BatchReplaceClusterNodes terminates the node but creates a replacement only if pending pods need one. After the replacement joins, the training job restarts through the SageMaker HyperPod training operator or the job’s restart policy, and your training script resumes from the newest checkpoint saved before the alarm’s suspect_window starts. Call find_divergent_ranks right after loading it, before the first step. Replacement destroys the node’s root and secondary volumes, so keep checkpoints on shared storage.

自动化工作流程Automating the workflow

这些手动步骤仅供理解。在生产环境中,应将它们封装在一个小型控制器中,并让它运行在你自己的集群和账户中:The manual steps are for understanding. In production, wrap them in a small controller that runs in your own cluster and account:

  1. 触发方式:训练作业将告警报告为 Kubernetes 事件、小型自定义资源(例如 SDCReport{rank, job, step, check}),或 Amazon CloudWatch 告警;告警指标包括 sdc_nonfinite_grad、sdc_replay_mismatch 和 sdc_divergent_tensors。
    Trigger: The training job reports the alarm as a Kubernetes event, a small custom resource (for example SDCReport{rank, job, step, check}), or an Amazon CloudWatch alarm on metrics such as sdc_nonfinite_grad, sdc_replay_mismatch, and sdc_divergent_tensors.
  2. 解析:控制器通过 Kubernetes API 将 rank 映射到 pod,再映射到 node,然后通过去掉 hyperpod- 前缀将 node 映射到 instance ID。
    Resolve: The controller maps rank → pod → node through the Kubernetes API, then node → instance ID by stripping the hyperpod- prefix.
  3. 遏制:它会封锁该节点。
    Contain: It cordons the node.
  4. 决策:应用第 4 步中的表格。环审计已在原位确认了有歧义的配对,因此告警会附带判定结果。对于有歧义的结果,它会运行一次限定于单个节点的深度健康检查。
    Decide: It applies the table in Step 4. The ring audit has already confirmed ambiguous pairs in place, so the alarm carries the verdicts. For an ambiguous result, it runs one node-scoped deep health check.
  5. 恢复:对于替换操作,它会请求人工批准,然后调用 BatchReplaceClusterNodes;如果启用了自动节点恢复,则会设置节点健康标签。之后,它会依赖训练运算符和检查点重新加载,并在 CloudWatch 中记录每个步骤。
    Recover: For a replacement, it asks a human to approve, then calls BatchReplaceClusterNodes, or sets the node-health label if automatic node recovery is turned on. Then it relies on the training operator and your checkpoint reload, and records every step in CloudWatch.

将其实现为轻量级 Kubernetes Operator,或在 CloudWatch 告警上配置 Amazon EventBridge 规则,以调用 AWS Lambda 函数。Build it as a lightweight Kubernetes operator, or as an Amazon EventBridge rule on the CloudWatch alarm that invokes an AWS Lambda function.

用例:在 SageMaker HyperPod 上测试检查项Use case: Testing the checks on SageMaker HyperPod

我们在一个由 Amazon EKS 编排的 SageMaker HyperPod 集群上进行了两次测试,分别使用 4 台和 3 台 ml.p5.48xlarge 实例;每台实例配备 8 块 NVIDIA H100 80GB HBM3 GPU。测试使用 AWS Deep Learning Containers 训练镜像中的 PyTorch 2.9.0(CUDA 13.0)。模型是一个类 Llama 解码器,参数量为 9.53 亿,包含 16 层、2,048 的隐藏层维度、16 个注意力头、32,000 个词元的词表,以及长度为 2,048 个词元的序列。每块 GPU 每步处理 2 个序列(32 块 GPU 上每步共处理 131,072 个词元);权重、梯度和优化器状态使用 fp32,计算则使用 bf16 autocast。训练使用 AdamW,学习率为 3 × 10⁻⁴,先进行 100 步线性预热;betas 为 (0.9, 0.95),权重衰减为 0.1,梯度裁剪阈值为 1.0。数据为合成数据:一个词元按 Zipf 分布的复制任务,其中前半部分重复;随机种子按 rank 和 step 设置,因此可以重建任意微批次。We ran the tests twice on one SageMaker HyperPod cluster orchestrated by Amazon EKS, using 4 and then 3 ml.p5.48xlarge instances with 8 NVIDIA H100 80GB HBM3 GPUs each, and PyTorch 2.9.0 (CUDA 13.0) from the AWS Deep Learning Containers training image. The model was a 953-million-parameter Llama-style decoder with 16 layers, a hidden size of 2,048, 16 attention heads, a 32,000-token vocabulary, and 2,048-token sequences. Each GPU processed 2 sequences per step (131,072 tokens per step on 32 GPUs), with fp32 weights, gradients, and optimizer state, and bf16 autocast for compute. We trained with AdamW at a learning rate of 3 × 10⁻⁴ after a 100-step linear warm-up, with betas of (0.9, 0.95), weight decay of 0.1, and gradient clipping at 1.0. The data was synthetic: a copy task with Zipf-distributed tokens whose first half repeats, seeded per rank and step so that any micro-batch can be rebuilt.

故障场景Fault scenarios

故障被注入到一层中:16 个解码器块中的第八个块的 MLP 下投影层,并位于选定的秩和步上:Faults were injected in one layer, the MLP down-projection of the eighth of 16 decoder blocks, on a chosen rank and step:

  • 前向故障会改变层的输出,但保留其梯度路径,例如前向传播中的错误乘法。
    Forward faults change the layer’s output but keep its gradient path, like a wrong multiply in the forward pass.
  • 仅发生在反向传播阶段的故障会改变该层输入或权重的梯度。
    Backward-only faults change the gradient of the layer’s input or weight.
  • 权重故障会在优化器更新步骤之后立即更改某个 GPU 上存储的权重副本:翻转一个比特、交换两个值,或对两个值进行补偿性修改。
    Weight faults change one GPU’s copy of the stored weight right after the optimizer step: a bit flip, a swap of two values, or a compensating change to two values.
  • 持续性故障会在故障 GPU 计算的所有内容中反复出现,包括它为其他 rank 执行的重放。瞬态故障只会触发一次。
    A persistent fault recurs in everything the faulty GPU computes, including the replays it runs for other ranks. A transient fault fires once.

每种场景都从完成 400 个预热步骤后拍摄的快照重新开始,步骤编号从该快照起算。除非另有说明,审计每 10 步运行一次,使用确定性内核;权重每 10 步检查一次,每 20 步创建一个检查点。表中显示的是 4 个实例的结果。在 3 个实例上,每种场景都在同一步骤、由同一项检查触发了相同的警报,并指出了相同的 rank。只有对等 rank 发生了变化。Every scenario restarts from a snapshot taken after 400 warm-up steps, and step numbers count from it. Unless noted, audits ran every 10 steps with deterministic kernels, weight checks every 10 steps, and a checkpoint every 20. The table shows the 4-instance results. On 3 instances, every scenario raised the same alarm, at the same step, from the same check, naming the same ranks. Only the peer ranks changed.

Injected fault Result Caught by
NaN in one element of rank 13’s forward output, on step 25 only (not an audit step) Fired on step 25 and named rank 13. The ring replay also ran. Confirmation by rank 21 and rank 13: transient on rank 13. Step 25 wasn’t applied. Suspect window: steps 21–25 Check 1
One element of rank 13’s forward output ×1,000, on every step from step 23 Steps 23–29 passed check 1 and were applied. The audit at step 30 mismatched (13, 5) and (21, 13) and named rank 13. Step 30 wasn’t applied. Suspect window: steps 21–30 Check 2
The same ×1,000 on audit step 30 only One pair mismatched, (13, 5). Confirmation by rank 21, on a third node, and by rank 13: transient on rank 13 Check 2
The persistent ×1,000 on rank 5, which replays rank 13’s micro-batch Pairs (13, 5) and (5, 29) mismatched. Named rank 5. A single replay of rank 13 by rank 5 would have blamed the healthy rank 13 Check 2
Other forward faults on rank 13, every step from step 23: one element ×10,000, 10% multiplicative noise on the whole output, bit 3 flipped in one bf16 element, and one output column ×1.1 Each named rank 13 at step 30. The bit flip and the ×1.1 column were also caught with default-kernel audits Check 2
One element of the gradient flowing into rank 13’s layer, or of its weight gradient, ×1,000, every step from step 23 (backward only) Each named rank 13 at step 30, from the gradient fingerprints alone Check 2
The weight-gradient fault above, with default-kernel audits No alarm in 50 steps. The checkpoints at steps 20 and 40 were tagged with passing audits and weight checks, because the loss was unaffected and every copy had applied the same corrupted updates Not caught
The persistent forward ×1,000 on ranks 13 and 22 at once Pairs (13, 5), (21, 13), (22, 14) and (30, 22) mismatched. Named ranks 13 and 22 Check 2
Bit 22 flipped in one fp32 weight element on rank 0 after the step-31 update, with a checkpoint every 5 steps The forced weight check at checkpoint step 35 named rank 0, and the save didn’t happen. Suspect window: steps 31–35 Check 3
The same, with check_on_checkpoint=False The save at step 35 went ahead from rank 0’s corrupted copy. Its tags showed the last passing weight check at step 30. The ring audit named rank 0 at step 40, from pairs (8, 0) and (0, 24) Check 2
Two values swapped, or +4,096 and −4,096 added to the bit patterns of two values, in one weight tensor on rank 0 after the step-31 update, with no audits and weight checks every 10 steps Each named rank 0 at the step-40 weight check, although the tensor’s plain bit sum hadn’t changed Check 3
Bit 22 flipped in one attention weight on rank 7, after restoring the snapshot (a stand-in for loading a checkpoint) find_divergent_ranks, run before the first step, named rank 7 Check 3

无故障运行Fault-free runs

为了测量误报率,我们在两种集群规模下都进行了无故障训练,每种规模采用三种调度方案。每种方案都每 10 步进行一次权重检查,且不保存检查点;每次运行的时长都固定为若干分钟,因此,每步审计的两种方案贡献了大部分审计步数:To measure false alarms, we trained without faults on both cluster sizes, with three schedules each. Every schedule ran the weight check every 10 steps and saved no checkpoints, and each run’s length was fixed in minutes, so the two schedules that audit every step contribute most of the audit steps:

Instances Audits Minutes Steps Audit steps Weight checks Alarms
4 Deterministic, every step 45 4,600 4,600 460 0
4 Default kernels, every step 22.5 5,400 5,400 540 0
4 Deterministic, every 10 steps 45 12,800 1,280 1,280 0
3 Deterministic, every step 15 1,600 1,600 160 0
3 Default kernels, every step 7.5 2,000 2,000 200 0
3 Deterministic, every 10 steps 15 4,400 440 440 0
Total 150 30,800 15,320 3,080 0

在 15,320 个审计步骤中没有出现任何告警,根据三法则,误报率的 95% 上限为 3 / 15,320,约为每 5,100 个审计步骤 1 次误报。NaN/Inf 检查在任何无故障步骤中也都没有触发。《为什么不比较局部梯度范数?》中的梯度范数分析仅使用了 4 个实例的运行结果。With 0 alarms in 15,320 audit steps, the rule of three puts a 95 percent upper bound of 3 / 15,320, about 1 in 5,100, on the false-alarm rate per audit step. The NaN/Inf checks didn’t fire on any fault-free step either. The gradient-norm analysis in Why not compare local gradient norms? uses the 4-instance runs only.

超越 DDPBeyond DDP

权重比较并不局限于 DDP。find_divergent_ranks 接受任意数据并行组,因此也适用于张量并行、流水线并行和上下文并行、HSDP 以及混合专家;这些布局都会为每个权重保留独立副本。对于 ZeRO-1 或完全分片的 FSDP,则无法使用它,因为每个分片的更新只在一个 rank 上计算。本文中的检查和训练循环仅在 DDP 下进行了测试。The weight comparison isn’t limited to DDP. find_divergent_ranks takes any data-parallel group, so it also applies to tensor, pipeline, and context parallelism, HSDP, and mixture of experts, which are all layouts that keep independent copies of each weight. It can’t help under ZeRO-1 or full FSDP sharding, where each shard’s update is computed on only one rank. We tested the checks and the training loop in this post only with DDP.

要在另一种布局中使用它,请对保存同一分片副本的组调用 find_divergent_ranks。只有两个副本时,它可以检测到不一致,但无法指出哪个副本有问题。To use it in another layout, call find_divergent_ranks with the group that holds copies of the same shard. With only two copies, it can detect a disagreement but can’t name the faulty copy.

如果您更希望由服务为您检查节点,SageMaker HyperPod 还提供 MultiNodeTraining 深度运行状况检查。它会在一批 GPU 节点上运行一个简短、固定的分布式训练作业,无需更改代码;如果节点的训练损失变为 NaN 或 Inf、发生发散,或未能在规定时间内完成,系统就会替换该节点。创建实例组时,可将其与 InstanceStress 和 InstanceConnectivity 一同选中;也可以通过 StartClusterHealthCheck 按需运行。它可以补充本文介绍的检查:在作业运行到新节点或替换节点上之前,用它筛查这些节点;再通过作业内检查,捕获您自己的训练中出现、但不会变成 NaN 或 Inf 的错误值。详情请访问 SageMaker HyperPod 深度运行状况检查。If you’d rather have the service check your nodes for you, SageMaker HyperPod also offers the MultiNodeTraining deep health check. It runs a short, fixed distributed training job across a batch of GPU nodes, with no code changes, and replaces nodes whose training loss turns NaN or Inf, diverges, or doesn’t finish in time. Select it alongside InstanceStress and InstanceConnectivity when you create an instance group, or run it on demand with StartClusterHealthCheck. It complements the checks in this post: use it to screen new and replacement nodes before your job lands on them, and the in-job checks to catch wrong values in your own training that never become NaN or Inf. For details, visit SageMaker HyperPod Deep Health Checks.

清理Clean up

为避免持续产生费用,请删除你为测试创建的资源。如果创建了 HyperPod 集群,请使用 `aws sagemaker delete-cluster --cluster-name <cluster-name>` 将其删除。这只会移除 HyperPod 资源。请在删除 HyperPod 集群后,分别删除 EKS 集群、其附加组件以及任何 Amazon FSx 卷。请参阅《删除 SageMaker HyperPod 集群》。To avoid ongoing charges, delete what you created for testing. If you created a HyperPod cluster, delete it with aws sagemaker delete-cluster --cluster-name <cluster-name>. That removes only the HyperPod resources. Delete the EKS cluster, its add-ons, and any Amazon FSx volumes separately, after the HyperPod cluster. See Deleting a SageMaker HyperPod cluster.

结论Conclusion

在这篇文章中,我们介绍了如何检测数据并行训练中的静默数据损坏,以及如何将可疑节点交由 SageMaker HyperPod 替换。三项检查分别覆盖故障可能出现的三个环节:检查每个 rank 的梯度和归约后的梯度是否存在 NaN/Inf;通过环形重放,将每块 GPU 的计算结果与另一节点上的 GPU 进行比较;以及在更新后比较权重指纹。前两项检查应在优化器步骤之前运行;检查失败时,不要执行该步骤;并在每次创建检查点之前比较权重。在 SageMaker HyperPod EKS 集群中,节点名称可将可疑 rank 对应到实例 ID。接着,将该节点隔离,回滚到可疑时间窗口之前的检查点,再由节点健康标签或 Replace API 完成恢复。In this post, we showed how to detect silent data corruption in data-parallel training and how to hand a suspect node to SageMaker HyperPod for replacement. Three checks cover the three places a fault can land: a NaN/Inf check on each rank’s gradient and on the reduced gradient, a ring replay that compares every GPU’s work with a GPU on another node, and a weight fingerprint comparison after the update. Run the first two before the optimizer step, don’t apply a step that failed a check, and compare weights before every checkpoint. Node names on SageMaker HyperPod EKS clusters turn the suspect rank into an instance ID. Then quarantine the node, roll back to a checkpoint from before the suspect window, and let the node-health label or the Replace API complete the recovery.

首先,了解适用于 Amazon EKS 的 SageMaker HyperPod 弹性功能,并试用配套代码库。若要深入了解,请参阅深度运行状况检查和可观测性附加组件。To get started, review the SageMaker HyperPod resiliency features for Amazon EKS, and try the companion repository. To go deeper, see deep health checks and the observability add-on.


关于作者About the authors

Siddharth Senger

悉达尔特·森格尔Siddharth Senger

Siddharth 目前担任亚马逊云科技(AWS)高级软件开发工程师,任职于 SageMaker HyperPod 团队。凭借近十年的软件开发经验,Siddharth 曾为亚马逊多个团队作出贡献,包括零售业务、Amazon Rekognition、Amazon Textract 和 Amazon SageMaker。他热衷于构建可靠、可扩展且高效的分布式系统,助力客户加速大规模机器学习和 AI 创新。Siddharth currently serves as a Senior Software Development Engineer at Amazon Web Services (AWS), specifically within the SageMaker HyperPod team. Bringing nearly a decade of software development experience, Siddharth has contributed to several teams across Amazon, including Retail, Amazon Rekognition, Amazon Textract, and Amazon SageMaker. He is passionate about building reliable, scalable, and efficient distributed systems that empower customers to accelerate large-scale machine learning and AI innovation.

Roy Allela

罗伊·阿莱拉Roy Allela

Roy 是 AWS 的首席 AI/ML 专业解决方案架构师。他与 AWS 客户合作,涵盖初创公司和大型企业,帮助他们在 AWS 上高效训练和部署基础模型。他拥有微处理器工程背景,热衷于计算优化问题以及提升 AI 工作负载的性能。Roy is a Principal AI/ML Specialist Solutions Architect at AWS. He works with AWS customers, from startups to large enterprises to train and deploy foundation models efficiently on AWS. He has a background in Microprocessor Engineering. He is passionate about computational optimization problems and improving the performance of AI workloads.

Nilesh PS

尼莱什 PSNilesh PS

Nilesh 是 AWS 的高级软件开发工程师,负责 Amazon SageMaker HyperPod。他专注于 Ray 集群管理、训练韧性,以及 Kubernetes 上大规模分布式机器学习工作负载的可观测性。Nilesh is a Senior Software Development Engineer at AWS working on Amazon SageMaker HyperPod. He focuses on Ray cluster management, training resiliency, and observability for large-scale distributed ML workloads on Kubernetes.

Pradeep Cruz

普拉迪普·克鲁兹Pradeep Cruz

Pradeep 是 AWS 的高级软件开发经理,负责领导 SageMaker HyperPod 基础设施,为企业级 AI、训练、推理和模型定制提供支持。他拥有超过 20 年的经验,曾在 AWS、T-Mobile 和 Ericsson 推动关键 AI/ML 平台从 0 到 1 并实现规模化。他是分布式系统和基础设施领域的专家,拥有密歇根大学罗斯商学院的 MBA 学位。Pradeep is a Senior Software Development Manager at AWS, leading SageMaker HyperPod infrastructure for enterprise AI, Training, Inference and Model Customization. With over 20 years of experience, he has scaled critical 0-to-1 AI/ML platforms across AWS, T-Mobile, and Ericsson. An expert in distributed systems and infrastructure, he holds an MBA from Michigan Ross.

值得记下

  1. SDC 会避开所有这些功能,因为硬件根本不会报告任何问题。检测必须由训练任务本身完成。
  2. 捕获 SDC 的方法,就是检查计算本身的结果。
  3. 全归约过程本身也可能发生故障,例如某个 GPU 错误地累加了部分和;这种故障同样会以完全相同的结果传递到每个副本。

← 回到本期 · 第 10 条