Finetuning Pretrained Transformers into RNNs
Not on the map. Why?
Abstract (arXiv)
Transformers have outperformed recurrent neural networks (RNNs) in natural language generation. But this comes with a significant computational cost, as the attention mechanism's complexity scales quadratically with sequence length. Efficient transformer variants have received increasing interest in recent works. Among them, a linear-complexity recurrent variant has proven well suited for autoregressive generation. It approximates the softmax attention with randomized or heuristic feature maps, but can be difficult to train and may yield suboptimal accuracy. This work aims to convert a pretrained transformer into its efficient recurrent counterpart, improving efficiency while maintaining accuracy. Specifically, we propose a swap-then-finetune procedure: in an off-the-shelf pretrained transformer, we replace the softmax attention with its linear-complexity recurrent alternative and then finetune. With a learned feature map, our approach provides an improved tradeoff between efficiency and accuracy over the standard transformer and other recurrent variants. We also show that the finetuning process has lower training cost relative to training these recurrent variants from scratch. As many models for natural language tasks are increasingly dependent on large-scale pretrained transformers, this work presents a viable approach to improving inference efficiency without repeating the expensive pretraining process.
Key facts. Cited by 94 papers in the map (data through 7 Oct 2026). Builds on 65 of its 91 references that are in the map. First posted on arXiv 24 Mar 2021.
Builds on
65 of 91 references.
References · 65
- 2017Attention Is All You Needcited by 59,932
- 2015Deep Residual Learning for Image Recognitioncited by 51,809
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,266
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2019BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehensioncited by 5,874
- 2016Layer Normalizationcited by 5,579
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
38 more
- 2021Zero-Shot Text-to-Image Generationcited by 4,276
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2016Pointer Sentinel Mixture Modelscited by 2,992
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2020DeBERTa: Decoding-enhanced BERT with Disentangled Attentioncited by 2,157
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,830
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Reformer: The Efficient Transformercited by 1,658
- 2019Generating Long Sequences with Sparse Transformerscited by 1,523
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
- 2014On the Properties of Neural Machine Translation: Encoder-Decoder Approachescited by 1,303
- 2017Mixed Precision Trainingcited by 1,135
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2020Efficient Transformers: A Surveycited by 784
- 2018Image Transformercited by 770
- 2016Sequence-Level Knowledge Distillationcited by 761
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2018Universal Transformerscited by 613
- 2017Convolutional Sequence to Sequence Learningcited by 550
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2017Non-Autoregressive Neural Machine Translationcited by 457
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
- 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
- 2021Random Feature Attentioncited by 350
- 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
- 2019Q8BERT: Quantized 8Bit BERTcited by 296
- 2016Using the Output Embedding to Improve Language Modelscited by 266
- 2020Sparse Sinkhorn Attentioncited by 250
- 2020MiniLMv2: Multi-Head Self-Attention Relation Distillation for Compressing Pretrained Transformerscited by 240
- 2018Adaptive Input Representations for Neural Language Modelingcited by 226
- 2019Pay Less Attention with Lightweight and Dynamic Convolutionscited by 211
- 2019Transformer Dissection: A Unified Understanding of Transformer's Attention via the Lens of Kernelcited by 211
50 most cited of 65 All 65 (JSON)
Built on by
Citing papers per year: 2021: 11; 2022: 12; 2023: 8; 2024: 15; 2025: 26; 2026: 22.
94 papers.
Sort:
By area:
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2021SOFT: Softmax-free Transformer with Linear Complexitycited by 128
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 84
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inferencecited by 75
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 66
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 57
- 2024DiG: Scalable and Efficient Diffusion Models with Gated Linear Attentioncited by 56
38 more
- 2025End-to-End Test-Time Training for Long Contextcited by 53
- 2024Linearizing Large Language Modelscited by 51
- 2021Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encodingcited by 50
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrencecited by 41
- 2025Log-Linear Attentioncited by 39
- 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Searchcited by 39
- 2021Fast Nearest Neighbor Machine Translationcited by 37
- 2021ABC: Attention with Bounded-memory Controlcited by 36
- 2023PolySketchFormer: Fast Transformers via Sketching Polynomial Kernelscited by 33
- 2021Bidimensional Leaderboards: Generate and Evaluate Language Hand in Handcited by 32
- 2025Liger: Linearizing Large Language Models to Gated Recurrent Structurescited by 32
- 2022Linear Complexity Randomized Self-attention Mechanismcited by 31
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
- 2024LoLCATs: On Low-Rank Linearizing of Large Language Modelscited by 25
- 2025RADLADS: Rapid Attention Distillation to Linear Attention Decoders at Scalecited by 24
- 2022Sequencer: Deep LSTM for Image Classificationcited by 23
- 2023Efficient Attention via Control Variatescited by 23
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasonerscited by 22
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Modelscited by 21
- 2022How Much Does Attention Actually Attend? Questioning the Importance of Attention in Pretrained Transformerscited by 20
- 2024MetaLA: Unified Optimal Linear Approximation to Softmax Attention Mapcited by 20
- 2025Distilling to Hybrid Attention Models via KL-Guided Layer Selectioncited by 17
- 2021Towards Incremental Transformers: An Empirical Analysis of Transformer Models for Incremental NLUcited by 16
- 2023EGA-Depth: Efficient Guided Attention for Self-Supervised Multi-Camera Depth Estimationcited by 16
- 2026Hybrid Linear Attention Done Right: Efficient Distillation and Effective Architectures for Extremely Long Contextscited by 16
- 2021PermuteFormer: Efficient Relative Position Encoding for Long Sequencescited by 14
- 2026VGG-T3: Offline Feed-Forward 3D Reconstruction at Scalecited by 14
- 2025Scaling Linear Attention with Sparse State Expansioncited by 12
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
- 2025Multimodal Mamba: Decoder-only Multimodal State Space Model via Quadratic to Linear Distillationcited by 11
- 2021Efficient Inference for Multilingual Neural Machine Translationcited by 10
- 2022Softmax-free Linear Transformerscited by 9
- 2021Faster Nearest Neighbor Machine Translationcited by 8
- 2024Improving Transformers with Dynamically Composable Multi-Head Attentioncited by 8
- 2023Efficiency Pentathlon: A Standardized Arena for Efficiency Evaluationcited by 7
- 2022Training Integer-Only Deep Recurrent Neural Networkscited by 5
- 2025ViT-Linearizer: Distilling Quadratic Knowledge into Linear-Time Vision Modelscited by 5
50 most cited of 94 All 94 (JSON)
- 2026On-Policy Attention Linearization25 Sep 2026
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026Retrofitting Recurrent Depth into a Pretrained Language Model: Installation, Extrapolation, Transfer, and Retention at Two Parameter Budgets31 Jul 2026
- 2026Morphing into Hybrid Attention Models29 Jun 2026
- 2026HydraHead: From Head-Level Functional Heterogeneity to Specialized Attention Hybridization18 Jun 2026
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillation15 Jun 2026
- 2026Pretraining Recurrent Networks without Recurrence4 Jun 2026
- 2026Don't Read Everything: A Curvature-Conditioned Query for Linear Attention31 May 2026
- 2026LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoning29 May 2026
- 2026DASH: Fast Differentiable Architecture Search for Hybrid Attention in Minutes on a Single GPU20 May 2026
- 2026OSDN: Improving Delta Rule with Provable Online Preconditioning in Linear Attention13 May 2026
- 2026Cubit: Token Mixer with Kernel Ridge Regression7 May 2026
38 more
- 2026MDN: Parallelizing Stepwise Momentum for Delta Linear Attention7 May 2026
- 2026SpikingBrain2.0: Brain-Inspired Foundation Models for Efficient Long-Context and Cross-Platform Inference24 Apr 2026
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillation1 Apr 2026
- 2026Effective Distillation to Hybrid xLSTM Architectures16 Mar 2026
- 2026VGG-T3: Offline Feed-Forward 3D Reconstruction at Scale26 Feb 2026
- 2026STILL: Selecting Tokens for Intra-Layer Hybrid Attention to Linearize LLMs2 Feb 2026
- 2026A Provable Expressiveness Hierarchy in Hybrid Linear-Full Attention2 Feb 2026
- 2026A State-Transition Framework for Efficient LLM Reasoning1 Feb 2026
- 2026Distilling Token-Trained Models into Byte-Level Models1 Feb 2026
- 2026Hybrid Linear Attention Done Right: Efficient Distillation and Effective Architectures for Extremely Long Contexts29 Jan 2026
- 2025Trellis: Learning to Compress Key-Value Memory in Attention Models29 Dec 2025
- 2025End-to-End Test-Time Training for Long Context29 Dec 2025
- 2025Distilling to Hybrid Attention Models via KL-Guided Layer Selection23 Dec 2025
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrence10 Nov 2025
- 2025Deconstructing Attention: Investigating Design Principles for Effective Language Modeling13 Oct 2025
- 2025Untangling Component Imbalance in Hybrid Linear Attention Conversion Methods7 Oct 2025
- 2025LOTFormer: Doubly-Stochastic Linear Attention via Low-Rank Optimal Transport27 Sep 2025
- 2025SpikingBrain: Spiking Brain-inspired Large Models5 Sep 2025
- 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Search21 Aug 2025
- 2025Scaling Linear Attention with Sparse State Expansion22 Jul 2025
- 2025Degrees of Freedom for Linear Attention: Distilling Softmax Attention with Optimal Feature Efficiency4 Jul 2025
- 2025Diffusion Transformer-to-Mamba Distillation for High-Resolution Image Generation23 Jun 2025
- 2025Don't Pay Attention12 Jun 2025
- 2025On-the-Fly Adaptive Distillation of Transformer to Dual-State Linear Attention11 Jun 2025
- 2025Log-Linear Attention5 Jun 2025
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Time29 May 2025
- 2025RADLADS: Rapid Attention Distillation to Linear Attention Decoders at Scale5 May 2025
- 2025What Matters in Linearizing Language Models? A Comparative Study of Architecture, Scale, and Task Adaptation19 Apr 2025
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models14 Apr 2025
- 2025ViT-Linearizer: Distilling Quadratic Knowledge into Linear-Time Vision Models30 Mar 2025
- 2025Conformal Transformations for Symmetric Power Transformers5 Mar 2025
- 2025Liger: Linearizing Large Language Models to Gated Recurrent Structures3 Mar 2025
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasoners27 Feb 2025
- 2025Multimodal Mamba: Decoder-only Multimodal State Space Model via Quadratic to Linear Distillation18 Feb 2025
- 2025ReGLA: Refining Gated Linear Attention3 Feb 2025
- 2025Test-time regression: a unifying framework for designing sequence models with associative memory21 Jan 2025
- 2024MetaLA: Unified Optimal Linear Approximation to Softmax Attention Map16 Nov 2024
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation17 Oct 2024
50 newest of 94 All 94 (JSON)
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrencecited by 41
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasonerscited by 22
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Modelscited by 21
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptationcited by 11
- 2026A State-Transition Framework for Efficient LLM Reasoningcited by 1
- 2026LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoningcited by 0
- 2026On-Policy Attention Linearizationcited by 0
- 2026On-Policy Attention Linearization25 Sep 2026
- 2026LISA: Linear-Indexed Sparse Attention for Efficient Long-Context Reasoning29 May 2026
- 2026A State-Transition Framework for Efficient LLM Reasoning1 Feb 2026
- 2025Teaching Pretrained Language Models to Think Deeper with Retrofitted Recurrence10 Nov 2025
- 2025M1: Towards Scalable Test-Time Compute with Mamba Reasoning Models14 Apr 2025
- 2025Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasoners27 Feb 2025
- 2024LightTransfer: Your Long-Context LLM is Secretly a Hybrid Model with Effortless Adaptation17 Oct 2024
- 2023Gated Linear Attention Transformers with Hardware-Efficient Trainingcited by 490
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Modelscited by 66
- 2024Is Mamba Capable of In-Context Learning?cited by 45
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillationcited by 3
- 2024Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexitycited by 1
- 2026Attention to Mamba: A Recipe for Cross-Architecture Distillation1 Apr 2026
- 2024Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity9 Oct 2024
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models19 Aug 2024
- 2024Is Mamba Capable of In-Context Learning?5 Feb 2024
- 2023Gated Linear Attention Transformers with Hardware-Efficient Training11 Dec 2023
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inferencecited by 75
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillationcited by 1
- 2026DASH: Fast Differentiable Architecture Search for Hybrid Attention in Minutes on a Single GPUcited by 0
- 2026Taylor-Calibrate: Principled Initialization for Hybrid Linear Attention Distillation15 Jun 2026
- 2026DASH: Fast Differentiable Architecture Search for Hybrid Attention in Minutes on a Single GPU20 May 2026
- 2024Get More with LESS: Synthesizing Recurrence with KV Cache Compression for Efficient LLM Inference14 Feb 2024
- 2024Parallelizing Linear Transformers with the Delta Rule over Sequence Lengthcited by 373
- 2022Transformers Learn Shortcuts to Automatacited by 260
- 2021SOFT: Softmax-free Transformer with Linear Complexitycited by 128
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2023Batch Prompting: Efficient Inference with Large Language Model APIscited by 84
- 2024Gated Slot Attention for Efficient Linear-Time Sequence Modelingcited by 73
- 2025Test-time regression: a unifying framework for designing sequence models with associative memorycited by 63
- 2025ATLAS: Learning to Optimally Memorize the Context at Test Timecited by 57
- 2025End-to-End Test-Time Training for Long Contextcited by 53
- 2024Linearizing Large Language Modelscited by 51
- 2021Stable, Fast and Accurate: Kernelized Attention with Relative Positional Encodingcited by 50
- 2025Log-Linear Attentioncited by 39
12 most cited of 76 All 76 (JSON)
- 2026DiD It in 87 Minutes: A Label-Free Softmax-to-Linear Adaptation of Vision Transformers for Object Detection23 Aug 2026
- 2026Retrofitting Recurrent Depth into a Pretrained Language Model: Installation, Extrapolation, Transfer, and Retention at Two Parameter Budgets31 Jul 2026
- 2026Morphing into Hybrid Attention Models29 Jun 2026
- 2026HydraHead: From Head-Level Functional Heterogeneity to Specialized Attention Hybridization18 Jun 2026
- 2026Pretraining Recurrent Networks without Recurrence4 Jun 2026
- 2026Don't Read Everything: A Curvature-Conditioned Query for Linear Attention31 May 2026
- 2026OSDN: Improving Delta Rule with Provable Online Preconditioning in Linear Attention13 May 2026
- 2026Cubit: Token Mixer with Kernel Ridge Regression7 May 2026
- 2026MDN: Parallelizing Stepwise Momentum for Delta Linear Attention7 May 2026
- 2026SpikingBrain2.0: Brain-Inspired Foundation Models for Efficient Long-Context and Cross-Platform Inference24 Apr 2026
- 2026Effective Distillation to Hybrid xLSTM Architectures16 Mar 2026
- 2026VGG-T3: Offline Feed-Forward 3D Reconstruction at Scale26 Feb 2026
12 newest of 76 All 76 (JSON)