atlas

Research map / Architectures and efficiency / RNNs and normalization

FlashRNN: I/O-Aware Optimization of Traditional RNNs on modern hardware

ICLR 2025 · Architectures and efficiency › RNNs and normalization · approach: Efficient recurrent architectures · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Introduces FlashRNN, hardware-optimized CUDA and Triton kernels for traditional RNNs (LSTM, GRU, sLSTM) with fused matrix-multiply and pointwise ops, head-wise block-diagonal recurrence, and an integer CSP solver (ConstrINT) for auto-tuning tile sizes.

Problem

Traditional RNNs with state tracking capabilities are slow due to strictly sequential processing and inefficient GPU kernels (alternating matmul and pointwise kernels, limited precision support), so they lag Transformers in practical speed.

Approach

Fuse the recurrent matrix multiplication and pointwise state updates into a single persistent GPU kernel that caches the recurrent weights in registers/SRAM, combined with block-diagonal (multi-head) recurrent matrices and an automatic tile-size optimizer (ConstrINT) that solves integer CSPs with equality, inequality and divisibility constraints modeling hardware limits.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN LSTM, 1 head · SlimPajama trainingTrain Time: 10.8 -> 9.9 hHelped
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN LSTM, 1 head · SlimPajama validationVal PPL: 21.9 -> 22.1Hurt
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN LSTM, 12 heads · SlimPajama trainingTrain Time: 9.6 -> 5.9 hHelped
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN LSTM, 12 heads · SlimPajama validationVal PPL: 22.1 -> 22.2Hurt
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN sLSTM, 1 head · SlimPajama trainingTrain Time: 10.9 -> 10.1 hHelped
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN sLSTM, 1 head · SlimPajama validationVal PPL: 21.4 -> 21.3Helped
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN sLSTM, 12 heads · SlimPajama trainingTrain Time: 9.7 -> 6.8 hHelped
Use CUDA fused kernels instead of CUDA alternating kernels (ablation)FlashRNN sLSTM, 12 heads · SlimPajama validationVal PPL: 21.8 -> 21.7Helped
Replace attention with FlashRNN LSTM or sLSTM layers165M-parameter language model on SlimPajama · SlimPajama trainingTrain Time: Transformer 2.9; FlashRNN LSTM/sLSTM 5.9–10.9Hurt
Replace attention with FlashRNN LSTM or sLSTM layers165M-parameter language model on SlimPajama · SlimPajama validationVal PPL: 17.9 -> 21.3–22.2Hurt
Use FlashRNN LSTM instead of PyTorch nn.LSTMLSTM language model, 1 head · SlimPajama trainingTrain Time: 4.5 -> 9.9 hHurt
Use FlashRNN LSTM instead of PyTorch nn.LSTMLSTM language model, 1 head · SlimPajama validationVal PPL: 25.8 -> 22.1Helped

Surprising findings

Limitations

Experimental setup

Datasets: SlimPajama synthetic parity task data

Benchmarks: SlimPajama validation perplexity parity sequence extrapolation

Metrics: runtime (ms) speed-up over PyTorch validation perplexity training time extrapolation accuracy

Baselines: PyTorch vanilla LSTM nn.LSTM (cuDNN) HASTE FlashAttention2 Transformer Mamba mLSTM

Builds on: HASTE FlashAttention xLSTM (sLSTM) Triton

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy