TensorX
返回文献探索

Paper · arXiv 2403.09347

BurstAttention: An Efficient Distributed Attention Framework for Extremely Long Sequences

Sun Ao, Weilin Zhao, Xu Han, Cheng Yang, Zhiyuan Liu, Chuan Shi, Maosong Sun, Shengnan Wang, Teng Su

22 upvotesMarch 14, 2024arXiv 预印本
AI 摘要

BurstAttention is a distributed attention framework that optimizes memory and communication for processing long sequences, reducing overhead and improving speed compared to existing solutions.

Transformer-based large language modelsattention modulesquadratic time complexityquadratic memory complexitydistributed clustersGPUsmemory overheadscommunication costsdistributed attention frameworkBurstAttentionlong sequence processingcommunication overheadsspeedup

Abstract

Effective attention modules have played a crucial role in the success of Transformer-based large language models (LLMs), but the quadratic time and memory complexities of these attention modules also pose a challenge when processing long sequences. One potential solution for the long sequence problem is to utilize distributed clusters to parallelize the computation of attention modules across multiple devices (e.g., GPUs). However, adopting a distributed approach inevitably introduces extra memory overheads to store local attention results and incurs additional communication costs to aggregate local results into global ones. In this paper, we propose a distributed attention framework named ``BurstAttention'' to optimize memory access and communication operations at both the global cluster and local device levels. In our experiments, we compare BurstAttention with other competitive distributed attention solutions for long sequence processing. The experimental results under different length settings demonstrate that BurstAttention offers significant advantages for processing long sequences compared with these competitive baselines, reducing 40% communication overheads and achieving 2 X speedup during training 32K sequence length on 8 X A100.

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

京ICP备2026059466号
BurstAttention: An Efficient Distributed Attention Framework for Extremely Long Sequences | TensorX