mlsanityData to 7 Oct 2026

MatFormer: Nested Transformer for Elastic Inference

arXiv 2310.07707 ↗First posted 11 Oct 2023cs.LG cs.CL cs.CVcited by 79

Not on the map. Why?

Abstract (arXiv)

Foundation models are applied in a broad spectrum of settings with different inference constraints, from massive multi-accelerator clusters to resource-constrained standalone mobile devices. However, the substantial costs associated with training these models often limit the number of unique model sizes that can be offered. Consequently, practitioners are compelled to select a model that may not be optimally aligned with their specific latency and cost requirements. We present MatFormer, a novel Transformer architecture designed to provide elastic inference across diverse deployment constraints. MatFormer achieves this by incorporating a nested Feed Forward Network (FFN) block structure within a standard Transformer model. During training, we optimize the parameters of multiple nested FFN blocks with varying sizes, enabling the extraction of hundreds of accurate smaller models without incurring additional computational costs. We empirically validate the efficacy of MatFormer across different model classes (decoders and encoders) and modalities (language and vision), demonstrating its potential for real-world deployment. We show that a 850M decoder-only MatFormer language model (MatLM) allows us to extract multiple smaller models spanning from 582M to 850M parameters, each exhibiting better validation loss and one-shot downstream evaluations than independently trained counterparts. Furthermore, we observe that smaller encoders extracted from a universal MatFormer-based ViT (MatViT) encoder preserve the metric-space structure for adaptive large-scale retrieval. Finally, we showcase that speculative decoding with the accurate and consistent submodels extracted from MatFormer can lead to significant reduction in inference latency. Project website: https://devvrit.github.io/matformer/

Key facts. Cited by 79 papers in the map (data through 7 Oct 2026). Builds on 61 of its 81 references that are in the map. First posted on arXiv 11 Oct 2023.

Builds on

61 of 81 references.

References · 61

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 29,915
  4. 2023GPT-4 Technical Reportcited by 18,132
  5. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  6. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  7. 2014ImageNet Large Scale Visual Recognition Challengecited by 8,441
  8. 2020Scaling Laws for Neural Language Modelscited by 6,411
  9. 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
  10. 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
  11. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  12. 2022Robust Speech Recognition via Large-Scale Weak Supervisioncited by 3,972
38 more
  1. 2021On the Opportunities and Risks of Foundation Modelscited by 3,961
  2. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  3. 2016Gaussian Error Linear Units (GELUs)cited by 3,431
  4. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  5. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  6. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
  7. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
  8. 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
  9. 2019SuperGLUE: A Stickier Benchmark for General-Purpose Language Understanding Systemscited by 1,718
  10. 2022Fast Inference from Transformers via Speculative Decodingcited by 1,615
  11. 2018Know What You Don't Know: Unanswerable Questions for SQuADcited by 1,538
  12. 2016Neural Architecture Search with Reinforcement Learningcited by 1,489
  13. 2022LaMDA: Language Models for Dialog Applicationscited by 1,218
  14. 2023PaLM 2 Technical Reportcited by 1,154
  15. 2023Accelerating Large Language Model Decoding with Speculative Samplingcited by 975
  16. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
  17. 2018Regularized Evolution for Image Classifier Architecture Searchcited by 902
  18. 2018Adafactor: Adaptive Learning Rates with Sublinear Memory Costcited by 896
  19. 2021GLaM: Efficient Scaling of Language Models with Mixture-of-Expertscited by 890
  20. 2017RACE: Large-scale ReAding Comprehension Dataset From Examinationscited by 851
  21. 2019Adversarial NLI: A New Benchmark for Natural Language Understandingcited by 798
  22. 2019Once-for-All: Train One Network and Specialize it for Efficient Deploymentcited by 778
  23. 2023Scaling Vision Transformers to 22 Billion Parameterscited by 690
  24. 2021How to train your ViT? Data, Augmentation, and Regularization in Vision Transformerscited by 562
  25. 2016A Corpus and Evaluation Framework for Deeper Understanding of Commonsense Storiescited by 413
  26. 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
  27. 2018Slimmable Neural Networkscited by 301
  28. 2022Confident Adaptive Language Modelingcited by 297
  29. 2022Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfercited by 272
  30. 2022Matryoshka Representation Learningcited by 268
  31. 2022The case for 4-bit precision: k-bit Inference Scaling Lawscited by 247
  32. 2020DynaBERT: Dynamic BERT with Adaptive Width and Depthcited by 246
  33. 2019Universally Slimmable Networks and Improved Training Techniquescited by 219
  34. 2022Branch-Train-Merge: Embarrassingly Parallel Training of Expert Language Modelscited by 187
  35. 2021Block Pruning For Faster Transformerscited by 176
  36. 2020Characterising Bias in Compressed Modelscited by 162
  37. 2021Primer: Searching for Efficient Transformers for Language Modelingcited by 162
  38. 2022FlexiViT: One Model for All Patch Sizescited by 151

50 most cited of 61 All 61 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2023: 1; 2024: 15; 2025: 38; 2026: 25.

79 papers.

Sort:

By area:

  1. 2025Small Language Models are the Future of Agentic AIcited by 254
  2. 2025Universal Model Routing for Efficient LLM Inferencecited by 80
  3. 2025RouterEval: A Comprehensive Benchmark for Routing LLMs to Explore Model-level Scaling Up in LLMscited by 58
  4. 2024Matryoshka Query Transformer for Large Vision-Language Modelscited by 49
  5. 2024Flextron: Many-in-One Flexible Large Language Modelcited by 42
  6. 2025How Do Large Language Monkeys Get Their Power (Laws)?cited by 40
  7. 2025Jet-Nemotron: Efficient Language Model with Post Neural Architecture Searchcited by 39
  8. 2024Tracing Representation Progression: Analyzing and Enhancing Layer-Wise Similaritycited by 36
  9. 2024Mixture of Nested Experts: Adaptive Processing of Visual Tokenscited by 25
  10. 2025When One LLM Drools, Multi-LLM Collaboration Rulescited by 25
  11. 2025Scaling Laws of Motion Forecasting and Planning -- Technical Reportcited by 19
  12. 2024Agreement-Based Cascading for Efficient Inferencecited by 16
38 more
  1. 2025Cost-Aware Contrastive Routing for LLMscited by 16
  2. 2025Matryoshka Quantizationcited by 11
  3. 2025Adaptive Audio-Visual Speech Recognition via Matryoshka-Based Multimodal LLMscited by 11
  4. 2026ELT: Elastic Looped Transformers for Visual Generationcited by 11
  5. 2024Efficient Stagewise Pretraining via Progressive Subnetworkscited by 10
  6. 2025Elastic MoE: Unlocking the Inference-Time Scalability of Mixture-of-Expertscited by 10
  7. 2024HydraViT: Stacking Heads for a Scalable ViTcited by 9
  8. 2026ERNIE 5.0 Technical Reportcited by 9
  9. 2023SHARCS: Efficient Transformers through Routing with Dynamic Width Sub-networkscited by 6
  10. 2024MatMamba: A Matryoshka State Space Modelcited by 6
  11. 20242D Matryoshka Training for Information Retrievalcited by 6
  12. 2025ThinkingViT: Matryoshka Thinking Vision Transformer for Elastic Inferencecited by 6
  13. 2025Training Matryoshka Mixture-of-Experts for Elastic Inference-Time Expert Utilizationcited by 6
  14. 2025From Dense to Dynamic: Token-Difficulty Driven MoEfication of Pre-Trained LLMscited by 5
  15. 2025EA-ViT: Efficient Adaptation for Elastic Vision Transformercited by 5
  16. 2025Deep Hierarchical Learning with Nested Subspace Networks for Large Language Modelscited by 5
  17. 2025Do Depth-Grown Models Overcome the Curse of Depth? An In-Depth Analysiscited by 5
  18. 2024Superposed Decoding: Multiple Generations from a Single Autoregressive Inference Passcited by 4
  19. 2024Neural Metamorphosiscited by 4
  20. 2024Slicing Vision Transformer for Flexible Inferencecited by 4
  21. 2025Masked Generative Nested Transformers with Decode Time Scalingcited by 4
  22. 2025Balcony: A Lightweight Approach to Dynamic Inference of Generative Language Modelscited by 4
  23. 2025MoME: Mixture of Matryoshka Experts for Audio-Visual Speech Recognitioncited by 4
  24. 2025Nemotron Elastic: Towards Efficient Many-in-One Reasoning LLMscited by 4
  25. 2025Choose Your Model Size: Any Compression of Large Language Models Without Re-Computationcited by 3
  26. 2025FlexGS: Train Once, Deploy Everywhere with Many-in-One Flexible 3D Gaussian Splattingcited by 3
  27. 2025On-the-Fly Adaptive Distillation of Transformer to Dual-State Linear Attentioncited by 3
  28. 2025Overhearing LLM Agents: A Survey, Taxonomy, and Roadmapcited by 3
  29. 2026SnapGen++: Unleashing Diffusion Transformers for Efficient High-Fidelity Image Generation on Edge Devicescited by 3
  30. 2026MoSE: Mixture of Slimmable Experts for Efficient and Adaptive Language Modelscited by 3
  31. 2024big.LITTLE Vision Transformer for Efficient Visual Recognitioncited by 2
  32. 2025Chain-of-Model Learning for Language Modelcited by 2
  33. 2025Matryoshka Model Learning for Improved Elastic Student Modelscited by 2
  34. 2025Evaluating the Robustness of Chinchilla Compute-Optimal Scalingcited by 2
  35. 2025Controllably Efficient Language Modelscited by 2
  36. 2026FlexRank: Nested Low-Rank Knowledge Decomposition for Adaptive Model Deploymentcited by 2
  37. 2026Star Elastic: Many-in-One Reasoning LLMs with Efficient Budget Controlcited by 2
  38. 2025GLASS: Global-Local Aggregation for Inference-time Sparsification of LLMscited by 1

50 most cited of 79 All 79 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2026LEAP: Layer-wise Exit-Aware Pretraining for Efficient Transformer Inference
  2. 2026Stepped MoE: Segment-Level Routing with Configurable Inference Complexity
  3. 2025SmallThinker: A Family of Efficient Large Language Models Natively Trained for Local Deployment
  4. 2025LLM Inference Acceleration via Efficient Operation Fusion
  5. 2025Nemotron-H: A Family of Accurate and Efficient Hybrid Mamba-Transformer Models
  6. 2022COST-EFF: Collaborative Optimization of Spatial and Temporal Efficiency with Slenderized Multi-exit Language Models
  7. 2022DeepSpeed Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale
  8. 2025Large Language Model Partitioning for Low-Latency Inference at the Edge