arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2102.07988cs.LGcs.CLcs.DC
收藏

TeraPipe:用于训练大规模语言模型的令牌级流水线并行

TeraPipe: Token-Level Pipeline Parallelism for Training Large-Scale Language Models

UC Berkeley(加州大学伯克利分校);Duke University(杜克大学)

Zhuohan Li, Siyuan Zhuang, Shiyuan Guo, Danyang Zhuo, Hao Zhang, Dawn Song, Ion Stoica

摘要:

模型并行已经成为训练现代大规模深度语言模型的必要条件。在这项工作中,我们确定了一个新的和正交的维度,从现有的模型并行方法:它是可能的,以执行流水线并行在一个单一的训练序列基于transformer的语言模型由于其自回归属性。与以前的工作相比,这可以实现更细粒度的管道。基于这一核心思想,我们设计了一种高性能的令牌级流水线并行算法TeraPipe,用于基于transformer的语言模型的同步模型并行训练。我们开发了一种新的基于动态规划的算法来计算给定特定模型和集群配置的最优流水线执行方案。我们表明,与最先进的模型并行方法相比,TeraPipe可以将AWS集群上具有1750亿个参数的最大GPT-3模型的训练速度提高5.0倍,其中包含48个p3.16xlarge实例。复制代码可以在https://github.com/zhuohan123/terapipe上找到

英文摘要:

Model parallelism has become a necessity for training modern large-scale deep language models. In this work, we identify a new and orthogonal dimension from existing model parallel approaches: it is possible to perform pipeline parallelism within a single training sequence for Transformer-based language models thanks to its autoregressive property. This enables a more fine-grained pipeline compared with previous work. With this key idea, we design TeraPipe, a high-performance token-level pipeline parallel algorithm for synchronous model-parallel training of Transformer-based language models. We develop a novel dynamic programming-based algorithm to calculate the optimal pipelining execution scheme given a specific model and cluster configuration. We show that TeraPipe can speed up the training by 5.0x for the largest GPT-3 model with 175 billion parameters on an AWS cluster with 48 p3.16xlarge instances compared with state-of-the-art model-parallel methods. The code for reproduction can be found at https://github.com/zhuohan123/terapipe

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

↑