[Paper Review] Colossal-Auto: Unified Automation of Parallelization and Activation Checkpoint for Large-scale Models
Colossal-Auto introduces a unified, automated system that jointly optimizes intra-operator parallelism and activation checkpointing for large-scale model training on multi-GPU systems. By combining hardware-aware profiling with a two-stage solver, it generates near-optimal distributed execution plans with minimal code changes, achieving superior weak scaling performance on A100 GPUs compared to existing methods.
In recent years, large-scale models have demonstrated state-of-the-art performance across various domains. However, training such models requires various techniques to address the problem of limited computing power and memory on devices such as GPUs. Some commonly used techniques include pipeline parallelism, tensor parallelism, and activation checkpointing. While existing works have focused on finding efficient distributed execution plans (Zheng et al. 2022) and activation checkpoint scheduling (Herrmann et al. 2019, Beaumont et al. 2021}, there has been no method proposed to optimize these two plans jointly. Moreover, ahead-of-time compilation relies heavily on accurate memory and computing overhead estimation, which is often time-consuming and misleading. Existing training systems and machine learning pipelines either physically execute each operand or estimate memory usage with a scaled input tensor. To address these challenges, we introduce a system that can jointly optimize distributed execution and gradient checkpointing plans. Additionally, we provide an easy-to-use symbolic profiler that generates memory and computing statistics for any PyTorch model with a minimal time cost. Our approach allows users to parallelize their model training on the given hardware with minimum code change based. The source code is publicly available at Colossal-AI GitHub or https://github.com/hpcaitech/ColossalAI
Motivation & Objective
- To address the challenge of manually tuning distributed training strategies for large models, which requires deep expertise and is error-prone.
- To jointly optimize intra-operator parallelism and activation checkpointing, which are typically treated separately in existing systems.
- To reduce the barrier for researchers and practitioners without distributed training experience to train large models efficiently.
- To enable automatic, hardware-aware execution plan generation that adapts to complex GPU topologies, including NVLink and PCIe interconnects.
- To support flexible, extensible parallelism strategies across arbitrary-dimensional device meshes and new hardware configurations.
Proposed method
- A symbolic profiler performs meta-execution on computation graphs to collect fine-grained memory and compute overheads with minimal runtime cost.
- A two-stage solver first identifies optimal intra-operator parallelism strategies, then jointly schedules activation checkpointing to meet memory budgets.
- A heuristic tensor layout conversion algorithm enables efficient sharding across arbitrary N-dimensional device meshes, supporting complex topologies.
- The system compiles PyTorch models into distributed execution code by substituting operations with checkpointed, parallelized functions.
- The execution plan generation considers hardware topology, including NVLink and PCIe bandwidth differences, to overlap communication with computation.
- The system integrates with PyTorch and supports automatic code recompilation with minimal user code changes.
Experimental results
Research questions
- RQ1Can intra-operator parallelism and activation checkpointing be jointly optimized to achieve better memory and compute efficiency in large model training?
- RQ2How can a symbolic profiler accurately estimate memory and compute costs for PyTorch models with low overhead?
- RQ3Can a unified solver generate hardware-aware execution plans that adapt to complex GPU interconnect topologies like NVLink and PCIe?
- RQ4How does the joint optimization of parallelism and checkpointing compare to sequential or isolated optimization in terms of training performance and memory usage?
- RQ5To what extent can the system generalize across different model architectures and hardware configurations without manual tuning?
Key findings
- Colossal-Auto achieves the best weak scaling performance among all evaluated methods, reaching 0.824 PFLOPS on 8 A100 GPUs for a 14.55B parameter model.
- The system outperforms Megatron-LM, Optimus, and 3D tensor parallelism across all experiment settings, particularly on larger models.
- The execution plan automatically leverages high-bandwidth NVLink links between adjacent GPUs and overlaps low-bandwidth PCIe communication with computation.
- The system avoids out-of-memory errors even at scale, unlike data parallelism (DDP), which fails at larger model sizes.
- The symbolic profiler enables accurate, low-cost profiling of memory and compute usage across the computation graph, enabling effective optimization.
- The joint optimization of parallelism and checkpointing leads to better memory utilization and performance than isolated optimization of either component.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.