MatMamba: A Matryoshka State Space Model
Not on the map. Why?
Abstract (arXiv)
State Space Models (SSMs) like Mamba2 are a promising alternative to Transformers, with faster theoretical training and inference times -- especially for long context lengths. Recent work on Matryoshka Representation Learning -- and its application to Transformer backbones in works like MatFormer -- showed how to introduce nested granularities of smaller submodels in one universal elastic model. In this work, we present MatMamba: a state space model which combines Matryoshka-style learning with Mamba2, by modifying the block to contain nested dimensions to enable joint training and adaptive inference. MatMamba allows for efficient and adaptive deployment across various model sizes. We train a single large MatMamba model and are able to get a number of smaller nested models for free -- while maintaining or improving upon the performance of a baseline smaller model trained from scratch. We train language and image models at a variety of parameter sizes from 35M to 1.4B. Our results on ImageNet and FineWeb show that MatMamba models scale comparably to Transformers, while having more efficient inference characteristics. This makes MatMamba a practically viable option for deploying large-scale models in an elastic way based on the available inference compute. Code and models are open sourced at urlhttps://github.com/ScaledFoundations/MatMamba
Key facts. Cited by 7 papers in the map (data through 14 Oct 2026). Builds on 46 of its 54 references that are in the map. First posted on arXiv 9 Oct 2024.
Builds on
46 of 54 references.
References · 46
- 2017Attention Is All You Needcited by 60,361
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2024The Llama 3 Herd of Modelscited by 14,715
- 2017mixup: Beyond Empirical Risk Minimizationcited by 5,183
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2019CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Featurescited by 2,884
- 2019RandAugment: Practical automated data augmentation with a reduced search spacecited by 2,269
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2022Fast Inference from Transformers via Speculative Decodingcited by 1,653
- 2019Root Mean Square Layer Normalizationcited by 1,480
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,336
- 2017Random Erasing Data Augmentationcited by 1,239
34 more
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
- 2024Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space Modelcited by 1,056
- 2017Sigmoid-Weighted Linear Units for Neural Network Function Approximation in Reinforcement Learningcited by 950
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 787
- 2023Retentive Network: A Successor to Transformer for Large Language Modelscited by 613
- 2021How to train your ViT? Data, Augmentation, and Regularization in Vision Transformerscited by 569
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 457
- 2022DeiT III: Revenge of the ViTcited by 419
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 401
- 2024Learning to (Learn at Test Time): RNNs with Expressive Hidden Statescited by 355
- 2024VideoMamba: State Space Model for Efficient Video Understandingcited by 328
- 2024xLSTM: Extended Long Short-Term Memorycited by 327
- 2018Slimmable Neural Networkscited by 305
- 2022Matryoshka Representation Learningcited by 282
- 2024Griffin: Mixing Gated Linear Recurrences with Local Attention for Efficient Language Modelscited by 242
- 2024MambaVision: A Hybrid Mamba-Transformer Vision Backbonecited by 224
- 2019Universally Slimmable Networks and Improved Training Techniquescited by 221
- 2024An Empirical Study of Mamba-based Language Modelscited by 186
- 2022FlexiViT: One Model for All Patch Sizescited by 152
- 2024HGRN2: Gated Linear RNNs with State Expansioncited by 127
- 2022Better plain ViT baselines for ImageNet-1kcited by 98
- 2023MatFormer: Nested Transformer for Elastic Inferencecited by 85
- 2014Learning Ordered Representations with Nested Dropoutcited by 84
- 2024Mamba-ND: Selective State Space Modeling for Multi-Dimensional Datacited by 84
- 2024Matryoshka Multimodal Modelscited by 84
- 2023Matryoshka Diffusion Modelscited by 72
- 2021Deep Learning for Instance Retrieval: A Surveycited by 70
- 2024RecurrentGemma: Moving Past Transformers for Efficient Open Language Modelscited by 64
- 2023Compressing LLMs: The Truth is Rarely Pure and Never Simplecited by 62
- 2024Vision Mamba: A Comprehensive Survey and Taxonomycited by 54
- 2023FFCV: Accelerating Training by Removing Data Bottleneckscited by 49
- 2024Flextron: Many-in-One Flexible Large Language Modelcited by 45
- 2024Mixture of Nested Experts: Adaptive Processing of Visual Tokenscited by 25
Built on by
Citing papers per year: 2025: 4; 2026: 3.
7 papers.
- 2025Nemotron Elastic: Towards Efficient Many-in-One Reasoning LLMscited by 6
- 2025MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognitioncited by 4
- 2025Elastic ViTs from Pretrained Models without Retrainingcited by 4
- 2026Star Elastic: Many-in-One Reasoning LLMs with Efficient Budget Controlcited by 3
- 2025Chain-of-Model Learning for Language Modelcited by 2
- 2026Elastic Spectral State Space Models for Train-Once Budgeted Inferencecited by 2
- 2026Elastic Selective Spectral Hybrids for Train-Once, Export-Many Budgeted Inferencecited by 0
- 2026Elastic Selective Spectral Hybrids for Train-Once, Export-Many Budgeted Inference26 Sep 2026
- 2026Star Elastic: Many-in-One Reasoning LLMs with Efficient Budget Control8 May 2026
- 2026Elastic Spectral State Space Models for Train-Once Budgeted Inference30 Jan 2026
- 2025Nemotron Elastic: Towards Efficient Many-in-One Reasoning LLMs20 Nov 2025
- 2025Elastic ViTs from Pretrained Models without Retraining20 Oct 2025
- 2025MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognition5 Oct 2025
- 2025Chain-of-Model Learning for Language Model17 May 2025
Similar, not cited
Close in wording, no citation either way
- 2024MoE-Mamba: Efficient Selective State Space Models with Mixture of Experts
- 2024Transformers to SSMs: Distilling Quadratic Knowledge to Subquadratic Models
- 2024BlackMamba: Mixture of Experts for State-Space Models
- 2024A Survey of Mamba
- 2026Mamba-3: Improved Sequence Modeling using State Space Principles
- 2025Mamba-Shedder: Post-Transformer Compression for Efficient Selective Structured State Space Models
- 2024Sparse Mamba: Introducing Controllability, Observability, And Stability To Structural State Space Models
- 2026Interpreting and Steering State-Space Models via Activation Subspace Bottlenecks