NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Celeritas: Fast Optimizer for Large Dataflow Graphs

Hengwei Xu, Yong Liao, Haiyong Xie, Pengyuan ZhouarXiv 2022

TL;DR

Training massive deep learning models is bottlenecked by device placement strategies. Celeritas introduces a novel framework that significantly speeds up the generation of these strategies and improves actual model training performance by optimizing how models are split and distributed across multiple devices.

What Problem Does This Paper Address?

The ever-increasing size of neural network models (e.g., GPT-3 with 175 billion parameters) poses a significant challenge for training. While model parallelism (splitting a model across multiple devices) is a solution, existing methods for determining the optimal placement of model components on these devices are either too slow, leading to hours or even days of computation for a single strategy, or produce suboptimal results. This slowness hinders the practical adoption of model parallelism, especially for new or frequently updated models. Furthermore, a critical but often overlooked aspect is "Standard Evaluation" – how to accurately estimate a model's performance and resource needs before full-scale training, especially when the model itself is too large for a single device. Existing methods struggle with this, leading to inaccurate estimations and potential "Out Of Memory" (OOM) errors.

Methods

Celeritas tackles these challenges with a multi-pronged approach:

  • Standard Evaluation Enhancement: Celeritas proposes a more robust Standard Evaluation process. It first uses smaller batch sizes to get a rough estimate of computational graphs and then refines this with a sequential placement strategy on a single device to accurately capture memory and computation needs for larger batches. This addresses the OOM problem and improves estimation accuracy.
  • CPD-TOPO for Topological Ordering: To guide the placement process, Celeritas uses a novel topological sorting algorithm called CPD-TOPO (Critical Path DFS-TOPO). This algorithm prioritizes nodes on the "critical path" of the computational graph, aiming to minimize communication overhead and improve overall efficiency, outperforming simpler topological sorts like M-TOPO.
  • Optimal Operation Fusion: To reduce the complexity of large graphs, Celeritas merges adjacent nodes that are part of the critical path into "clusters." This significantly reduces the number of nodes and the communication-to-computing ratio (CCR), making subsequent placement much faster and more efficient. This fusion process is designed to avoid creating loops in the graph.
  • Adjusting Placement: After creating a coarse-grain graph through fusion, Celeritas employs an adaptive placement algorithm. It places nodes sequentially, but if placing a node on the next available device would incur a significant communication cost (waiting for data to be sent back), it considers placing it on an alternative device that offers an earlier start time, balancing computation and communication.

Datasets

The paper evaluates Celeritas on several large, well-known deep learning models:

  • Inception_V3: A computer vision model.
  • NMT (Neural Machine Translation): A sequence-to-sequence model using LSTMs.
  • Transformer: A prominent NLP model.
  • Tensor Holography: A model for synthesizing 3D holograms.

The authors do not introduce new datasets but rather use these existing models with configurations that push the boundaries of single-device memory capacity, necessitating model parallelism.

Key Insights and Ideas

  • Standard Evaluation is Crucial and Underserved: The paper highlights that accurately estimating model behavior before full training is critical, especially for models exceeding single-device memory. Celeritas's improved Standard Evaluation directly addresses this gap.
  • Critical Path Matters for Placement: Simply sorting nodes topologically isn't enough. Prioritizing nodes on the critical path (CPD-TOPO) is key to minimizing communication bottlenecks and achieving faster training.
  • Graph Coarsening for Speed: Merging nodes into clusters (Optimal Operation Fusion) dramatically reduces the graph's complexity, making placement generation orders of magnitude faster without sacrificing too much accuracy.
  • Adaptive Placement Balances Speed and Efficiency: The Adjusting Placement algorithm intelligently decides whether to stick with the sequential placement or switch devices, effectively trading off minor communication delays for potentially larger gains in overall training time.

Key Results

Celeritas demonstrates significant improvements over existing methods:

  • Placement Generation Time: Celeritas reduces placement policy generation time by 26.4% on average compared to advanced methods. For large models like Transformer, it's substantially faster than methods like m-SCT.
  • Model Running Time: Celeritas improves model running time by 34.2% on average. For Tensor Holography, it achieved a 34.2% speedup over the second-best method.
  • OOM Avoidance: Celeritas successfully avoids "Out Of Memory" errors, a common issue with other approaches, by employing a best-effort strategy when optimal placement isn't immediately feasible.
  • Estimation Accuracy: The Standard Evaluation's memory estimation accuracy is within 3% for smaller models and around 6% for larger ones like Transformer. Time estimation accuracy is also within acceptable ranges.

Limitations and Future Work

  • Parameter Tuning: The paper mentions that parameters like the exploration range (R) in Optimal Operation Fusion need careful empirical tuning to balance running time and model performance.
  • Co-location Restrictions: While Celeritas handles TensorFlow's co-location restrictions, it's noted as a factor that can complicate placement and potentially lead to suboptimal results if not managed well.
  • Future Work: The authors suggest further exploration into optimizing the balance between placement generation time and model training time, and potentially extending Celeritas to more complex distributed training scenarios.

Summary updated

BibTeX
@misc{xu2022celeritas,
  author = {Hengwei Xu and Yong Liao and Haiyong Xie and Pengyuan Zhou},
  title = {{Celeritas: Fast Optimizer for Large Dataflow Graphs}},
  year = {2022},
  eprint = {2208.00184},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.00184},
}
Figure