A non-intrusive low-overhead fault localization system for distributed training of large models

By introducing a three-layer architecture of NCCL Probe, local controller and global controller into a large-scale distributed training system, combined with BOCD change point detection and multiple threshold filtering, non-intrusive and low-overhead fault localization is achieved, solving the problem of automatic identification of performance degradation and downtime faults, improving training efficiency and reducing resource waste.

CN123137977APending Publication Date: 2026-11-20RUILIAN INTELLIGENT COMPUTING (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611051262.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

In large-scale distributed training systems, performance degradation faults are difficult to detect in a timely manner, leading to a decrease in overall training efficiency. Furthermore, traditional fault location methods are time-consuming and wasteful of resources. Especially on high-cost GPU resources, existing technologies struggle to achieve high-precision, low-overhead automated fault location.

Method used

It adopts a three-layer architecture of NCCL Probe, local controller and global controller. By hijacking NCCL API calls and combining BOCD change point detection and multiple threshold filtering mechanisms, it can achieve non-intrusive and low-overhead fault location, including automatic detection and accurate location of performance degradation and downtime faults.

Benefits of technology

It achieves low-overhead, high-precision fault location in large-scale training systems, with an overhead of approximately 0.05% during the monitoring phase and a false trigger rate of 0% during the analysis phase. It can automatically identify performance degradation and downtime faults without human intervention, thereby improving training efficiency and reducing resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123137977A_ABST
    Figure CN123137977A_ABST
Patent Text Reader

Abstract

The application provides a large model distributed training non-intrusive low-overhead fault positioning system, and belongs to the technical field of large model distributed training. The system comprises an NCCL probe, a local controller and a global controller. The NCCL probe runs in the training process, shares an address space with training code, hijacks NCCL API calls through LD_PRELOAD, and writes communication events into shared memory. The local controller is deployed on each computing node, interacts with the NCCL probe through shared memory, reads and processes communication events. The global controller runs on the master node, communicates with each local controller through Redis, gathers global performance information and drives state switching, and the state includes a monitoring state and a profiling state. The application provides deployable, scalable and engineering feasible fault positioning capability for large model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of large model distributed training technology, specifically relating to a non-intrusive, low-overhead fault location system for large model distributed training. Background Technology

[0002] As model size and training cluster size continue to grow, failures are becoming increasingly common in large-scale training processes. From a probabilistic perspective, assuming the probability of a single computing node failing per unit of time is... p ,but N The probability that all nodes maintain normal operation at the same time is .because As the cluster size increases N As the amount of energy increases, the probability of the system operating without failure will decrease exponentially. Existing research has shown that in kilocalorie-level training clusters, the mean time between failures (MTBF) is typically only a few hours to tens of hours.

[0003] In large-scale training environments, failures can be broadly categorized into two types. The first type is shutdown failure, which refers to nodes completely ceasing operation and unable to continue training. Examples include GPU hardware failure, power failure, network interruption, or operating system crash. These failures are usually detected relatively quickly, but recovery is costly, often requiring a reload of the entire training state from a checkpoint. The second type is performance degradation failure, which refers to nodes still being able to participate in training, but with a significantly reduced execution speed. This can be caused by factors such as reduced GPU frequency, hot throttling, network congestion, memory bandwidth contention, or software resource contention. Compared to shutdown failures, performance degradation failures are more insidious, and traditional survival detection mechanisms often struggle to detect them in a timely manner.

[0004] In distributed training with synchronous execution models, performance degradation nodes can significantly impact overall training efficiency. In common synchronous data parallel or model parallel training, each node must wait for the slowest node to complete computation or communication at the communication synchronization point. Therefore, a single slow node can slow down the entire training process, creating a "weakest link" effect. When the training scale reaches hundreds or even thousands of GPUs, even performance degradation in only a few nodes can lead to a significant decrease in overall training throughput.

[0005] However, locating anomalous nodes in large-scale training clusters is often extremely difficult. When training tasks experience performance degradation, operations personnel typically need to troubleshoot through log analysis, system monitoring, hardware diagnostics, and node-by-node isolation testing. This process often takes hours or even days and results in a significant amount of idle or inefficient use of GPU resources. Considering that the cloud rental cost of high-end GPUs is typically several dollars per hour, even a few hours of troubleshooting can lead to significant economic losses in training tasks with thousands of GPUs. For large-scale model training tasks with overall training costs often reaching millions of dollars, such resource waste is unacceptable.

[0006] Therefore, building an automated fault location mechanism in large-scale training systems is of great significance. An ideal system should simultaneously meet the following requirements: it should be able to accurately locate specific computing units; it should have a low false alarm rate, avoiding unnecessary intervention and interruptions; it should have low monitoring overhead, minimizing its impact on training performance; it should be able to adapt to various parallel modes, including expert parallelism; and it should be able to run automatically without human intervention. Summary of the Invention

[0007] This invention addresses the shortcomings of existing technologies by providing a non-intrusive, low-overhead fault location system with large-scale distributed training, which simultaneously meets the four requirements of non-intrusiveness, low overhead, high accuracy, and MoE compatibility.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] A non-intrusive, low-overhead fault localization system for distributed training of large models includes: NCCL Probe, local controllers, and a global controller. The NCCL Probe runs within the training process, shares the address space with the training code, hijacks NCCL API calls via LD_PRELOAD, and writes communication events to shared memory. The local controllers are deployed on each computing node, interact with the NCCL Probe through shared memory, and read and process communication events. The global controller runs on the master node, communicates with each local controller through Redis, aggregates global performance information, and drives state switching. The states include a monitoring state and a profiling state. The monitoring state is continuously executed during training, taking the iteration time of the training framework as input, and identifies persistent performance degradation through BOCD change point detection and multiple threshold filtering mechanisms. The profiling state is triggered after persistent performance degradation is detected in the monitoring state, and is used to analyze communication latency and locate slow ranks.

[0010] Optionally, the monitoring status includes two parallel data paths: a performance degradation monitoring path and a shutdown fault detection path. In the performance degradation monitoring path, the training framework reports the iteration time to the remote Redis after each iteration, and the global controller pulls the time series from Redis and performs BOCD analysis to detect change points. In the shutdown fault detection path, the probe dynamic library writes NCCL call metadata to shared memory, and the local controller reads the call interval from shared memory. If a certain rank has no new calls within the dynamic time window, it is determined to be a shutdown fault and immediately reported to Redis. The global controller then aggregates the data and triggers an alarm.

[0011] Optionally, when the training framework reports the iteration time to the remote Redis after each iteration, it uses a Redis list structure organized by the rank dimension to store the iteration number and corresponding delay for each iteration.

[0012] Optionally, the global controller performs BOCD analysis to detect change points, specifically by: analyzing the time series { 1, 2, , Calculate the posterior distribution of the runtime at each time step. ( | 1: ),in, This indicates the running length from the previous variable point. 1: Representing time series { 1, 2, , },when ( =0 | 1: When the threshold is exceeded, the current moment is determined to be a change point.

[0013] Optionally, during the process of the global controller performing BOCD analysis to detect change points, the following four-fold filtering is also performed simultaneously: The first layer of filtering is persistence verification: Let's assume... The data is to the left of the variable point. The data is to the right of the variable point. ′ To calculate the baseline mean (mean) by removing the data from the first point to the right of the variable point. ), Degeneration mean ( ) and recent mean ( ′ ), mean( ) represents the normal performance baseline before the change point, mean( ) represents the mean performance after the change point and including the change point, mean( ′ () represents the performance mean after the change point and excluding the change point; Calculate the recovery ratio: ; When recovery rate A recovery rate of 0.75 indicates performance recovery; a recovery rate exceeding 75% indicates a transient failure and is filtered out; a recovery rate of <0.75 indicates persistent degradation and requires switching to profiling mode. The second layer of filtering is a distance threshold constraint: for multiple adjacent variable points returned by a single BOCD, if the distance between adjacent variable points is less than 2 iterations, only the first variable point is retained and subsequent variable points are filtered. The third layer of filtering is warm-up filtering: skipping the data from the first 3 iterations of training. The fourth layer of filtering is outlier removal: before performing BOCD, data preprocessing is performed to remove outliers with a standard score exceeding 3.0.

[0014] Optionally, the data path for the analysis state is as follows: After the global controller detects a valid change in BOCD, it switches the Redis control state to profiling mode, and the local controller reads this state. The local controller writes the new state to shared memory. The probe dynamic library reads the state from shared memory and injects it into CUDA Events to time NCCL operations. The probe dynamic library writes the profiling data to shared memory, and the local controller reads it and calculates statistics. The local controller reports the statistics to Redis, and the global controller reads the statistics and communication group instance information in the communication events and executes a two-stage localization algorithm to identify slow ranks. The global controller restores the control state to monitoring mode.

[0015] Optionally, the two-stage localization algorithm includes two stages: communication group-level screening and rank-level localization; In the communication group-level screening stage, communication group instances are first grouped by id_hash, and communication group instances with the same id_hash are considered to be in the same communication group. Combining the parallel state information provided by the training framework, the communication label corresponding to each communication group is identified. Subsequently, for each type of communication label, the latency distribution of all communication groups under that communication label is statistically analyzed, and the maximum average latency of each communication group is calculated as max_avg_latency. The communication group with the largest max_avg_latency is selected as the candidate abnormal communication group. During the rank-level localization phase, within the candidate abnormal communication group, the latency records of all communication group instances participating in that rank are aggregated by rank, and the average communication latency avg_latency for each rank is calculated. The rank with the smallest avg_latency is selected as a potential slow rank candidate.

[0016] Optionally, the local controller monitors the NCCL event records in the shared memory and counts the number of calls for each rank within a given time window. If no new NCCL calls occur for a certain rank within the time window, it is determined to be a shutdown failure. After the detection is triggered, the local controller immediately writes the result to the shutdown event list of Redis, and the global controller summarizes the reports from each compute node and triggers an alarm.

[0017] The beneficial effects of this invention are as follows: This invention addresses the fault location problem in large-scale distributed training of models by proposing and implementing a non-intrusive, low-overhead fault location system called FLASH (Fast Low-overhead Automatic Straggler Handling). This system, based on non-intrusive access and low runtime overhead, constructs a complete link from anomaly detection to rank-level localization. FLASH achieves transparent access to the training code by hijacking the NCCL API; it uses shared memory and a hierarchical control plane to complete low-overhead data acquisition and state coordination; and it combines BOCD change point detection, multiple threshold filtering, and a two-stage localization algorithm to achieve step-by-step convergence from communication group screening to slow-rank identification in complex parallel scenarios. For the MoE scenario, the system improves localization stability through cross-parallel group evidence fusion, while also supporting shutdown fault detection.

[0018] Experimental results show that FLASH has an overhead of approximately 0.05% during the monitoring phase and a false trigger rate of 0 during the profiling phase, with negligible impact on training throughput. In terms of accuracy, FLASH maintains 100% recall under moderate to severe faults (≥25% performance degradation) and achieves 100% precision across all fault intensities. Compared to GreyHound, FLASH outperforms GreyHound in both precision and recall under moderate to severe faults. In shutdown fault scenarios, FLASH maintains 100% precision and recall.

[0019] In summary, FLASH provides deployable, scalable, and engineering-feasible fault location capabilities for large model training. Attached Figure Description

[0020] Figure 1 It is a FLASH control state machine.

[0021] Figure 2 This is a data flow diagram for the monitoring phase.

[0022] Figure 3 This is a data flow diagram for the analysis phase.

[0023] Figure 4 This is a flowchart of the two-stage localization algorithm. Detailed Implementation

[0024] The invention will now be described in further detail with reference to the accompanying drawings.

[0025] This invention proposes a non-intrusive, low-overhead fault location system, FLASH, for large-scale distributed training. FLASH employs a three-layer architecture to achieve transparent and low-overhead fault location capabilities. NCCL Probe (C++ Data Plane): This module intercepts NCCL API calls via LD_PRELOAD and writes communication events to shared memory. Running within the training process and sharing the address space with the training code, it can directly access the NCCL communication context. The core responsibilities of NCCL Probe include: intercepting NCCL function calls (such as ncclAllReduce, ncclBroadcast, etc.), recording communication event metadata (such as communication group instance address, call sequence number, timestamp), collecting precise latency using CUDA Events in profiling mode, and maintaining topology information related to communication group instances.

[0026] Local Controller (Python Control Plane): Each compute node deploys a local controller process responsible for intra-node monitoring and data reporting. The local controller interacts with the NCCL Probe via shared memory, reading and processing NCCL event data. Its core responsibilities include: extracting communication events from shared memory, performing shutdown fault detection (identifying stalled ranks), responding to profiling requests issued by the global controller, reporting profiling statistics to Redis, and dynamically adjusting the profiling duration based on model iteration time.

[0027] Global Controller (Python Control Plane): The global controller process runs on the master node and is responsible for global coordination and diagnostic decisions. The global controller communicates with each local controller via Redis, aggregating global performance information and driving state transitions. Its core responsibilities include: obtaining iteration times from the training framework, performing BOCD change point detection, coordinating pre-checks (performance verification before training) across nodes, managing and monitoring / analyzing the state machine, triggering profiling results, and ultimately identifying slow rank nodes (and mapping them to their respective nodes).

[0028] The FLASH control state machine defines two states: Monitoring state (value 0) represents normal monitoring, where the system only records NCCL call timestamps and does not enable CUDA Events to minimize runtime overhead; Profiling state (value 1) represents fine-grained profiling, where the system enables CUDA Events to collect detailed execution latency data, resulting in higher overhead but more comprehensive location information. State transitions are centrally controlled by the global controller and broadcast to all nodes via Redis. The control state machine is as follows: Figure 1 As shown.

[0029] The system data flow adopts a layered communication strategy: shared memory is used within nodes, and Redis is used between nodes. Shared memory provides nanosecond-level read and write latency, which is suitable for high-frequency NCCL event recording; Redis provides stable cross-node communication and persistence capabilities, which is suitable for low-frequency control messages and statistical data reporting.

[0030] Non-intrusive integration is a core feature of Flash. The transparent hijacking mechanism based on LD_PRELOAD requires no modification to the main logic of the training framework; the framework only needs to report the iteration time via callbacks, with core modifications of less than 10 lines. This design ensures low coupling between Flash and the training framework, enabling rapid deployment to mainstream frameworks such as PyTorch and Megatron-LM.

[0031] The monitoring phase is the normal operating phase of FLASH, continuously executed during training. This phase takes the framework-side iteration time as input and uses BOCD change point detection and multiple threshold filtering mechanisms to identify persistent performance degradation while avoiding false alarms for transient fluctuations. The data flow of the monitoring phase is as follows: Figure 2 As shown.

[0032] Data Paths. The monitoring phase includes two parallel data paths. The first is the performance degradation monitoring path: after each iteration, the training framework reports the iteration time to a remote Redis instance. The global controller retrieves this sequence from Redis and performs BOCD analysis to detect change points. The second is the downtime fault detection path: the probe dynamic library writes NCCL call metadata to the node's local shared memory. The local controller reads the call interval from the shared memory. If a certain rank has no new calls within the dynamic time window, it is determined to be a downtime fault and immediately reported to Redis. The global controller then aggregates the data and triggers an alarm.

[0033] Data collection mechanism. The training framework reports the iteration time via a callback at the end of each iteration. In Megatron-LM, this mechanism allows writing the time information to Redis with a single line of code. Storage uses a Redis list structure organized by rank, recording the iteration number and corresponding latency for each round. The system uses the iteration time of Rank 0 as the benchmark because during synchronous training, all ranks are aligned at the synchronization point, and the iteration latency of Rank 0 can stably represent overall performance changes.

[0034] This design has four advantages: it eliminates the need to infer iteration boundaries at the C++ layer, avoiding complex cycle identification logic; the framework-side timing covers the entire process of forward, backward, gradient synchronization, and optimizer updates, enabling a more realistic reflection of training performance; each Redis write operation has an overhead of approximately 100 microseconds, which has a negligible impact on training throughput; and the Redis list can naturally maintain a sliding window (by default, it retains a maximum of 500 records), preventing the unbounded growth of historical data.

[0035] BOCD (Bayesian Online Change Point Detection) algorithm. BOCD is used to identify structural changes in time series data in real time. Compared to fixed thresholds or simple statistical methods, BOCD makes decisions based on posterior probability, making it more suitable for handling dynamic fluctuations during training.

[0036] The core idea of ​​BOCD is: to analyze time series { 1, 2, , Calculate the posterior distribution of the runtime at each time step. ( | 1: ),in This represents the run length from the previous variable point. When... ( =0 | 1: When the threshold is exceeded, the system will determine the current moment as a change point.

[0037] FLASH uses the mature BOCD implementation library. Key parameters include: a sliding window size of 30 iterations to ensure sufficient sample size and control historical dependencies; a change-point probability threshold of 0.8, meaning a candidate alarm is triggered only when the posterior probability reaches 80%; and a performance degradation threshold of 0.2, meaning that subsequent processing is only initiated when performance degrades by more than 20%. These parameters are based on experimental tuning, achieving a balance between detection sensitivity and false alarm rate.

[0038] The core advantage of BOCD lies in its adaptive capability. Fixed threshold methods struggle to cover natural fluctuations during training (such as latency variations caused by batch differences), while BOCD can dynamically update the baseline distribution based on historical observations, achieving more robust detection even when significant performance spikes occur.

[0039] Multiple threshold filtering mechanisms. Candidate changes output by BOCD must undergo multiple verifications before being confirmed as persistent faults. FLASH employs quadruple filtering during the monitoring phase to ensure that the profiling process is triggered only for real and impactful degradation events.

[0040] The first layer of filtering is persistence verification. The system distinguishes between transient fluctuations and persistent degradation based on the recovery ratio, defined as follows: set up x l The data to the left of the variable point (left-side sequence). x r The data to the right of the change point (the right-hand sequence, including the change point). ′ Remove the first data point to the right of the change point (the right-hand sequence, excluding the change point). Calculate the three means: Baseline mean = mean( Normal performance baseline before the change point: Degeneracy mean = mean( ): Average performance after the change point (including the change point) Recent mean = mean( ′ ): Average performance after the change point (excluding the change point) The recovery ratio is defined as:

[0041] This metric is used to measure the degree of recovery after degradation: when the recovery rate... A recovery rate of 0.75 indicates that performance recovery exceeds 75%, which is judged as a transient fault (such as short-term network jitter) and filtered out; when the recovery rate is <0.75, it indicates that the degradation is persistent and enters the analysis stage.

[0042] For example: Assume the baseline mean = 17345ms, the degradation mean = 26932ms, and the recent mean = 19323ms. Then the recovery ratio = (26932 - 19323) / (26932 - 17345) = 0.79, indicating a recovery of 79%, which is classified as a transient failure. If the recent mean = 25000ms, then the recovery ratio = 0.20, indicating a recovery of only 20%, which is classified as a persistent failure.

[0043] The second layer of filtering is a distance threshold constraint. A single BOCD may return multiple adjacent change points; if the distance between adjacent change points is less than two iterations, only the first change point is retained and subsequent change points are filtered to avoid repeated alarms for the same event. In actual operation, a single detection usually only produces one valid change point.

[0044] The third layer of filtering is the warm-up filtering. The first three iterations of training are usually unstable due to initialization, memory allocation, and compilation optimization. FLASH skips the processing of data in this stage to reduce false alarms.

[0045] The fourth layer of filtering is outlier removal. Before performing BOCD, data preprocessing is performed to remove outliers with a standard score exceeding 3.0, in order to reduce the interference of extreme values ​​on the detection results.

[0046] The four-layered filtering mechanism ensures that only genuine and persistent performance degradation is detected during the profiling phase. Experimental results show that this design can keep the false alarm rate below 5%.

[0047] The profiling phase is triggered after persistent performance degradation is detected during the monitoring phase. Its goal is to accurately analyze communication latency and pinpoint slow rank. This phase is based on CUDA Event timing and a two-stage localization algorithm, utilizing the synchronization semantics of aggregated communication to inversely identify anomalous ranks. The data flow of the profiling phase is as follows: Figure 3 As shown.

[0048] Data Path. The profiling phase can be divided into 6 steps in execution order. Step ①: After the global controller detects a valid change point in BOCD, it switches the remote Redis control state to profiling mode; the local controller reads this state. Step ②: The local controller writes the new state to the node's shared memory. Step ③: The probe dynamic library reads the state from the shared memory and injects CUDA Events to accurately time NCCL operations. Step ④: The probe dynamic library writes the profiling data to the shared memory, and the local controller reads it and calculates the statistics (min / max / avg / std). Step ⑤: The local controller reports the statistical results to Redis, and the global controller reads the statistical data and communication group instance information and executes a two-stage localization algorithm to identify slow rank. Step ⑥: The global controller restores the control state to monitoring mode, and the system returns to normal monitoring.

[0049] State transition mechanism. The analysis phase is triggered uniformly by the global controller, and the state transition process is as follows: Upon detecting persistent degradation, the global controller sets the Redis status key to profiling mode (value 1). The local controller polls Redis every 100-500ms, writing the status to local shared memory upon detecting a change. The status field in shared memory is maintained by atomic variables, supporting lock-free single writes and multiple reads. The NCCL Probe reads this status at the end of each group and switches its behavior upon detecting a change: monitoring mode only records timestamps, while profiling mode enables CUDA Events.

[0050] The profile duration employs a dynamic strategy: `profile_period = max(latest_iter_time×2.2, 20.0)`. This formula ensures the profile window covers approximately 2.2 iterations and sets a lower limit of 20 seconds to ensure sufficient sample size. This mechanism adapts to different model sizes: profiles are completed quickly when iteration times are short, and the profile window is automatically extended when iteration times are long.

[0051] This state switching mechanism has four characteristics: low latency (NCCL Probe reads shared memory locally, with nanosecond-level overhead), low contention (atomic variables are written to multiple times, avoiding lock contention), low dependency (no need for the training framework to send additional control signals), and adaptiveness (the parsing time is dynamically adjusted according to the current iteration speed).

[0052] CUDA Events provide precise timing. In profiling mode, FLASH uses CUDA Events to measure NCCL operation latency. CUDA Events are a lightweight time-stamping mechanism provided by CUDA that records time points in the GPU stream with microsecond-level timing accuracy.

[0053] The specific implementation is as follows: Before each NCCL call, insert cudaEventRecord(start_event, stream) to record the start time; after the call (especially ncclGroupEnd()), insert cudaEventRecord(stop_event, stream) and cudaEventSynchronize(stop_event) to record the end time and wait for completion; finally, calculate the time elapsed using cudaEventElapsedTime(&duration, start_event, stop_event).

[0054] The key advantage of CUDA Events lies in measuring the actual execution interval of the GPU kernel, which includes GPU-side synchronization wait time. The NCCL source code shows that the set communication kernel contains synchronization wait steps. Taking RingAllReduce as an example, each rank executes waitPeer() before sending data to wait for the preceding rank to be ready. waitPeer() manifests as a busy-wait loop within the GPU kernel: __device__ void waitPeer() { while (connStepCache <step + StepperSlice) { connStepCache = loadStepValue(connStepPtr); } } Therefore, CUDA Event timing naturally covers the waitPeer() waiting overhead, which forms the key technical basis for FLASH reverse identification of slow rank.

[0055] Two-stage localization algorithm. The core algorithm of FLASH is two-stage localization, which is based on a counterintuitive phenomenon: slower rank may actually result in shorter communication time.

[0056] The theoretical basis for this principle is as follows: In aggregated communication, all ranks need to be synchronized. After a fast rank reaches the synchronization point, it needs to wait for a slow rank to arrive; this waiting time is included in the measurement time by the CUDA Event. The slow rank arrives at the synchronization point last, while all other ranks are waiting, so communication can begin without waiting, and the measurement time only includes the pure communication time.

[0057] Representing this process using time intervals: Assume 8 ranks undergo AllReduce, with rank 7 being the slow rank. The execution interval for the fast ranks (ranks 0-6) is [ T _0, T _{end}], where T _0 represents a unified start time. T_end This is the time to complete synchronously. Measurement time S = T _end - T _0 = wait time + communication time. The execution range for slow rank (rank 7) is [ T _7, T _{end}], where T _7 is the time it reached the synchronization point (later than) T _0). Measurement time S = T _end - T _7 = Pure communication time (no waiting).

[0058] Experimental observations show that this phenomenon also exists in real-world training environments. For example, in an AllReduce operation containing 8 ranks, the communication time measured for the normal rank is approximately 266ms, while the time measured for the slow rank is only 3ms, significantly shorter than the measurement results for other ranks.

[0059] Based on the aforementioned communication timing characteristics, FLASH employs a two-stage process to progressively narrow down the search scope: first, it filters out abnormal candidate groups at the communication group level, and then identifies specific slow ranks within each candidate group. The overall process is as follows: Figure 4 As shown.

[0060] Phase 1: Communication Group-Level Screening. First, NCCL communication group instances are grouped by their `id_hash`, with instances sharing the same `id_hash` considered to belong to the same group. Combining the parallel state information provided by the training framework (such as TP, DP, PP groups), the system can identify the parallel semantics corresponding to each communication group. Subsequently, for each communication label, the system statistically analyzes the latency distribution of all communication groups under that label and calculates the `max_avg_latency` (i.e., the maximum average latency of communication group instances within that group) for each group. Since slow ranking slows down the entire synchronous communication process, communication groups containing slow ranking instances typically exhibit significantly higher latency. In this phase, the algorithm selects the communication group with the largest `max_avg_latency` as a candidate anomalous communication group.

[0061] Phase Two: Rank-Based Localization. After identifying candidate communication groups, the system further identifies specific slow ranks within each group. Specifically, it aggregates the latency records of all communication group instances participating in a given rank and calculates the average communication latency (avg_latency) for each rank. Based on the aforementioned communication timing characteristics, slow ranks tend to measure shorter communication times, thus their avg_latency will be significantly lower than other ranks. The algorithm selects the rank with the lowest avg_latency within the communication group as a potential slow rank candidate.

[0062] To avoid misjudgment due to small samples, FLASH introduces a coefficient of variation (COP) check: Calculate the mean and standard deviation of the average delay for each rank. If the COP (standard deviation / mean) is less than 0.1, it indicates that the sample differences are insufficient to support stable discrimination, and the screening is skipped. Outliers are only screened using a percentage threshold (default 20%) when the COP is not lower than 0.1.

[0063] Hybrid parallel cross-localization. In hybrid parallel scenarios (such as TP+DP+PP), a single rank often participates in multiple communication groups simultaneously. FLASH summarizes the detection results of multiple parallel tags; if multiple tags consistently point to the same rank, the diagnostic confidence is significantly improved. The system ultimately outputs CRITICAL-level logs and provides evidence: SLOW RANK IDENTIFIED CANDIDATE RANK: rank_x Evidence from multiple tags: - Tag 'group_type_a', Clique [rank_set_a]: avg latency = value_a (minimum in clique) - Tag 'group_type_b', Clique [rank_set_b]: avg latency = value_b (minimum in clique) This cross-validation mechanism improves the reliability of the detection and reduces the risk of false alarms.

[0064] In addition to performance degradation failures, FLASH also supports fail-stop detection. A fail-stop failure refers to a node or process completely stopping and unable to continue participating in training.

[0065] The detection mechanism is based on the NCCL API call frequency. The local controller monitors the NCCL event records in shared memory and counts the number of calls for each rank within a given time window. The time window length is dynamically adjusted according to the iteration time (e.g., set to twice the iteration time) to adapt to models of different sizes.

[0066] If no new NCCL calls occur within a given window for a certain rank, it is considered a fail-stop. Once triggered, the local controller immediately writes the result to the Redis stop event list, and the global controller aggregates reports from all nodes and triggers an alarm.

[0067] The design has three advantages: the dynamic window can adapt to different model sizes without manual parameter tuning; the decision logic based on NCCL call frequency is simple and reliable, without the need for an additional heartbeat mechanism; and the detection latency is predictable, approximately equal to the time window length, typically in the range of tens of seconds to several minutes.

[0068] The above are merely preferred embodiments of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A non-intrusive, low-overhead fault localization system for distributed training of large models, characterized in that, include: The system consists of NCCLProbe, a local controller, and a global controller. The NCCL Probe runs within the training process, shares the address space with the training code, hijacks NCCL API calls via LD_PRELOAD, and writes communication events into shared memory. The local controller is deployed on each computing node, interacts with the NCCL Probe through shared memory, and reads and processes communication events. The global controller runs on the master node and communicates with each local controller through Redis. It aggregates global performance information and drives state switching. The state includes a monitoring state and a profiling state. The monitoring state is continuously executed during training, taking the iteration time of the training framework as input, and identifies persistent performance degradation through BOCD change point detection and multiple threshold filtering mechanisms. The profiling state is triggered after the monitoring state detects persistent performance degradation and is used to analyze communication latency and locate slow ranks.

2. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 1, characterized in that: The monitoring status includes two parallel data paths: a performance degradation monitoring path and a shutdown fault detection path. In the performance degradation monitoring path, the training framework reports the iteration time to the remote Redis after each iteration. The global controller pulls the time series from Redis and performs BOCD analysis to detect change points. In the shutdown fault detection path, the probe dynamic library writes NCCL call metadata to shared memory. The local controller reads the call interval from shared memory. If a certain rank has no new calls within the dynamic time window, it is determined to be a shutdown fault and is immediately reported to Redis. The global controller then aggregates the data and triggers an alarm.

3. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 2, characterized in that: When the training framework reports the iteration time to the remote Redis after each iteration, it uses a Redis list structure organized by the rank dimension to store the iteration number and corresponding latency.

4. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 2, characterized in that: The global controller performs BOCD analysis to detect change points, specifically: for the time series { 1, 2, , Calculate the posterior distribution of the runtime at each time step. ( | 1: ),in, This indicates the running length from the previous variable point. 1: Representing time series { 1, 2, , },when ( =0 | 1: When the threshold is exceeded, the current moment is determined to be a change point.

5. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 2, characterized in that: During the process of the global controller performing BOCD analysis to detect changes, the following four-fold filtering is also performed: The first layer of filtering is persistence verification: Let's assume... The data is to the left of the variable point. The data is to the right of the variable point. ′ To calculate the baseline mean (mean) by removing the data from the first point to the right of the variable point. ), Degeneration mean ( ) and recent mean ( ′ ), mean( ) represents the normal performance baseline before the change point, mean( ) represents the mean performance after the change point and including the change point, mean( ′ () represents the performance mean after the change point and excluding the change point; Calculate the recovery ratio: ; When recovery rate A recovery rate of 0.75 indicates performance recovery; a recovery rate exceeding 75% indicates a transient failure and is filtered out; a recovery rate of <0.75 indicates persistent degradation and requires switching to profiling mode. The second layer of filtering is a distance threshold constraint: for multiple adjacent variable points returned by a single BOCD, if the distance between adjacent variable points is less than 2 iterations, only the first variable point is retained and subsequent variable points are filtered. The third layer of filtering is warm-up filtering: skipping the data from the first 3 iterations of training. The fourth layer of filtering is outlier removal: before performing BOCD, data preprocessing is performed to remove outliers with a standard score exceeding 3.

0.

6. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 1, characterized in that: The data path for the analysis status is as follows: After the global controller detects a valid change in BOCD, it switches the Redis control state to profiling mode, and the local controller reads this state. The local controller writes the new state to shared memory. The probe dynamic library reads the state from shared memory and injects it into CUDA Events to time NCCL operations. The probe dynamic library writes the profiling data to shared memory, and the local controller reads it and calculates statistics. The local controller reports the statistics to Redis, and the global controller reads the statistics and communication group instance information in the communication events and executes a two-stage localization algorithm to identify slow ranks. The global controller restores the control state to monitoring mode.

7. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 6, characterized in that: The two-stage localization algorithm includes two stages: communication group-level screening and rank-level localization. In the communication group-level screening stage, communication group instances are first grouped by id_hash, and communication group instances with the same id_hash are considered to be in the same communication group. Combining the parallel state information provided by the training framework, the communication label corresponding to each communication group is identified. Subsequently, for each type of communication label, the latency distribution of all communication groups under that communication label is statistically analyzed, and the maximum average latency of each communication group is calculated as max_avg_latency. The communication group with the largest max_avg_latency is selected as the candidate abnormal communication group. During the rank-level localization phase, within the candidate abnormal communication group, the latency records of all communication group instances participating in that rank are aggregated by rank, and the average communication latency avg_latency for each rank is calculated. The rank with the smallest avg_latency is selected as a potential slow rank candidate.

8. The non-intrusive, low-overhead fault location system for distributed training of large models as described in claim 1, characterized in that: The local controller monitors the NCCL event records in shared memory and counts the number of calls for each rank within a given time window; If no new NCCL calls occur within a time window for a certain rank, it is determined to be a shutdown failure. After the detection is triggered, the local controller immediately writes the result to the Redis shutdown event list, and the global controller summarizes the reports from each compute node and triggers an alarm.