ReCycle: Resilient Training of Large DNNs using Pipeline Adaptation

Swapnil Gandhi, Mark Zhao, Athinagoras Skiadopoulos, Christos Kozyrakis

TL;DR

Training massive Deep Neural Networks (DNNs) is prone to hardware failures, which can significantly disrupt training and waste computational resources. ReCycle introduces a novel system that leverages the inherent redundancy in distributed training to tolerate multiple failures without requiring spare servers, achieving high throughput even when a significant portion of the hardware fails.

What Problem Does This Paper Address?

The training of state-of-the-art Deep Neural Networks (DNNs) involves massive computational resources, often requiring thousands of GPUs running for weeks. At this scale, hardware failures are not an exception but a regular occurrence. Traditional approaches to handle these failures include using expensive spare servers or restarting training from checkpoints, both of which are inefficient. Existing fault-tolerant training systems like Oobleck and Bamboo have limitations, such as performance degradation in fault-free scenarios or significant overheads during failure recovery. This paper addresses the challenge of maintaining high training throughput and efficiency in the presence of frequent hardware failures without relying on spare hardware or incurring substantial performance penalties.

Methods

ReCycle employs a three-pronged approach to achieve resilient DNN training:

  • Adaptive Pipelining: This core technique exploits the functional redundancy across data-parallel pipelines in hybrid-parallel training. When a worker (GPU server) fails, its micro-batches are dynamically rerouted to its "peer" workers in other data-parallel pipelines that are processing the same pipeline stage. This rerouting is designed to utilize the "bubbles" (idle slots) in the pipeline schedule, minimizing performance impact.
  • Decoupled BackProp: To further mitigate the overhead introduced by Adaptive Pipelining, ReCycle decouples the backward pass computation into two distinct phases: one for gradients relative to the input and another for gradients relative to the parameters. This separation allows for more flexible scheduling of the additional workload, particularly by deferring the parameter gradient computation to utilize cool-down bubbles in the pipeline schedule.
  • Staggered Optimizer: This technique optimizes the utilization of warm-up bubbles that occur at the beginning of each training iteration. By staggering the optimizer step across different pipeline stages, ReCycle can effectively shift these bubbles to the cool-down phase, providing more room to hide the overhead of rerouted micro-batches from failed workers.

Datasets

The paper does not introduce new datasets. Instead, it uses the wikitext dataset for training and evaluation.

Key Insights and Ideas

  • Functional Redundancy is Key: The paper highlights that the inherent redundancy in distributed DNN training (multiple workers holding the same model parameters) is a powerful resource for fault tolerance, which can be exploited without expensive spares.
  • Bubbles are Valuable: Pipeline schedule bubbles, often seen as inefficiencies, are repurposed by ReCycle to absorb the overhead of rerouting micro-batches from failed workers.
  • Decoupling for Flexibility: Separating the backward pass computation provides crucial flexibility in scheduling, allowing for better utilization of available time slots.
  • Staggering for Iteration-Level Optimization: Shifting the optimizer step across pipeline stages demonstrates a clever way to manage resources across training iterations, not just within a single iteration.
  • Memory Imbalance is an Opportunity: The paper notes that later pipeline stages often have more available GPU memory, which ReCycle leverages to accommodate the increased memory demands of Decoupled BackProp.

Key Results

  • High Throughput Under Failures: ReCycle consistently matches or exceeds the throughput of baselines (Bamboo and Oobleck) across various failure scenarios and model sizes.
  • Significant Speedups: ReCycle outperforms Oobleck by up to 1.46x and Bamboo by up to 1.64x in training scenarios with realistic GPU failures.
  • Minimal Overhead: The combination of ReCycle's techniques results in minimal performance degradation, with some scenarios showing near-zero overhead compared to fault-free training.
  • Scalability: ReCycle demonstrates strong performance on large models (up to 145.6B parameters) and large clusters (up to 1536 GPUs), maintaining high throughput even with up to 10% failure rates.
  • Efficient Failure Recovery: ReCycle can recover from failures quickly, often without requiring significant re-shuffling of model parameters, unlike some other approaches.
  • Ablation Study Confirms Contributions: An ablation study shows that Adaptive Pipelining provides basic fault tolerance, Decoupled BackProp significantly boosts throughput, and Staggered Optimizer offers further incremental improvements.

Limitations and Future Work

  • Planner Latency: While the Planner's latency is considered negligible for long training jobs, it could become a factor for very short training runs or in highly dynamic environments where frequent re-planning is needed. The paper notes that the Planner's MILP formulation could be further optimized.
  • Worst-Case Failures: In the absolute worst-case scenario where an entire data-parallel group fails simultaneously, ReCycle falls back to existing resilience strategies like checkpoint restoration and re-configuration.
  • Future Work: The authors suggest exploring more advanced techniques for failure detection and potentially integrating ReCycle with more sophisticated cluster schedulers. They also mention the possibility of further optimizing the Planner's MILP formulation.

Summary updated

BibTeX
@inproceedings{gandhi2024recycle,
  author = {Swapnil Gandhi and Mark Zhao and Athinagoras Skiadopoulos and Christos Kozyrakis},
  title = {{ReCycle: Resilient Training of Large DNNs using Pipeline Adaptation}},
  booktitle = {SOSP},
  year = {2024},
  doi = {10.1145/3694715.3695960},
}
Figure