arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2102.03161cs.LG
收藏

PipeTransformer:用于Transformers分布式训练的自动化弹性流水线

PipeTransformer: Automated Elastic Pipelining for Distributed Training of Transformers

University of Southern California(南加利福尼亚大学);Facebook AI(脸书人工智能研究院)

Chaoyang He, Shen Li, Mahdi Soltanolkotabi, Salman Avestimehr

摘要:

Transformer型号的尺寸正在以前所未有的速度增长。从GPT-3(175 B)发布到现在,仅用了不到一年的时间就达到了万亿级的参数。训练这样的模型需要大量的工程努力和巨大的计算资源,这是大多数研究团队负担不起的奢侈品。在本文中,我们提出了Pipe Transformer,它利用自动化和弹性的流水线和数据并行性来有效地分布式训练Transformer模型。PipeTransformer通过在训练期间识别和冻结某些层来自动调整流水线和数据并行,并为其余活动层的训练分配资源。更具体地说,PipeTransformer动态地将聚合层从管道中排除,将活动层打包到更少的GPU中,并分叉更多的副本以增加数据并行宽度。我们使用ImageNet上的视觉Transformer(ViT)和GLUE和SQuAD数据集上的BERT来评估PipeTransformer。我们的研究结果表明,PipeTransformer实现了2.4倍的加速比,最先进的基线。我们还提供各种性能分析,以便更全面地了解我们的算法和系统设计。我们还为PipeTransformer开发了开源的灵活API,它在冻结算法,模型定义和训练加速之间提供了一个清晰的分离,因此允许它应用于需要类似冻结策略的其他算法。

英文摘要:

The size of Transformer models is growing at an unprecedented pace. It has only taken less than one year to reach trillion-level parameters after 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 and elastic pipelining and data parallelism for efficient distributed training of Transformer models. PipeTransformer automatically adjusts the pipelining and data parallelism by identifying and freezing some layers during the training, and instead allocates resources for training of the remaining active layers. More specifically, PipeTransformer dynamically excludes converged 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 GLUE and SQuAD datasets. Our results show that PipeTransformer attains a 2.4 fold speedup compared to the state-of-the-art baseline. We also provide various performance analyses for a more comprehensive understanding of our algorithmic and system-wise design. We also develop open-sourced flexible APIs for PipeTransformer, which offer a clean separation among the freeze algorithm, model definitions, and training accelerations, hence allowing it to be applied to other algorithms that require similar freezing strategies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑