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

By Zhuohan Li, Siyuan Zhuang, Shiyuan Guo, Danyang Zhuo, Dawn Song, Ion Stoica. 2021

166 citations recorded by the source corpus.

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

Subfields: Artificial Intelligence, Model Architectures, Efficiency & Compression

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Jianfeng Gao
  2. Quoc V. Le
  3. Zhiyuan Liu
  4. Graham Neubig
  5. Luke S. Zettlemoyer
  6. Minlie Huang
  7. Mohit Bansal
  8. Percy Liang

In Model Architectures

  1. Myle Ott
  2. Xipeng Qiu
  3. Yang Liu
  4. Yanping Huang
  5. Yonghui Wu
  6. Sam Shleifer
  7. Bryan Catanzaro
  8. Jie Tang

In Efficiency & Compression

  1. Matei A. Zaharia
  2. Mohammad Shoeybi
  3. Bryan Catanzaro
  4. Yanping Huang
  5. M. Patwary
  6. D. Narayanan
  7. Yonghui Wu
  8. Xipeng Qiu

Citations in the corpus