Abstract
Large-scale models rely heavily on 3D parallelism for distributed training, which utilizes tensor parallelism (TP) as the intra-operator parallelism to partition model states across GPUs. However, TP introduces significant communication overheads and complexity in modifying single-GPU code. In this paper, we propose a TP-free distributed framework ZeroPP, which leverages the hybrid of scalable inter-operator pipeline parallelism and intra-operator fully sharded data parallelism to train models at scale, reducing memory consumption and enabling high training efficiency. Through extensive experimentation, we demonstrate that ZeroPP achieves significant performance gains of up to 33% compared to conventional 3D parallelism while maintaining comparable GPU memory consumption.
Introduction
Training massive language models like GPT-3 or LLaMA typically necessitates 3D parallelism—a combination of Data Parallelism (DP), Tensor Parallelism (TP), and Pipeline Parallelism (PP). Among these, Tensor Parallelism is often the bottleneck. It demands high-bandwidth collective communication (all-reduce) within nodes and requires significant manual code refactoring, which is both complex and error-prone.
While ZeRO-3 (Fully Sharded Data Parallelism) offers a more communication-efficient alternative by sharding model states, its naive integration into pipeline parallelism faces two major hurdles: "communication storms" due to frequent micro-batch switching and significant "pipeline bubbles" where GPUs remain idle. ZeroPP addresses these issues by providing a TP-free methodology that retains ZeRO-3's memory efficiency without sacrificing performance.
The ZeroPP Framework
ZeroPP introduces several architectural innovations to harmonize ZeRO-3 with Pipeline Parallelism:
- Gradient Computation Decoupling: This is the pivotal innovation. In the backward pass, the framework separates the calculation of input gradients (required for pipeline progression) from weight gradients (required for model updates). By prioritizing input gradients, ZeroPP minimizes idle time, using weight gradient calculations to fill what would otherwise be pipeline bubbles.
- Blockwise Task-Interleaved PP Schedule: Instead of a linear pipeline, ZeroPP employs a "looping" placement where each GPU manages multiple non-contiguous model stages.
- Scheduling Units: Micro-batches are grouped into units. Parameters are gathered once per unit and reused across all micro-batches within that unit, significantly reducing redundant communication.
Experimental Evaluation
The framework was benchmarked using GPT-style architectures on clusters of up to 64 NVIDIA A800-80GB GPUs. The models tested included a 14.6B parameter model (48 layers) and a 28.3B parameter model (64 layers).
Key Results
ZeroPP demonstrates superior efficiency over traditional 3D parallelism:
- Throughput Gains: For the 14.6B model, iteration time dropped from 7.5s (standard 3D parallelism) to 4.1s—a massive jump in efficiency. For the 28.3B model, ZeroPP outperformed 3D parallelism by roughly 24% in iteration speed (9.2s vs 12.1s).
- Communication Efficiency: As batch sizes grow, ZeroPP's communication overhead remains stable compared to the scaling overhead of TP, proving that ZeRO-3 is a more scalable alternative for intra-operator parallelism.
Conclusion
ZeroPP proves that Tensor Parallelism is not a prerequisite for high-performance large-scale training. By combining ZeRO-3 with intelligent scheduling and gradient decoupling, ZeroPP achieves up to a 33% speedup while maintaining a similar memory footprint. Future work will explore integrating CPU offloading and quantization to further extend the boundaries of trainable model sizes on existing hardware.
Summary updated