Ultra-Long Sequence Distributed Transformer

Xiao Wang, Isaac Lyngaas, Aristeidis Tsaris, Peng Chen, Sajal Dash +5 more
11/4/2023
cs.DCcs.AI
transformer-attention

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Transformer models trained on long sequences often achieve higher accuracy than short sequences. Unfortunately, conventional transformers struggle with long sequence training due to the overwhelming computation and memory requirements.

Show full abstract

Existing methods for long sequence training offer limited speedup and memory reduction, and may compromise accuracy. This paper presents a novel and efficient distributed training method, the Long Short-Sequence Transformer (LSS Transformer), for training transformer with long sequences. It distributes a long sequence into segments among GPUs, with each GPU computing a partial self-attention for its segment. Then, it uses a fused communication and a novel double gradient averaging technique to avoid the need to aggregate partial self-attention and minimize communication overhead. We evaluated the performance between LSS Transformer and the state-of-the-art Nvidia sequence parallelism on a Wikipedia enwik8 dataset. Results show that our proposed method lead to 5.6x faster and 10.2x more memory-efficient implementation compared to state-of-the-art sequence parallelism on 144 Nvidia V100 GPUs. Moreover, our algorithm scales to an extreme sequence length of 50,112 at 3,456 GPUs, achieving 161% super-linear parallel efficiency and a throughput of 32 petaflops.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wang2023ultralong,
  title  = {Ultra-Long Sequence Distributed Transformer},
  author = {Xiao Wang and Isaac Lyngaas and Aristeidis Tsaris and Peng Chen and Sajal Dash and Mayanka Chandra Shekar and Tao Luo and Hong-Jun Yoon and Mohamed Wahib and John Gouley},
  year   = {2023},
  eprint = {2311.02382},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.02382v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.02382.svg)](https://codeofpaper.com/paper/2311.02382)

Discussion