FlashRNN: I/O-Aware Optimization of Traditional RNNs on modern hardware
Not on the map. Why?
Abstract (arXiv)
While Transformers and other sequence-parallelizable neural network architectures seem like the current state of the art in sequence modeling, they specifically lack state-tracking capabilities. These are important for time-series tasks and logical reasoning. Traditional RNNs like LSTMs and GRUs, as well as modern variants like sLSTM do have these capabilities at the cost of strictly sequential processing. While this is often seen as a strong limitation, we show how fast these networks can get with our hardware-optimization FlashRNN in Triton and CUDA, optimizing kernels to the register level on modern GPUs. We extend traditional RNNs with a parallelization variant that processes multiple RNNs of smaller hidden state in parallel, similar to the head-wise processing in Transformers. To enable flexibility on different GPU variants, we introduce a new optimization framework for hardware-internal cache sizes, memory and compute handling. It models the hardware in a setting using polyhedral-like constraints, including the notion of divisibility. This speeds up the solution process in our ConstrINT library for general integer constraint satisfaction problems (integer CSPs). We show that our kernels can achieve 50x speed-ups over a vanilla PyTorch implementation and allow 40x larger hidden sizes compared to our Triton implementation. Our open-source kernels and the optimization library are released here to boost research in the direction of state-tracking enabled RNNs and sequence modeling: https://github.com/NX-AI/flashrnn
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 15 of its 26 references that are in the map. First posted on arXiv 10 Dec 2024.
Builds on
15 of 26 references.
References · 15
- 2017Attention Is All You Needcited by 59,932
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2014Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translationcited by 4,016
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 507
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2024xLSTM: Extended Long Short-Term Memorycited by 320
- 2022Neural Networks and the Chomsky Hierarchycited by 214
- 2023What Algorithms can Transformers Learn? A Study in Length Generalizationcited by 198
3 more
- 2022The Parallelism Tradeoff: Limitations of Log-Precision Transformerscited by 191
- 2024The Illusion of State in State-Space Modelscited by 181
- 2018Tiramisu: A Polyhedral Compiler for Expressing Fast and Portable Codecited by 53
Built on by
Citing papers per year: 2025: 3; 2026: 4.
7 papers.
- 2025TiRex: Zero-Shot Forecasting Across Long and Short Horizons with Enhanced In-Context Learningcited by 107
- 2025Tiled Flash Linear Attention: More Efficient Linear RNN and xLSTM Kernelscited by 12
- 2026M2RNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modelingcited by 7
- 2025pLSTM: parallelizable Linear Source Transition Mark networkscited by 2
- 2026FlashSampling: Fast and Memory-Efficient Exact Samplingcited by 2
- 2026Direct Advantage Estimation for Scalable and Sample-efficient Deep Reinforcement Learningcited by 1
- 2026Switching Linear Attentioncited by 0
- 2026Switching Linear Attention30 Sep 2026
- 2026Direct Advantage Estimation for Scalable and Sample-efficient Deep Reinforcement Learning18 Jun 2026
- 2026FlashSampling: Fast and Memory-Efficient Exact Sampling16 Mar 2026
- 2026M2RNN: Non-Linear RNNs with Matrix-Valued States for Scalable Language Modeling15 Mar 2026
- 2025pLSTM: parallelizable Linear Source Transition Mark networks13 Jun 2025
- 2025TiRex: Zero-Shot Forecasting Across Long and Short Horizons with Enhanced In-Context Learning29 May 2025
- 2025Tiled Flash Linear Attention: More Efficient Linear RNN and xLSTM Kernels18 Mar 2025
Similar, not cited
Close in wording, no citation either way
- 2025ParaRNN: Unlocking Parallel Training of Nonlinear RNNs for Large Language Models
- 2026To 2:4 Sparsity and Beyond: Neuron-level Activation Function to Accelerate LLM Pre-Training
- 2023Resurrecting Recurrent Neural Networks for Long Sequences
- 2025Lobster: A GPU-Accelerated Framework for Neurosymbolic Programming
- 2026Improving the Performance and Learning Stability of Parallelizable RNNs Designed for Ultra-Low Power Applications
- 2026A Persistent-State Dataflow Accelerator for Memory-Bound Linear Attention Decode on FPGA
- 2024Recurrent neural networks: vanishing and exploding gradients are not the end of the story
- 2024IMSSA: Deploying modern state-space models on memristive in-memory compute hardware