Training Ultra Long Context Language Model with Fully Pipelined Distributed Transformer

Jinghan Yao, Sam Ade Jacobs, Masahiro Tanaka, Olatunji Ruwase, Hari Subramoni +1 more
8/30/2024
cs.DCcs.AIcs.LG

No official code found. Best implementation: deepspeedai/DeepSpeed (43,229 stars, Apache-2.0, PyTorch, last commit 2026-04-29).

Abstract

Large Language Models (LLMs) with long context capabilities are integral to complex tasks in natural language processing and computational biology, such as text generation and protein sequence analysis. However, training LLMs directly on extremely long contexts demands considerable GPU resources and increased memory, leading to higher costs and greater complexity. Alternative approaches that introduce long context capabilities via downstream finetuning or adaptations impose significant design limitations. In this paper, we propose Fully Pipelined Distributed Transformer (FPDT) for efficiently training long-context LLMs with extreme hardware efficiency. For GPT and Llama models, we achieve a 16x increase in sequence length that can be trained on the same hardware compared to current state-of-the-art solutions. With our dedicated sequence chunk pipeline design, we can now train 8B LLM with 2 million sequence length on only 4 GPUs, while also maintaining over 55% of MFU. Our proposed FPDT is agnostic to existing training techniques and is proven to work efficiently across different LLM models.

View on arXivView PDF

Code Implementations(1)

PyTorchApache-2.0

DeepSpeed is a deep learning optimization library that makes distributed training and inference easy, efficient, and effective.

43,2295,039C, C++Jan 23, 20205 months agoApache-2.0
billion-parameterscompressiondata-parallelismdeep-learninggpu+8 more

Similar Papers

Cite this paper

@article{yao2024training,
  title  = {Training Ultra Long Context Language Model with Fully Pipelined Distributed Transformer},
  author = {Jinghan Yao and Sam Ade Jacobs and Masahiro Tanaka and Olatunji Ruwase and Hari Subramoni and Dhabaleswar K. Panda},
  year   = {2024},
  eprint = {2408.16978},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2408.16978v2}
}

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/2408.16978.svg)](https://codeofpaper.com/paper/2408.16978)

Discussion