Enhancing Cluster Resilience: LLM-agent Based Autonomous Intelligent Cluster Diagnosis System and Evaluation Framework

Honghao Shi, Longkai Cheng, Wenli Wu, Yuhang Wang, Xuan Liu, Shaokai Nie, Weixv Wang, Xuebin Min, Chunlei Men, Yonghua LinarXiv 2024 · DOI

TL;DR

Researchers have developed an autonomous LLM-agent system designed to diagnose and repair complex failures in massive AI computing clusters. By combining Retrieval-Augmented Generation (RAG), Diagram of Thought (DoT), and self-play methodologies, the system can identify and resolve performance bottlenecks—like GPU frequency throttling—in under 10 minutes, a task that typically takes a senior engineer nearly an hour.

What Problem Does This Paper Address?

Modern AI clusters are staggering in scale and cost; for instance, Meta’s Llama 3.1 was trained on a cluster of 16,000 GPUs. However, these systems are notoriously fragile. During that same 54-day training run, Meta experienced 419 unexpected interruptions—roughly one every three hours.

When a cluster "slows down" rather than completely crashing, identifying the root cause is a needle-in-a-haystack problem. Is it a network latency spike, a memory leak, or a hardware thermal issue? Currently, this requires senior operations engineers to manually sift through logs and run diagnostic scripts. This paper aims to automate this "detect-diagnose-repair" loop using intelligent agents that can reason about hardware performance as well as a human expert.

Methods

The authors built a multi-layered system that moves beyond simple chatbot interactions:

  • RAG (Retrieval-Augmented Generation): The agent accesses a specialized knowledge base built from real-world failure logs and GitHub issue discussions from major AI frameworks (like Megatron and NCCL).
  • Diagram of Thought (DoT): Unlike standard text generation, DoT allows the model to handle "multimodal" symbolic data—formulas, code, and hardware specs—using XML tags to structure its reasoning process.
  • Self-Play Logic: The agent operates in a three-round iterative process:
  • Extract keywords from error logs.
  • Self-evaluate potential solutions and write/call diagnostic tools.
  • Perform final attribution and execute repair scripts.
  • Performance Modeling: The researchers developed "Roofline-style" models to help the LLM understand the theoretical limits of compute, memory, and I/O. This allows the agent to recognize when a GPU is underperforming relative to its hardware specifications.

Datasets

The study utilizes several data sources for both training and evaluation:

  • Diagnosis Dataset: A curated set of 200+ high-quality entries (cleaned from over 1,000 GitHub issues) containing problem keys, raw text, and solutions.
  • New Evaluation Benchmark: 150 manually crafted advanced questions specifically designed to test an LLM's ability to handle cluster diagnostics.
  • Standard Benchmarks: The team used MMLU, ARC, and BoolQ to monitor whether domain-specific tuning caused "catastrophic forgetting" of general reasoning abilities.

Key Insights and Ideas

  • The "SFT Trap": One of the most surprising findings was that Supervised Fine-Tuning (SFT) on domain-specific data actually decreased the model's performance on general benchmarks and its ability to interact effectively as an agent. The authors concluded that RAG and structured prompting (DoT) are superior to fine-tuning for this specific domain.
  • XML as a Reasoning Bridge: By using XML tags to wrap code and formulas, the system successfully taught a text-based LLM to perform symbolic hardware reasoning without needing a specialized "math" model.
  • Proactive vs. Reactive: The system doesn't just wait for a crash. By monitoring power consumption and frequency, it can flag a "limping" node before the training job even fails, potentially saving hours of wasted compute time.

Key Results

  • Efficiency Gain: In a simulated scenario where a GPU was throttled to 200MHz (down from 1410MHz), the LLM-agent identified and resolved the issue in under 10 minutes. Traditional methods using automated detection software typically required a senior engineer about one hour to achieve the same result.
  • Benchmark Superiority: The enhanced Llama 3.1-70B agent (using RAG + DoT + Self-play) significantly outperformed baseline models like Mistral-120B and standard Llama 3.1, particularly in "Metric C" (information attribution and root cause identification).
  • Scale Matters: The researchers found that smaller models (like Llama 3.2-3B) were currently unable to handle the complex reasoning required for cluster diagnostics, suggesting a "reasoning floor" for autonomous operations.

Limitations and Future Work

The authors are transparent about several hurdles:

  • Human-in-the-Loop: For safety reasons, the agent currently requires human approval before executing remediation scripts to avoid accidental cluster-wide damage.
  • Tool Dependency: The agent still relies heavily on pre-written diagnostic tools. Future work aims to enable the LLM to write its own diagnostic code from scratch more reliably.
  • Deployment Constraints: The system is currently designed for large-scale data centers and is too resource-intensive for edge computing or personal hardware scenarios.
  • Safety and Reliability: While the agent is efficient, the authors note that more research is needed to ensure it cannot be "tricked" by malicious log injections or attacker-inserted content.

Summary updated

Abstract

Recent advancements in Large Language Models (LLMs) and related technologies such as Retrieval-Augmented Generation (RAG) and Diagram of Thought (DoT) have enabled the creation of autonomous intelligent systems capable of performing cluster diagnostics and troubleshooting. By integrating these technologies with self-play methodologies, we have developed an LLM-agent system designed to autonomously diagnose and resolve issues within AI clusters. Our innovations include a knowledge base tailored for cluster diagnostics, enhanced LLM algorithms, practical deployment strategies for agents, and a benchmark specifically designed for evaluating LLM capabilities in this domain. Through extensive experimentation across multiple dimensions, we have demonstrated the superiority of our system in addressing the challenges faced in cluster diagnostics, particularly in detecting and rectifying performance issues more efficiently and accurately than traditional methods.
BibTeX
@misc{shi2024enhancing,
  author = {Honghao Shi and Longkai Cheng and Wenli Wu and Yuhang Wang and Xuan Liu and Shaokai Nie and Weixv Wang and Xuebin Min and Chunlei Men and Yonghua Lin},
  title = {{Enhancing Cluster Resilience: LLM-agent Based Autonomous Intelligent Cluster Diagnosis System and Evaluation Framework}},
  year = {2024},
  eprint = {2411.05349},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.05349},
}
Figure