paper-with-me

Papers

DISTFLASHATTN: Distributed Memory-efficient Attention for Long-context LLMs Training

2023-10-05 · Dacheng Li, Rulin Shao, Anze Xie, Eric P. Xing, Xuezhe Ma, Ion Stoica, Joseph E. Gonzalez, Hao Zhang

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.

📄 PDF Abstract BibTeX arXiv:2310.03294

Code (1)

rulinshao/lightseq 공식 구현 pytorch

Tasks

GPU

Methods 이 논문이 사용한 방법론

Gradient Checkpointing Gradient Checkpointing is a method used for reducing the memory footprint when training deep neural networks, at the cost of having a small increase in computation time.

Similar Papers 제목 키워드 기반

Long-Context Attention Benchmark: From Kernel Efficiency to Distributed Context Parallelism

2025-10-19 · Tao Bu, Qiangang Wang, Bowen Zeng, Hanwen Sun 외 arxiv

Transformer-based large language models (LLMs) have achieved remarkable success, yet their standard attention mechanism incurs quadratic computation and memory costs with respect to sequence length, posing a major bottle…

Untied Ulysses: Memory-Efficient Context Parallelism via Headwise Chunking

2026-02-24 · Ravi Ghadia, Maksim Abraham, Sergei Vorobyov, Max Ryabinin arxiv

Efficiently processing long sequences with Transformer models usually requires splitting the computations across accelerators via context parallelism. The dominant approaches in this family of methods, such as Ring Atten…

BurstAttention: An Efficient Distributed Attention Framework for Extremely Long Sequences

2024-03-14 · Ao Sun, Weilin Zhao, Xu Han, Cheng Yang 외

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 whe…

Associative Recurrent Memory Transformer

2024-07-05 · Ivan Rodkin, Yuri Kuratov, Aydar Bulatov, Mikhail Burtsev

This paper addresses the challenge of creating a neural architecture for very long sequences that requires constant time for processing new information at each time step. Our approach, Associative Recurrent Memory Transf…

Retrieval

LV-XAttn: Distributed Cross-Attention for Long Visual Inputs in Multimodal Large Language Models

2025-02-04 · Tzu-Tao Chang, Shivaram Venkataraman

Cross-attention is commonly adopted in multimodal large language models (MLLMs) for integrating visual information into the language backbone. However, in applications with large visual inputs, such as video understandin…

GPUVideo Understanding