ChatPaper.aiChatPaper

DeepSpeed Ulysses: 극도로 긴 시퀀스 트랜스포머 모델 학습을 위한 시스템 최적화

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

September 25, 2023
저자: Sam Ade Jacobs, Masahiro Tanaka, Chengming Zhang, Minjia Zhang, Leon Song, Samyam Rajbhandari, Yuxiong He
cs.AI

초록

일반적인 Transformer 기반 대형 언어 모델(LLM)의 계산은 배치 크기, 은닉 차원, 레이어 수, 시퀀스 길이로 특징지을 수 있습니다. 지금까지 LLM 학습 가속화를 위한 시스템 연구는 주로 처음 세 가지 차원에 초점을 맞추어 왔습니다: 배치 크기에 대한 데이터 병렬화, 은닉 크기에 대한 텐서 병렬화, 그리고 모델 깊이 또는 레이어에 대한 파이프라인 병렬화. 이렇게 널리 연구된 병렬화 형태는 긴 시퀀스 Transformer 모델을 대상으로 하거나 최적화되지 않았습니다. 긴 시퀀스 LLM의 실제 응용 요구를 고려할 때, 시퀀스 병렬화에 대한 새로운 관심이 집중되고 있습니다. 그러나 기존의 시퀀스 병렬화 연구는 메모리-통신 비효율성으로 인해 제약을 받아, 긴 시퀀스 대형 모델로의 확장성이 제한되었습니다. 본 연구에서는 극도로 긴 시퀀스 길이로 LLM 학습을 고효율적이고 확장 가능하게 하는 새로운, 이식 가능하며 효과적인 방법론인 DeepSpeed-Ulysses를 소개합니다. DeepSpeed-Ulysses는 핵심적으로 입력 데이터를 시퀀스 차원을 따라 분할하고, 어텐션 계산을 위한 효율적인 all-to-all 집단 통신을 사용합니다. 이론적 통신 분석에 따르면, 다른 방법들은 시퀀스 길이가 증가함에 따라 통신 오버헤드가 발생하는 반면, DeepSpeed-Ulysses는 시퀀스 길이와 컴퓨팅 장치가 비례적으로 증가할 때 통신량을 일정하게 유지합니다. 또한, 실험적 평가 결과, DeepSpeed-Ulysses는 기존의 SOTA 기준 방법보다 4배 더 긴 시퀀스 길이에서 2.5배 더 빠르게 학습하는 것으로 나타났습니다.
English
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.
PDF201December 15, 2024