Model Carving: Training Transformers That Optimize Their Own Topology
Not on the map. Why?
Abstract (arXiv)
Machine learning has largely kept separate the choice of architecture and the process of training. A classic Transformer, for instance, trains a fixed set of attention and MLP sublayers at every layer, in the same order, and optimizes the weights within. This uniformity is a convention rather than a principled design choice, and it is likely suboptimal: the best architecture for a given task may be smaller, more efficient, and far from uniform. We believe that, ideally, training itself should shape the model's topology. To this end, we introduce Model Carving, which learns both a Transformer's weights and its architecture in a single run. By applying learnable, scalar gates to each sublayer, we allow the training loss to remove the model's own components during training -- freeing a smaller heterogeneous network inside. We evaluate Model Carving by pre-training standard Transformers from 140M to 2.7B parameters and looped Transformers from 140M to 1.3B. At equal training compute, carved models reach a lower validation loss than dense models trained with up to 1.7 times more compute. Furthermore, carved models also outperform size-matched models produced by pruning or distillation, suggesting that the best way to obtain small models for edge devices is to carve them during training, not to compress a large one afterwards. This advantage both grows with scale and carries over to downstream tasks such as few-shot evaluation and generation. Because the removed sublayers no longer run, carved models also cost up to 34% fewer FLOPs per token and decode up to 1.6 times faster without cost in quality. Our results show that architecture, like weights, should be learned and not fixed in advance, and that inside every large transformer is a smaller, faster, stronger one waiting to be carved out.
Key facts. No citing papers in the map yet (data through 24 Nov 2026). Builds on 80 of its 94 references that are in the map. Submitted 20 Nov 2026, announced 23 Nov 2026.
Builds on
80 of 94 references.
References · 80
- 2017Attention Is All You Needcited by 62,125
- 2015Deep Residual Learning for Image Recognitioncited by 53,116
- 2020Language Models are Few-Shot Learnerscited by 33,113
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,661
- 2021Training Verifiers to Solve Math Word Problemscited by 11,055
- 2015Distilling the Knowledge in a Neural Networkcited by 10,967
- 2021Evaluating Large Language Models Trained on Codecited by 8,938
- 2020Scaling Laws for Neural Language Modelscited by 7,118
- 2016Densely Connected Convolutional Networkscited by 6,825
- 2021Measuring Mathematical Problem Solving With the MATH Datasetcited by 5,852
- 2024Qwen2.5 Technical Reportcited by 5,525
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 5,132
38 more
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,276
- 2023Let's Verify Step by Stepcited by 4,259
- 2017Outrageously Large Neural Networks: The Sparsely-Gated Mixture-of-Experts Layercited by 3,767
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,645
- 2022Training Compute-Optimal Large Language Modelscited by 3,290
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 3,109
- 2022GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformerscited by 2,115
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 2,080
- 2025Gemma 3 Technical Reportcited by 2,058
- 2023Pythia: A Suite for Analyzing Large Language Models Across Training and Scalingcited by 1,891
- 2018DARTS: Differentiable Architecture Searchcited by 1,842
- 2016Neural Architecture Search with Reinforcement Learningcited by 1,535
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,356
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 1,077
- 2018Regularized Evolution for Image Classifier Architecture Searchcited by 924
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 919
- 2018SNIP: Single-shot Network Pruning based on Connection Sensitivitycited by 832
- 2018Universal Transformerscited by 769
- 2018ProxylessNAS: Direct Neural Architecture Search on Target Task and Hardwarecited by 684
- 2017Learning Efficient Convolutional Networks through Network Slimmingcited by 683
- 2017To prune, or not to prune: exploring the efficacy of pruning for model compressioncited by 621
- 2018Rethinking the Value of Network Pruningcited by 615
- 2017Learning Sparse Neural Networks through L0 Regularizationcited by 614
- 2016Adaptive Computation Time for Recurrent Neural Networkscited by 578
- 2020Scaling Laws for Autoregressive Generative Modelingcited by 558
- 2025Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approachcited by 526
- 2018FBNet: Hardware-Aware Efficient ConvNet Design via Differentiable Neural Architecture Searchcited by 493
- 2020Pruning neural networks without any data by iteratively conserving synaptic flowcited by 490
- 2020Picking Winning Tickets Before Training by Preserving Gradient Flowcited by 480
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 445
- 2024Jamba: A Hybrid Transformer-Mamba Language Modelcited by 438
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 433
- 2025SmolLM2: When Smol Goes Big -- Data-Centric Training of a Small Language Modelcited by 415
- 2022Confident Adaptive Language Modelingcited by 348
- 2017Don't Decay the Learning Rate, Increase the Batch Sizecited by 337
- 2022Tensor Programs V: Tuning Large Neural Networks via Zero-Shot Hyperparameter Transfercited by 334
- 2018An Empirical Model of Large-Batch Trainingcited by 319
- 2022Transformers Learn Shortcuts to Automatacited by 297
50 most cited of 80 All 80 (JSON)
Built on by
Not cited yet.