ATTENTION2D: Communication Efficient Distributed Self-Attention Mechanism
Not on the map. Why?
Abstract (arXiv)
Transformer-based models have emerged as a leading architecture for natural language processing, natural language generation, and image generation tasks. A fundamental element of the transformer architecture is self-attention, which allows the model to capture intricate dependencies within the data. However, the self-attention mechanism also incurs significant computational and memory costs, particularly for long sequences. In this paper, we introduce ATTENTION2D, a novel approach that exploits parallelism along two dimensions - query and key/value - of the self-attention operation. This method enables efficient distribution and parallelization of computations across multiple devices. Our approach facilitates asymptotically faster training and inference phases compared to previous methods, without relying on approximations or incurring additional computational or memory overheads. Furthermore, unlike existing techniques that struggle to scale with an increasing number of processing units, our approach effectively scales with additional processing units. Our experimental results confirm the effectiveness of our method in improving communication efficiency and scalability. Compared to Ring Attention, our approach demonstrated up to a 5x performance boost on a GPT-3-like model using 64 NVIDIA A100 GPUs across 16 nodes, and up to a 9.4x performance boost on 64 NVIDIA H100 GPUs across 64 nodes.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 25 of its 32 references that are in the map. First posted on arXiv 20 Mar 2025.
Builds on
25 of 32 references.
References · 25
- 2017Attention Is All You Needcited by 60,361
- 2020Language Models are Few-Shot Learnerscited by 32,419
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2020Reformer: The Efficient Transformercited by 1,668
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,474
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
13 more
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
- 2022Reducing Activation Recomputation in Large Transformer Modelscited by 302
- 2023DeepSpeed Ulysses: System Optimizations for Enabling Training of Extreme Long Sequence Transformer Modelscited by 245
- 2018Online normalizer calculation for softmaxcited by 162
- 2021Self-attention Does Not Need O(n2) Memorycited by 154
- 2020Memory-Efficient Pipeline-Parallel DNN Trainingcited by 134
- 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 126
- 2018Highly Scalable Deep Learning Training System with Mixed-Precision: Training ImageNet in Four Minutescited by 63
- 2024USP: A Unified Sequence Parallelism Approach for Long Context Generative AIcited by 61
- 2018Image Classification at Supercomputer Scalecited by 16
- 2024Lean Attention: Hardware-Aware Scalable Attention Mechanism for the Decode-Phase of Transformerscited by 16
- 2024Tree Attention: Topology-aware Decoding for Long-Context Attention on GPU clusterscited by 13
Built on by
Not cited yet.