Angel-PTM: A Scalable and Economical Large-scale Pre-training System in Tencent

Xiaonan Nie, Yi Liu, Fangcheng Fu, Jinbao Xue, Dian Jiao, Xupeng Miao, Yangyu Tao, Bin Cui

Abstract

As Transformer-based models continue to grow exponentially in size, the disparity between model memory requirements and available GPU hardware memory (HBM)—often called the "Memory Wall"—has become a critical bottleneck. Angel-PTM is a high-performance deep learning system designed to train and fine-tune massive models using hierarchical memory architectures (GPU, CPU, and SSD). By introducing a fine-grained "Page" memory abstraction and a unified scheduler, Angel-PTM achieves up to a 114.8% increase in maximum model scale and an 88.9% boost in throughput compared to state-of-the-art systems like DeepSpeed.

Introduction

In the current era of large-scale pre-training, models like GPT-3 and T5 have demonstrated that increasing parameter counts leads to significant gains in downstream task performance. However, training a 530B parameter model typically requires thousands of expensive A100 GPUs, incurring costs in the tens of millions of dollars. Existing distributed training frameworks, such as Megatron-LM and DeepSpeed, provide essential tools but often suffer from two primary limitations: high complexity requiring expert manual tuning of parallelism strategies, and inefficiency due to coarse-grained memory management and I/O bottlenecks when offloading to slower storage like SSDs.

Angel-PTM, developed by researchers at Tencent and Peking University, addresses these challenges by providing a system that is both easy to use and cost-effective, enabling the training of trillion-parameter models on relatively modest hardware budgets.

System Architecture

Angel-PTM’s efficiency is rooted in three core architectural pillars:

1. Page-Based Memory Organization

Rather than managing memory as giant, irregular tensors—which often leads to significant fragmentation—Angel-PTM decomposes all data into fixed-size 4MB "Pages." This abstraction serves as the fundamental unit for memory allocation and data movement. The 4MB size was identified as a "sweet spot": large enough to saturate PCIe bandwidth during transfers between GPU, CPU, and SSD, yet small enough to maintain flexibility and minimize fragmentation.

2. Unified Scheduler and Tracer

Deep learning training is inherently iterative. Angel-PTM exploits this by using a "Tracer" to analyze the model's execution pattern during the initial training steps. This analysis informs a unified scheduler that proactively manages data movement. By predicting when specific parameters will be required, the system can overlap computation with data communication and pre-fetching, ensuring that the GPU remains fully utilized rather than idling for I/O.

3. Lock-Free Updating Mechanism

To support "extreme" scaling using SSDs, Angel-PTM decouples GPU computation from CPU/SSD optimizer updates. Traditional systems often wait for slow storage updates to complete to ensure consistency. Angel-PTM utilizes an asynchronous consistency protocol, allowing the GPU to continue training on "slightly stale" parameters while the master weights are updated in the background. This lock-free approach significantly mitigates the latency of SSD I/O.

Experimental Evaluation

The system was evaluated using production-grade clusters featuring NVIDIA A100 GPUs (40GB/80GB) connected via NVLink and RoCE. The researchers tested several massive Transformer architectures:

  • GPT-3 variants: From 1.7B to 175B parameters.
  • T5 models: From 1.4B to 58B parameters.
  • T5-MoE (Mixture of Experts): A sparse model scaled to 1.2 Trillion parameters.

Key Results

  • Model Capacity: On a single server, Angel-PTM supported a 55B parameter GPT model, nearly doubling the 28B parameter limit of DeepSpeed (a 96.4% improvement).
  • Throughput: For a 28B GPT model, Angel-PTM achieved 10.99 samples/s, a 44% increase over DeepSpeed’s 7.61 samples/s.
  • Scalability: The system demonstrated super-linear scalability on GPT-3 175B. As the GPU count increased, the global batch size scaled effectively, leading to higher hardware utilization.
  • Trillion-Parameter Milestone: Angel-PTM successfully trained a 1.2T parameter T5-MoE model across hundreds of GPUs, proving its viability for industrial-scale applications.

Discussion and Future Work

A significant finding of the study was the validation of the lock-free mechanism. Despite the introduction of parameter staleness during SSD-based updates, the researchers observed negligible impact on model convergence (validation loss). This allowed for a nearly 3x speedup in training throughput for 10T-scale models compared to synchronous methods.

However, limitations remain. Angel-PTM is currently optimized for the specific data flow of attention-based architectures. Future work will focus on:

  • Staleness Bounds: Investigating if other model architectures are more sensitive to asynchronous updates.
  • Hardware Heterogeneity: Adapting the fine-grained page movement to different generations of GPUs and AI accelerators.
  • Automatic Parallelism: Further integrating hybrid parallelism strategies to reduce the manual configuration required for the largest sparse models.

Conclusion

Angel-PTM represents a significant step toward democratizing large-scale model training. By optimizing memory management through page-based abstraction and intelligent scheduling, it allows researchers to push the boundaries of model scale—reaching the trillion-parameter mark—without requiring proportional increases in expensive HBM resources.

Summary updated

BibTeX
@article{nie2023angel,
  author = {Xiaonan Nie and Yi Liu and Fangcheng Fu and Jinbao Xue and Dian Jiao and Xupeng Miao and Yangyu Tao and Bin Cui},
  title = {{Angel-PTM: A Scalable and Economical Large-scale Pre-training System in Tencent}},
  journal = {Proc. VLDB Endow.},
  year = {2023},
  doi = {10.14778/3611540.3611564},
}
Figure