Faster Multi-GPU Training with PPLL: A Pipeline Parallelism Framework Leveraging Local Learning

Xiuyuan Guo, Chengqi Xu, Guinan Guo, Feiyu Zhu, Changpeng Cai, Peizhe Wang, Xiaoming Wei, Junhao Su, Jialin GaoarXiv 2024

Abstract

Training large-scale deep learning models across multiple GPUs is often hindered by communication overhead and synchronization delays inherent in traditional backpropagation. We present PPLL (Pipeline Parallelism based on Local Learning), a framework that utilizes local learning to break sequential dependencies and enable seamless parallel training. By partitioning models into blocks that update independently using auxiliary networks and asynchronous queues, PPLL eliminates "pipeline bubbles." Experiments on ResNet and Vision Transformer (ViT) architectures across CIFAR-10, SVHN, and STL-10 datasets show that PPLL achieves up to a 162% speedup for ViT while maintaining competitive accuracy.

Introduction: The "Pipeline Bubble" Problem

The standard approach to training deep learning models relies on Backpropagation (BP), which is fundamentally sequential. In a multi-GPU setup using Pipeline Parallelism (PP), the model is split across devices. However, because a layer's update depends on the gradient from the subsequent layer, GPUs often experience idle periods—known as "pipeline bubbles"—while waiting for the forward pass to complete and the backward pass to return.

Local Learning (LL) offers a potential solution by allowing model segments to update using local auxiliary networks rather than global gradients. While LL removes sequential dependencies, the computational overhead of these auxiliary networks often negates the speed benefits. PPLL aims to bridge this gap by combining the throughput of pipeline parallelism with the independence of local learning.

Methodology: The PPLL Framework

PPLL treats a neural network as a series of gradient-isolated blocks. The core innovation lies in how these blocks are executed and synchronized across GPUs.

  1. Model Partitioning: The model is divided into $S$ segments, each assigned to a dedicated GPU.
  2. Local Learning Blocks: Each segment is equipped with a small auxiliary network. This allows the segment to calculate its own loss and update its parameters immediately after its forward pass ($F$), without waiting for the rest of the network.
  3. Message Queues: Asynchronous buffers (queues) handle data transfers between GPUs, allowing for continuous data flow.
  4. Fully Pipelined Execution: Because each block is updated independently, a GPU can start processing the next batch the moment it finishes its local update. This overlaps forward, auxiliary, and backward computations across the cluster.
The PPLL execution pipeline illustrates how forward (F1, F2), auxiliary (Fa), and backward (Ba1, Ba2) passes overlap across multiple GPUs to eliminate idle time.

As shown in the pipeline diagram, the introduction of local auxiliary passes ($Fa$) and local backward passes ($Ba$) allows for a dense execution schedule where GPUs are rarely idle compared to traditional sequential methods.

Experimental Results

The framework was validated using ResNet-32 and Vision Transformer (ViT) architectures on CIFAR-10, SVHN, and STL-10 datasets.

Training Throughput

PPLL demonstrates significant performance gains, particularly for architectures with smaller intermediate activations like ViT. In a 4-GPU setup, PPLL accelerated ViT training by 162% compared to standard local learning.

Training speed (batches per second) for various models and datasets across different GPU configurations, highlighting the performance of PPLL.

As detailed in the table above, for ViT on CIFAR-10, PPLL ($S=4$) achieved 22.32 bs/s, significantly outperforming traditional Pipeline Parallelism (9.54 bs/s). For ResNet, the speedup was more modest (33%) due to the overhead of moving larger feature maps between GPUs via CPU-managed queues.

Accuracy Trade-offs

A common concern with local learning is the potential loss in accuracy compared to end-to-end backpropagation. PPLL minimizes this "local learning tax." On CIFAR-10, an end-to-end ViT model achieved 57.8% accuracy, while the PPLL version maintained 57.4%. This negligible trade-off makes PPLL a highly viable alternative for high-throughput training.

Conclusion and Future Directions

PPLL effectively eliminates the pipeline bubbles that plague traditional multi-GPU training. By leveraging local learning and asynchronous communication, it achieves massive speedups for modern architectures like ViT. Future work will focus on optimizing inter-process communication (e.g., using NCCL for direct GPU-to-GPU transfers) to reduce bottlenecks for models with large activations and extending the framework to more complex tasks like object detection and generative modeling.

Summary updated

BibTeX
@misc{guo2024faster,
  author = {Xiuyuan Guo and Chengqi Xu and Guinan Guo and Feiyu Zhu and Changpeng Cai and Peizhe Wang and Xiaoming Wei and Junhao Su and Jialin Gao},
  title = {{Faster Multi-GPU Training with PPLL: A Pipeline Parallelism Framework Leveraging Local Learning}},
  year = {2024},
  eprint = {2411.12780},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.12780},
}
Figure