TensorX
返回文献探索

Paper · arXiv 2309.14509

DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models

Sam Ade Jacobs, Masahiro Tanaka, Chengming Zhang, Minjia Zhang, Leon Song, Samyam Rajbhandari, Yuxiong He

22 upvotesSeptember 25, 2023arXiv 预印本
AI 摘要

DeepSpeed-Ulysses enables efficient and scalable training of Transformer-based LLMs with long sequences by partitioning input data along the sequence dimension and using all-to-all communication.

Transformer-basedlarge language modelLLMdata parallelismtensor parallelismpipeline parallelismsequence parallelismmemory-communication inefficiencyDeepSpeed-Ulyssesall-to-all collective communicationattention computationcommunication analysis

Abstract

Computation in a typical Transformer-based large language model (LLM) can be characterized by batch size, hidden dimension, number of layers, and sequence length. Until now, system works for accelerating LLM training have focused on the first three dimensions: data parallelism for batch size, tensor parallelism for hidden size and pipeline parallelism for model depth or layers. These widely studied forms of parallelism are not targeted or optimized for long sequence Transformer models. Given practical application needs for long sequence LLM, renewed attentions are being drawn to sequence parallelism. However, existing works in sequence parallelism are constrained by memory-communication inefficiency, limiting their scalability to long sequence large models. In this work, we introduce DeepSpeed-Ulysses, a novel, portable and effective methodology for enabling highly efficient and scalable LLM training with extremely long sequence length. DeepSpeed-Ulysses at its core partitions input data along the sequence dimension and employs an efficient all-to-all collective communication for attention computation. Theoretical communication analysis shows that whereas other methods incur communication overhead as sequence length increases, DeepSpeed-Ulysses maintains constant communication volume when sequence length and compute devices are increased proportionally. Furthermore, experimental evaluations show that DeepSpeed-Ulysses trains 2.5X faster with 4X longer sequence length than the existing method SOTA baseline.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Models | TensorX