Lune

EMNLP2024Top-tier venue

Transformers are Multi-State RNNs

Matanel Oren, Michael Hassid, Yarden Nir, Yossi Adi, Roy Schwartz

Abstract

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

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

75 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Streaming Language Models with Attention Sinks cites Big Bird: Transformers for Longer Sequences
  • Efficient Streaming Language Models with Attention Sinks cites Language Models are Few-Shot Learners
  • MoBA: Mixture of Block Attention for Long-Context LLMs cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • MoBA: Mixture of Block Attention for Long-Context LLMs cites Efficient Streaming Language Models with Attention Sinks
  • MoBA: Mixture of Block Attention for Long-Context LLMs cites Big Bird: Transformers for Longer Sequences
  • MoBA: Mixture of Block Attention for Long-Context LLMs cites QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference
  • MoBA: Mixture of Block Attention for Long-Context LLMs cites MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention
  • Efficiently Modeling Long Sequences with Structured State Spaces cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference cites Efficient Streaming Language Models with Attention Sinks
  • Gated Linear Attention Transformers with Hardware-Efficient Training cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Gated Linear Attention Transformers with Hardware-Efficient Training cites Big Bird: Transformers for Longer Sequences
  • Gated Linear Attention Transformers with Hardware-Efficient Training cites Efficiently Modeling Long Sequences with Structured State Spaces
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites Efficient Streaming Language Models with Attention Sinks
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites Big Bird: Transformers for Longer Sequences
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites Efficiently Modeling Long Sequences with Structured State Spaces
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites QUEST: Query-Aware Sparsity for Efficient Long-Context LLM Inference
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention cites Dynamic Memory Compression: Retrofitting LLMs for Accelerated Inference
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers75

  1. MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu et al.NeurIPS 2024 · 479 citations
  2. Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda et al.ICML 2024 · 390 citations
  3. QUEST: Query-Aware Sparsity for Efficient Long-Context LLM InferenceJiaming Tang, Yilong Zhao, Kan Zhu, Guangxuan Xiao et al.ICML 2024 · 316 citations
  4. MoBA: Mixture of Block Attention for Long-Context LLMsEnzhe Lu, Zhejun Jiang, Jingyuan Liu, Yulun Du et al.NeurIPS 2025 · 219 citations
  5. Dynamic Memory Compression: Retrofitting LLMs for Accelerated InferencePiotr Nawrot, Adrian Lancucki, Marcin Chochowski, David Tarjan et al.ICML 2024 · 106 citations

Builds on33

  1. Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
  2. Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
  3. Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie et al.NeurIPS 2020 · 3,159 citations
  4. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 citations
  5. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han et al.ICLR 2024 · 1,714 citations

Related papers

  1. RocketKV: Accelerating Long-Context LLM Inference via Two-Stage KV Cache CompressionPayman Behnam, Yaosheng Fu, Ritchie Zhao, Po-An Tsai et al.ICML 2025
  2. MUSTAFAR: Promoting Unstructured Sparsity for KV Cache Pruning in LLM InferenceDonghyeon Joo, Helya Hosseini, Ramyad Hadidi, Bahar AsgariNeurIPS 2025 · 12 citations
  3. Numerical Pruning for Efficient Autoregressive ModelsXuan Shen, Zhao Song, Yufa Zhou, Bo Chen et al.AAAI 2025 · 5 citations
  4. OATS: Outlier-Aware Pruning Through Sparse and Low Rank DecompositionStephen Zhang, Vardan PapyanICLR 2025
  5. DyCoke: Dynamic Compression of Tokens for Fast Video Large Language ModelsKeda Tao, Can Qin, Haoxuan You, Yang Sui et al.CVPR 2025
Dusk over the sea between two cliffs drawn in fine vertical lines