Transformers are Multi-State RNNs
Matanel Oren, Michael Hassid, Yarden Nir, Yossi Adi, Roy Schwartz
摘要
Transformers are considered conceptually different from the previous generation of stateof-the-art NLP models-recurrent neural networks (RNNs). In this work, we demonstrate that decoder-only transformers can in fact be conceptualized as unbounded multistate RNNs-an RNN variant with unlimited hidden state size. We further show that transformers can be converted into bounded multistate RNNs by fixing the size of their hidden state, effectively compressing their keyvalue cache. We introduce a novel, trainingfree compression policy-Token Omission Via Attention (TOVA). 1 Our experiments with four long range tasks and several LLMs show that TOVA outperforms several baseline compression policies. Particularly, our results are nearly on par with the full model, using in some cases only 1 /8 of the original cache size, which translates to 4.8X higher throughput. Our results shed light on the connection between transformers and RNNs, and help mitigate one of LLMs' most painful computational bottlenecks-the size of their key-value cache. 2 * Equal contribuation 1 Literally "good" in Hebrew. 2 https://github.com/schwartz-lab-NLP/TOVA
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 75 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Efficient Streaming Language Models with Attention Sinks 引用了 Big Bird: Transformers for Longer Sequences
- Efficient Streaming Language Models with Attention Sinks 引用了 Language Models are Few-Shot Learners
- MoBA: Mixture of Block Attention for Long-Context LLMs 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- MoBA: Mixture of Block Attention for Long-Context LLMs 引用了 Efficient Streaming Language Models with Attention Sinks
- MoBA: Mixture of Block Attention for Long-Context LLMs 引用了 Big Bird: Transformers for Longer Sequences
- MoBA: Mixture of Block Attention for Long-Context LLMs 引用了 QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference
- MoBA: Mixture of Block Attention for Long-Context LLMs 引用了 MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention
- Efficiently Modeling Long Sequences with Structured State Spaces 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference 引用了 Efficient Streaming Language Models with Attention Sinks
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Big Bird: Transformers for Longer Sequences
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Efficient Streaming Language Models with Attention Sinks
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Big Bird: Transformers for Longer Sequences
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Efficiently Modeling Long Sequences with Structured State Spaces
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inference
引用它的顶会 Paper75
- MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu 等NeurIPS 2024 · 479 次引用
- Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
- QUEST: Query-Aware Sparsity for Efficient Long-Context LLM InferenceJiaming Tang, Yilong Zhao, Kan Zhu, Guangxuan Xiao 等ICML 2024 · 316 次引用
- MoBA: Mixture of Block Attention for Long-Context LLMsEnzhe Lu, Zhejun Jiang, Jingyuan Liu, Yulun Du 等NeurIPS 2025 · 219 次引用
- Dynamic Memory Compression: Retrofitting LLMs for Accelerated InferencePiotr Nawrot, Adrian Lancucki, Marcin Chochowski, David Tarjan 等ICML 2024 · 106 次引用
它引用的 Paper33
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
- Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
相关 Paper
- RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache CompressionPayman Behnam, Yaosheng Fu, Ritchie Zhao, Po-An Tsai 等ICML 2025
- MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM InferenceDonghyeon Joo, Helya Hosseini, Ramyad Hadidi, Bahar AsgariNeurIPS 2025 · 12 次引用
- Numerical Pruning for Efficient Autoregressive ModelsXuan Shen, Zhao Song, Yufa Zhou, Bo Chen 等AAAI 2025 · 5 次引用
- OATS: Outlier-Aware Pruning Through Sparse and Low Rank DecompositionStephen Zhang, Vardan PapyanICLR 2025
- DyCoke: Dynamic Compression of Tokens for Fast Video Large Language ModelsKeda Tao, Can Qin, Haoxuan You, Yang Sui 等CVPR 2025
