DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Training
Not on the map. Why?
Abstract (arXiv)
FlashAttention (Dao, 2023) effectively reduces the quadratic peak memory usage to linear in training transformer-based large language models (LLMs) on a single GPU. In this paper, we introduce DISTFLASHATTN, a distributed memory-efficient attention mechanism optimized for long-context LLMs training. We propose three key techniques: token-level workload balancing, overlapping key-value communication, and a rematerialization-aware gradient checkpointing algorithm. We evaluate DISTFLASHATTN on Llama-7B and variants with sequence lengths from 32K to 512K. DISTFLASHATTN achieves 8x longer sequences, 4.45 - 5.64x speedup compared to Ring Self-Attention, 2 - 8x longer sequences, 1.24 - 2.01x speedup compared to Megatron-LM with FlashAttention. It achieves 1.67x and 1.26 - 1.88x speedup compared to recent Ring Attention and DeepSpeed-Ulysses. Code is available at https://github.com/RulinShao/LightSeq.
Key facts. Cited by 29 papers in the map (data through 14 Oct 2026). Builds on 19 of its 25 references that are in the map. First posted on arXiv 5 Oct 2023.
Builds on
19 of 25 references.
References · 19
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,305
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 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
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2016Training Deep Nets with Sublinear Memory Costcited by 848
- 2023PyTorch FSDP: Experiences on Scaling Fully Sharded Data Parallelcited by 660
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
7 more
- 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
- 2022A Length-Extrapolatable Transformercited by 127
- 2019Checkmate: Breaking the Memory Wall with Optimal Tensor Rematerializationcited by 91
- 2021Multi-head or Single-head? An Empirical Comparison for Transformer Trainingcited by 16
Built on by
Citing papers per year: 2023: 2; 2024: 4; 2025: 14; 2026: 9.
29 papers.
Sort:
By area:
- 2025Fast Video Generation with Sliding Tile Attentioncited by 128
- 2023Scaling Laws of RoPE-based Extrapolationcited by 125
- 2025Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Librarycited by 101
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
- 2025MegaScale-MoE: Large-Scale Communication-Efficient Training of Mixture-of-Experts Models in Productioncited by 31
- 2024Context Parallelism for Scalable Million-Token Inferencecited by 26
- 2025Efficient-vDiT: Efficient Video Diffusion Transformers With Attention Tilecited by 26
- 2024FlexSP: Accelerating Large Language Model Training via Flexible Sequence Parallelismcited by 19
- 2023Efficient Parallelization Layouts for Large-Scale Distributed Model Trainingcited by 8
- 2025Helix Parallelism: Rethinking Sharding Strategies for Interactive Multi-Million-Token LLM Decodingcited by 7
- 2026Out of the Memory Barrier: A Highly Memory Efficient Training System for LLMs with Million-Token Contextscited by 4
- 2024Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignmentcited by 3
17 more
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3
- 2025Arctic Long Sequence Training: Scalable And Efficient Training For Multi-Million Token Sequencescited by 3
- 2026LongStraw: Long-Context RL Beyond 2M Tokens under a Fixed GPU Budgetcited by 3
- 2025HelixPipe: Efficient Distributed Training of Long Sequence Transformers with Attention Parallel Pipeline Parallelismcited by 2
- 2025Pixel-Resolved Long-Context Learning for Turbulence at Exascale: Resolving Small-scale Eddies Toward the Viscous Limitcited by 1
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networkscited by 1
- 2025A Scalable Distributed Framework for Multimodal GigaVoxel Image Registrationcited by 1
- 2026Efficient Scaling of LLM Training with Flexible Context Parallelismcited by 1
- 2025LV-XAttn: Distributed Cross-Attention for Long Visual Inputs in Multimodal Large Language Modelscited by 0
- 2025Scaling Generative Recommendations with Context Parallelism on Hierarchical Sequential Transducerscited by 0
- 2025TASP: Topology-aware Sequence Parallelismcited by 0
- 2026Data-Aware Random Feature Kernel for Transformerscited by 0
- 2026Stream-CQSA: Exact Out-of-Memory Recovery for Attentioncited by 0
- 2026ELSA: Exact Linear-Scan Attention for Fast and Memory-Light Vision Transformerscited by 0
- 2026The Life of a Token: from Words to Bits on the Wirecited by 0
- 2026FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attentioncited by 0
- 2026FlashMask-3: Efficient and Expressive Mask-Aware Distributed Attentioncited by 0
- 2026FlashMask-3: Efficient and Expressive Mask-Aware Distributed Attention13 Oct 2026
- 2026FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attention21 Sep 2026
- 2026The Life of a Token: from Words to Bits on the Wire17 Sep 2026
- 2026LongStraw: Long-Context RL Beyond 2M Tokens under a Fixed GPU Budget16 Jul 2026
- 2026ELSA: Exact Linear-Scan Attention for Fast and Memory-Light Vision Transformers26 Apr 2026
- 2026Stream-CQSA: Exact Out-of-Memory Recovery for Attention22 Apr 2026
- 2026Data-Aware Random Feature Kernel for Transformers4 Mar 2026
- 2026Efficient Scaling of LLM Training with Flexible Context Parallelism25 Feb 2026
- 2026Out of the Memory Barrier: A Highly Memory Efficient Training System for LLMs with Million-Token Contexts2 Feb 2026
- 2025TASP: Topology-aware Sequence Parallelism30 Sep 2025
- 2025A Scalable Distributed Framework for Multimodal GigaVoxel Image Registration29 Sep 2025
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networks6 Aug 2025
17 more
- 2025Scaling Generative Recommendations with Context Parallelism on Hierarchical Sequential Transducers23 Jul 2025
- 2025Pixel-Resolved Long-Context Learning for Turbulence at Exascale: Resolving Small-scale Eddies Toward the Viscous Limit22 Jul 2025
- 2025Helix Parallelism: Rethinking Sharding Strategies for Interactive Multi-Million-Token LLM Decoding7 Jul 2025
- 2025HelixPipe: Efficient Distributed Training of Long Sequence Transformers with Attention Parallel Pipeline Parallelism1 Jul 2025
- 2025Arctic Long Sequence Training: Scalable And Efficient Training For Multi-Million Token Sequences16 Jun 2025
- 2025Reinforcement Learning Optimization for Large-Scale Learning: An Efficient and User-Friendly Scaling Library6 Jun 2025
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefilling30 May 2025
- 2025MegaScale-MoE: Large-Scale Communication-Efficient Training of Mixture-of-Experts Models in Production16 May 2025
- 2025Efficient-vDiT: Efficient Video Diffusion Transformers With Attention Tile10 Feb 2025
- 2025Fast Video Generation with Sliding Tile Attention6 Feb 2025
- 2025LV-XAttn: Distributed Cross-Attention for Long Visual Inputs in Multimodal Large Language Models4 Feb 2025
- 2024Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignment10 Dec 2024
- 2024FlexSP: Accelerating Large Language Model Training via Flexible Sequence Parallelism2 Dec 2024
- 2024Context Parallelism for Scalable Million-Token Inference4 Nov 2024
- 2024Why Does the Effective Context Length of LLMs Fall Short?24 Oct 2024
- 2023Efficient Parallelization Layouts for Large-Scale Distributed Model Training9 Nov 2023
- 2023Scaling Laws of RoPE-based Extrapolation8 Oct 2023
- 2025Fast Video Generation with Sliding Tile Attentioncited by 128
- 2025Efficient-vDiT: Efficient Video Diffusion Transformers With Attention Tilecited by 26
- 2023Scaling Laws of RoPE-based Extrapolationcited by 125
- 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
- 2024Context Parallelism for Scalable Million-Token Inferencecited by 26
- 2024FlexSP: Accelerating Large Language Model Training via Flexible Sequence Parallelismcited by 19
- 2023Efficient Parallelization Layouts for Large-Scale Distributed Model Trainingcited by 8
- 2024Hydraulis: Balancing Large Transformer Model Training via Co-designing Parallel Strategies and Data Assignmentcited by 3
- 2025SALE : Low-bit Estimation for Efficient Sparse Attention in Long-context LLM Prefillingcited by 3
- 2025Arctic Long Sequence Training: Scalable And Efficient Training For Multi-Million Token Sequencescited by 3
- 2026LongStraw: Long-Context RL Beyond 2M Tokens under a Fixed GPU Budgetcited by 3
- 2025HelixPipe: Efficient Distributed Training of Long Sequence Transformers with Attention Parallel Pipeline Parallelismcited by 2
- 2025Pixel-Resolved Long-Context Learning for Turbulence at Exascale: Resolving Small-scale Eddies Toward the Viscous Limitcited by 1
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networkscited by 1
12 most cited of 22 All 22 (JSON)
- 2026FlashMask-3: Efficient and Expressive Mask-Aware Distributed Attention13 Oct 2026
- 2026FlashBoB: I/O-Efficient Exact Backward-over-Backward for Softmax Attention21 Sep 2026
- 2026The Life of a Token: from Words to Bits on the Wire17 Sep 2026
- 2026LongStraw: Long-Context RL Beyond 2M Tokens under a Fixed GPU Budget16 Jul 2026
- 2026ELSA: Exact Linear-Scan Attention for Fast and Memory-Light Vision Transformers26 Apr 2026
- 2026Stream-CQSA: Exact Out-of-Memory Recovery for Attention22 Apr 2026
- 2026Data-Aware Random Feature Kernel for Transformers4 Mar 2026
- 2026Efficient Scaling of LLM Training with Flexible Context Parallelism25 Feb 2026
- 2025TASP: Topology-aware Sequence Parallelism30 Sep 2025
- 2025A Scalable Distributed Framework for Multimodal GigaVoxel Image Registration29 Sep 2025
- 2025Why Attention Fails: A Taxonomy of Faults in Attention-Based Neural Networks6 Aug 2025
- 2025Scaling Generative Recommendations with Context Parallelism on Hierarchical Sequential Transducers23 Jul 2025
12 newest of 22 All 22 (JSON)