FLARE: Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale
Weihao Cui (Shanghai Jiao Tong University and National University of Singapore), Ji Zhang (Independent Researcher), Han Zhao (Shanghai Jiao Tong University), Chao Liu (Independent Researcher), Jian Sha (Tsinghua University), Bo Sang (Ant Group), Bingsheng He (National University of Singapore), Minyi Guo (Shanghai Jiao Tong University), Quan Chen (Shanghai Jiao Tong University)
23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26) · Day 2 · Smart Pipes, Smarter Learning
Overview
Training massive large language models (LLMs) on clusters comprising thousands of GPUs is an immensely complex undertaking involving a delicate interplay of deep learning algorithms, infrastructure frameworks, operating systems, interconnect fabrics, and underlying hardware. When training jobs fail, experience sudden throughput crashes, or suffer from silent regressions, diagnosing the root cause typically requires assembling a cross-functional task force of more than 15 engineers spanning algorithms, infrastructure, and operations. This talk introduces FLARE, a lightweight, full-stack anomaly diagnostic system designed, built, and deployed at Ant Group across 6,000-GPU clusters for over a year.

Key moments
- 0:00 Introduction and motivation for FLARE anomaly diagnostics
- 2:00 Classification of cluster anomalies and the regression problem
- 3:58 Key challenges in full-stack tracing and backend diversity
- 5:58 FLARE system design overview and core components
- 7:23 Tracer implementation using Python profiling hooks and C APIs
- 9:59 Diagnosing hangs and communication failures with CUDA-GDB
- 12:15 Detecting regressions using core metrics and issue latency
- 14:48 Production evaluation, overhead results, and conclusion
FLARE: Anomaly Diagnostics for Divergent LLM Training in GPU Clusters of Thousand-Plus Scale
Speakers: Weihao Cui (Shanghai Jiao Tong University and National University of Singapore); Ji Zhang (Independent Researcher); Han Zhao (Shanghai Jiao Tong University); Chao Liu (Independent Researcher); Jian Sha (Tsinghua University); Bo Sang (Ant Group); Bingsheng He (National University of Singapore); Minyi Guo (Shanghai Jiao Tong University); Quan Chen (Shanghai Jiao Tong University)
Conference: USENIX NSDI
YouTube: https://www.youtube.com/watch?v=kRWk8-_mkSs
Overview
Training massive large language models (LLMs) on clusters comprising thousands of GPUs is an immensely complex undertaking involving a delicate interplay of deep learning algorithms, infrastructure frameworks, operating systems, interconnect fabrics, and underlying hardware. When training jobs fail, experience sudden throughput crashes, or suffer from silent regressions, diagnosing the root cause typically requires assembling a cross-functional task force of more than 15 engineers spanning algorithms, infrastructure, and operations. This talk introduces FLARE, a lightweight, full-stack anomaly diagnostic system designed, built, and deployed at Ant Group across 6,000-GPU clusters for over a year.
The core contribution of FLARE lies in addressing "silent slowdowns" or regressions—subtle performance degradations that quietly consume valuable GPU hours without triggering traditional alerts or crashes. By capturing fine-grained runtime telemetry across Python, C++, and CUDA layers with less than 0.5% overhead, FLARE automates root-cause localization. It eliminates the need for manual, time-consuming debugging across diverse parallel backends like Megatron-LM, PyTorch FSDP, and DeepSpeed, successfully reducing the engineering triage team from over 15 people down to fewer than five.
Background
▶ Watch: Introduction and motivation for FLARE anomaly diagnostics (0:00)
Modern large-scale LLM training infrastructure is organized into a rigid three-layer stack. At the top, algorithm developers design model architectures and training recipes. In the middle, infrastructure teams ship parallel backends, kernel libraries, and frameworks like Megatron, FSDP, and DeepSpeed. At the bottom, operations teams manage operating systems, interconnects, and physical accelerators (GPUs). When anomalies occur at scale, identifying the origin of the fault is notoriously difficult.
An analysis of 3,000 jobs across a 6,000-GPU cluster over a three-month period revealed three distinct classes of anomalies:
- Hard Errors (Hangs/Crashes): Accounting for 127 jobs, these are acute events where jobs abruptly terminate or freeze.
- Sudden Throughput Drops: Accounting for 57 jobs, these are sharp, visible performance declines.
- Regressions: Persistent, subtle slowdowns that operate below the threshold of standard alerting systems.
While existing profiling and monitoring systems—such as MegaScale, DeepSpeed, or PyTorch Profiler—excel at capturing hard errors and sudden throughput drops, they fall short when addressing silent regressions or supporting multiple parallel backends without invasive code modifications. Profiling tools like PyTorch Profiler generate massive log volumes (e.g., 5.5 gigabytes per step), rendering them impractical for continuous, cluster-wide production deployment. Furthermore, existing full-stack tracing solutions are often tightly coupled to a single training backend, requiring extensive manual re-instrumentation when migrating models to alternative frameworks like FSDP or DeepSpeed.
Key Findings
▶ Watch: Key challenges in full-stack tracing and backend diversity (3:58)
Deploying FLARE across a production cluster of 6,000 GPUs yielded several operational and performance discoveries regarding large-scale LLM training failures:
- Backend Agnosticism via Non-Invasive Instrumentation: By leveraging Python’s built-in profiling hooks and dynamic linking interceptors, FLARE traces execution across Megatron-LM, PyTorch FSDP, and DeepSpeed with zero modifications to the underlying training backend source code.
- Extremely Low Production Overhead: Running FLARE continuously in production introduces an average latency overhead of just 0.43% across four major training backends on NVIDIA H800 GPUs.
- Minimal Storage Footprint: For a Llama 20B model running across 1,536 H800 GPUs, FLARE generates a mere 1.5 megabytes of log data per GPU per step, representing a dramatic reduction compared to the 5.5 GB per step produced by native PyTorch profiling tools.
- Effective Regression Localization: In a one-week evaluation across 6,000 GPUs running 1,131 real-world training jobs, FLARE flagged 11 jobs suffering from regressions, correctly identifying the root cause in 9 of those cases (with 4 false positives).
- Hang Diagnosis Acceleration: By utilizing CUDA-GDB to directly inspect register states from the operating system, FLARE shortens the diagnosis of complex communication hangs (such as deadlocks in
AllReduceoperations) from over 30 minutes of manual blind searching to under 5 minutes.
Technical Deep Dive
▶ Watch: Tracer implementation using Python profiling hooks and C APIs (7:23)
The architecture of FLARE is divided into two primary components: distributed Tracers running on every training process (one per GPU) and a centralized Diagnostic Engine that aggregates telemetry across the job to perform automated analysis.
Tracing Mechanism
To avoid modifying every training backend, FLARE intercepts execution at the language and library runtimes:
- Python API Interception: Instead of using decorators that require touching backend code, FLARE utilizes CPython's built-in profiling hook (
sys.setprofile) to intercept specific Python APIs at the bytecode level. This captures overhead sources such as garbage collection (gc), data loader bottlenecks, and CPU-GPU synchronization calls. Setting an environment variable (trace_python_api=...) enables targeted tracing without touching Megatron, FSDP, or DeepSpeed. - C++ and CUDA Interception: For native C++ and CUDA runtimes, FLARE employs standard
LD_PRELOADdynamic linking interception (Lucas' trick) to hook dynamically linked functions. - Asynchronous Kernel Timing: Because GPU kernels execute asynchronously relative to the CPU, capturing accurate timing requires special handling. FLARE injects CUDA events immediately before and after kernel interception points, utilizing a background thread to poll completion timestamps without blocking the critical training path.
Timestamp Reconstruction
Because Python and C++ runtime events are captured via separate mechanisms, FLARE reconstructs the unified execution timeline post-hoc by exploiting temporal overlaps between Python API call timestamps and C++ CUDA kernel execution windows. If a Python API call is active from time $t_1$ to $t_2$, any CUDA kernel launched within that window is linked directly, yielding a complete end-to-end execution stack.
Hang and Deadlock Analysis
When a hard error occurs, FLARE categorizes it into two scenarios:
- Long Communication Hangs (OS/GPU crashes): If a GPU dies or the OS crashes, the affected rank stalls at a communication primitive while all other ranks block waiting for it. FLARE inspects the call stack of each rank to immediately identify the lagging rank.
- Communication Kernel Deadlocks: If a hang occurs deep inside a communication kernel (e.g., a link failure midway through an
AllReduceoperation), all ranks show identical call stacks stuck inside the communication primitive. Rather than running exhaustive 30-minutenccl-testsacross all GPU pairs, FLARE uses CUDA-GDB to read the register state of each training process directly from the OS, exposing step counters (e.g., rank 0 at step 14 while all other ranks are at step 16) to pinpoint the faulty rank.
Regression Metrics
To detect subtle regressions, FLARE aggregates tracing data into five key analytical metrics:
- Training Throughput: A macro-metric for catching sudden, sharp performance degradations.
- Kernel-Level FLOPs and Bandwidth: Tracks whether computation kernels hit hardware peak performance and whether communication bandwidth aligns with expected interconnect limits.
- Issue Latency Distribution: Measures the precise time gap between the CPU issuing a CUDA kernel and the GPU actually beginning execution. Unhealthy jobs exhibit distorted Cumulative Distribution Function (CDF) curves compared to healthy jobs, where GPUs remain consistently saturated.
- Void Percentage: Quantifies uninstrumented time gaps (e.g., element-wise activations or framework overheads) as a percentage of total step time, capturing performance leakage outside monitored scopes.
Experimental Setup & Results
▶ Watch: Diagnosing hangs and communication failures with CUDA-GDB (9:59)
- Cluster Scale: Deployed and evaluated on production clusters containing up to 6,000 NVIDIA H800 GPUs.
- Workloads: Large language model training jobs utilizing models such as Llama 20B, running across diverse parallel backends including Megatron-LM, PyTorch FSDP, and DeepSpeed.
- Overhead Benchmarks: Measured across 1,256 H800 GPUs, FLARE demonstrated an average latency overhead of 0.43%, confirming its viability for continuous production deployment.
- Memory Footprint: Evaluated on a Llama 20B model spanning 1,536 H800 GPUs, generating 1.5 megabytes of log data per GPU per step.
- Production Regression Detection: Across 1,131 real-world training jobs submitted over a one-week period in a 6,000-GPU cluster, FLARE flagged 11 jobs with performance regressions, successfully isolating the true root cause in 9 cases (with 4 false positives).
Practical Implications
▶ Watch: Production evaluation, overhead results, and conclusion (14:48)
For infrastructure teams, model builders, and cluster operators managing large-scale AI infrastructure, FLARE demonstrates that comprehensive full-stack observability does not require prohibitive performance overhead or invasive codebase rewrites. By decoupling telemetry collection from training frameworks via runtime bytecode and dynamic linking hooks, engineering teams can support rapidly evolving training libraries—such as new iterations of Megatron, FSDP, or custom internal frameworks—without maintaining fragile, framework-specific patching pipelines.
However, practitioners should note certain limitations. While FLARE excels at diagnosing and localizing root causes for regressions and hard errors, the system explicitly stops short of automated remediation; it provides detailed diagnostic hints to engineers rather than executing auto-healing routines. Additionally, complex multi-tenant cluster environments can occasionally introduce false positives (as observed in the 4 false positives out of 11 flagged regression jobs), requiring human verification before taking corrective action.
Key Takeaways
- Full-Stack Visibility Without Backend Modification: Utilizing CPython profiling hooks (
sys.setprofile) and dynamic linking (LD_PRELOAD) allows FLARE to trace Python, C++, and CUDA execution across Megatron-LM, PyTorch FSDP, and DeepSpeed without altering backend source code. - Ultra-Low Production Overhead: Continuous cluster-wide tracing incurs an average latency penalty of only 0.43% and generates just 1.5 MB of logs per GPU step on H800 clusters.
- Solving the Silent Regression Problem: Traditional monitoring tools miss subtle performance regressions; FLARE combines issue latency distributions and void percentage metrics to accurately isolate persistent slowdowns.
- Accelerated Hang Triage: Leveraging CUDA-GDB to inspect OS-level register states reduces communication deadlock diagnosis from over 30 minutes of blind searching to under 5 minutes.
- Proven Production Scale: Deployed successfully across 6,000-GPU clusters at Ant Group for over a year, reducing cross-functional debugging teams from 15+ engineers down to fewer than 5.
About the Speaker(s)
The presentation was delivered by a representative from Ant Group, detailing collaborative research conducted alongside researchers from Shanghai Jiao Tong University, the National University of Singapore, and Tsinghua University. The speaker shared production experiences derived from deploying anomaly diagnostic systems across large-scale industrial GPU clusters.
Reviews
- Simon Wisk (Open Source Developer & AI Tooling Expert) — MUST SEE ★★★★★
→ Top-rated talks at 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)
All talks from 23rd USENIX Symposium on Networked Systems Design and Implementation (NSDI '26)