This repository is the official implementation of the following paper:
PipeTransformer: Automated Elastic Pipelining for Distributed Training of Large-scale Models
Chaoyang He (USC), Shen Li (Facebook AI Research), Mahdi Soltanolkotabi (USC), Salman Avestimehr (USC)
Accepted to ICML 2021 (International Conference on Machine Learning 2021)
The size of Transformer models is growing at an unprecedented rate. It has taken less than one year to reach trillion-level parameters since the release of GPT-3 (175B).
Training such models requires both substantial engineering efforts and enormous computing resources, which are luxuries most research teams cannot afford.
In this paper, we propose PipeTransformer, which leverages automated elastic pipelining for efficient distributed training of Transformer models.
In PipeTransformer, we design an adaptive on the fly freeze algorithm that can identify and freeze some layers gradually during training, and an elastic pipelining system that can dynamically allocate resources to train the remaining active layers.
More specifically, PipeTransformer automatically excludes frozen layers from the pipeline, packs active layers into fewer GPUs, and forks more replicas to increase data-parallel width.
We evaluate PipeTransformer using Vision Transformer (ViT) on ImageNet and BERT on SQuAD and GLUE datasets. Our results show that compared to the state-of-the-art baseline, PipeTransformer attains up to
https://docs.google.com/presentation/d/1t6HWL33KIQo2as0nSHeBpXYtTBcy0nXCoLiKd0EashY/edit?usp=sharing
https://videos.files.wordpress.com/3vsRzoiw/pipetransformer-animation_m4v_hd.mp4
Please follow INSTALL-CONDA.md
.
check README.md at
examples/image_classification
examples/question_answering
examples/text_classification
If you use any part of this code in your research or any engineering project, please cite our paper:
@article{he2021pipetransformer,
title={Pipetransformer: Automated Elastic Pipelining for Distributed Training of Large-scale Models},
author={He, Chaoyang and Li, Shen and Soltanolkotabi, Mahdi and Avestimehr, Salman},
journal={Thirty-eighth International Conference on Machine Learning},
year={2021}
}
Chaoyang He
https://chaoyanghe.com
chaoyang.he@usc.edu
chaoyanghe.com@gmail.com