Tiled Flash Linear Attention: More Efficient Linear RNN and xLSTM Kernels
Maximilian Beck, Korbinian Pöppel, Phillip Lippe, Sepp Hochreiter
摘要
Linear RNNs with gating recently demonstrated competitive performance compared to Transformers in language modeling. Although their linear compute scaling in sequence length offers theoretical runtime advantages over Transformers, realizing these benefits in practice requires optimized custom kernels, as Transformers rely on the highly efficient Flash Attention kernels (Dao, 2024). Leveraging the chunkwise-parallel formulation of linear RNNs, Flash Linear Attention (FLA) (Yang & Zhang, 2024) shows that linear RNN kernels are faster than Flash Attention, by parallelizing over chunks of the input sequence. However, since the chunk size of FLA is limited, many intermediate states must be materialized in GPU memory. This leads to low arithmetic intensity and causes high memory consumption and IO cost, especially for long-context pre-training. In this work, we present Tiled Flash Linear Attention (TFLA), a novel kernel algorithm for linear RNNs, that enables arbitrary large chunk sizes and high arithmetic intensity by introducing an additional level of sequence parallelization within each chunk. First, we apply TFLA to the xLSTM with matrix memory, the mLSTM (Beck et al., 2024). Second, we propose an mLSTM variant with sigmoid input gate and reduced computation for even faster kernel runtimes at equal language modeling performance. In our speed benchmarks, we show that our new mLSTM kernels based on TFLA outperform highly optimized Flash Attention, Linear Attention and Mamba kernels, setting a new state of the art for efficient long-context sequence modeling primitives. Our code is available at: https://github.com/NX-AI/mlstm_kernels * Now at Google Deepmind.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 9 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Products 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Products 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- xLSTM Scaling Laws: Competitive Performance with Linear Time-Complexity 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Effective Distillation to Hybrid xLSTM Architectures 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Effective Distillation to Hybrid xLSTM Architectures 引用了 xLSTM Scaling Laws: Competitive Performance with Linear Time-Complexity
- Effective Distillation to Hybrid xLSTM Architectures 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Effective Distillation to Hybrid xLSTM Architectures 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- Effective Distillation to Hybrid xLSTM Architectures 引用了 Short Window Attention Enables Long-Term Memorization
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Log-Linear Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Log-Linear Attention 引用了 DeltaProduct: Improving State-Tracking in Linear RNNs via Householder Products
- Log-Linear Attention 引用了 FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness
- Log-Linear Attention 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Log-Linear Attention 引用了 Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioning
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality 引用了 Language Models are Few-Shot Learners
- Short Window Attention Enables Long-Term Memorization 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
引用它的顶会 Paper9
- DeltaProduct: Improving State-Tracking in Linear RNNs via Householder ProductsJulien Siems, Timur Carstensen, Arber Zela, Frank Hutter 等NeurIPS 2025 · 75 次引用
- Log-Linear AttentionHan Guo, Songlin Yang, Tarushii Goel, Eric P. Xing 等ICLR 2026 · 41 次引用
- Short Window Attention Enables Long-Term MemorizationLoïc Cabannes, Maximilian Beck, Maria Lomeli, Gergely Szilvasy 等ICLR 2026 · 11 次引用
- xLSTM Scaling Laws: Competitive Performance with Linear Time-ComplexityMaximilian Beck, Kajetan Schweighofer, Sebastian Böck, Sebastian Lehner 等ICLR 2026 · 3 次引用
- Effective Distillation to Hybrid xLSTM ArchitecturesLukas Hauzenberger, Niklas Schmidinger, Thomas Schmied, Anamaria-Roberta Hartl 等ICML 2026 · 3 次引用
它引用的 Paper23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
- Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space DualityTri Dao, Albert GuICML 2024 · 1,407 次引用
相关 Paper
- Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
- FlexLinearAttention: Compiling a Unified Abstraction into Scalable Kernels for Linear AttentionHaojie Duanmu, Size Zheng, Ningxin Zheng, Jianqiao Lu 等ICLR 2026
- QiMeng-Attention: SOTA Attention Operator is generated by SOTA Attention AlgorithmQirui Zhou, Shaohui Peng, Weiqiang Xiong, Haixin Chen 等ACL Findings 2025 · 1 次引用
- Various Lengths, Constant Speed: Efficient Language Modeling with Lightning AttentionZhen Qin, Weigao Sun, Dong Li, Xuyang Shen 等ICML 2024 · 26 次引用
- Masked Gated Linear UnitYukito Tajima, Nakamasa Inoue, Yusuke Sekikawa, Ikuro Sato 等NeurIPS 2025
