Attention to Mamba: A Recipe for Cross-Architecture Distillation
On the map: State-space sequence models (S4, Mamba) → Core SSM architectures for language
Abstract (arXiv)
State Space Models (SSMs) such as Mamba have become a popular alternative to Transformer models, due to their reduced memory consumption and higher throughput at generation compared to their Attention-based counterparts. On the other hand, the community has built up a considerable body of knowledge on how to train Transformers, and many pretrained Transformer models are readily available. To facilitate the adoption of SSMs while leveraging existing pretrained Transformers, we aim to identify an effective recipe to distill an Attention-based model into a Mamba-like architecture. In prior work on cross-architecture distillation, however, it has been shown that a na"ive distillation procedure from Transformers to Mamba fails to preserve the original teacher performance, a limitation often overcome with hybrid solutions combining Attention and SSM blocks. The key argument from our work is that, by equipping Mamba with a principled initialization, we can recover an overall better recipe for cross-architectural distillation. To this end, we propose a principled two-stage approach: first, we distill knowledge from a traditional Transformer into a linearized version of Attention, using an adaptation of the kernel trick. Then, we distill the linearized version into an adapted Mamba model that does not use any Attention block. Overall, the distilled Mamba model is able to preserve the original Pythia-1B Transformer performance in downstream tasks, maintaining a perplexity of 14.11 close to the teacher's 13.86. To show the efficacy of our recipe, we conduct thorough ablations at 1B scale with 10B tokens varying sequence mixer architecture, scaling analysis on model sizes and total distillation tokens, and a sensitivity analysis on tokens allocation between stages.
Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Placed in Core SSM architectures for language, one of 10 directions in State-space sequence models (S4, Mamba). Builds on 41 of its 56 references that are in the map. First posted on arXiv 1 Apr 2026.
Builds on
41 of 56 references.
Closest ancestors · 7
Same direction, newest first
- 2025Llamba: Scaling Distilled Recurrent Models for Efficient Language Processing20 Feb
- 2024Joint Fine-tuning and Conversion of Pretrained Speech and Language Models towards Linear Complexity9 Oct
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models19 Aug
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality31 May
- 2024Theoretical Foundations of Deep Selective State-Space Models29 Feb
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spaces1 Dec
- 2021Efficiently Modeling Long Sequences with Structured State Spaces31 Oct
Other references · 34
- 2017Attention Is All You Needcited by 59,932
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2020Longformer: The Long-Document Transformercited by 3,362
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
22 more
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,734
- 2020Big Bird: Transformers for Longer Sequencescited by 1,673
- 2020Knowledge Distillation: A Surveycited by 1,578
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 851
- 2020HiPPO: Recurrent Memory with Optimal Polynomial Projectionscited by 600
- 2021Nystr"omformer: A Nystr"om-Based Algorithm for Approximating Self-Attentioncited by 468
- 2022On the Parameterization and Initialization of Diagonal State Space Modelscited by 418
- 2023Hyena Hierarchy: Towards Larger Convolutional Language Modelscited by 388
- 2021Random Feature Attentioncited by 350
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 266
- 2022Transformer Quality in Linear Timecited by 189
- 2023Quantizable Transformers: Removing Outliers by Helping Attention Heads Do Nothingcited by 147
- 2024The Hedgehog & the Porcupine: Expressive Linear Attentions with Softmax Mimicrycited by 119
- 2021Finetuning Pretrained Transformers into RNNscited by 94
- 2024Linearizing Large Language Modelscited by 51
- 2022Fine-Tuning Pre-trained Transformers into Decaying Fast Weightscited by 26
- 2023Analyzing the Evolution and Maintenance of ML Models on Hugging Facecited by 22
- 2024Scavenging Hyena: Distilling Transformers into Long Convolution Modelscited by 5
- 2026Knowledge Distillation for Large Language Modelscited by 5
Built on by
Citing papers per year: 2026: 3.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2025Data Efficient Any Transformer-to-Mamba Distillation via Attention Bridge
- 2025TransMamba: Fast Universal Architecture Adaption from Transformers to Mamba
- 2024MambaPEFT: Exploring Parameter-Efficient Fine-Tuning for Mamba
- 2025TransMamba: A Sequence-Level Hybrid Transformer-Mamba Language Model
- 2025RAD: Redundancy-Aware Distillation for Hybrid Models via Self-Speculative Decoding
- 2025On-the-Fly Adaptive Distillation of Transformer to Dual-State Linear Attention
- 2026Learning Rate Transfer for Hybrid Transformer-SSM Architectures
- 2024A Survey of Mamba