Source: Kaden Zheng and Pratyusha Sharma, Model Carving: Training Transformers That Optimize Their Own Topology, arXiv 2611.27962 (submitted 20 Nov 2026, under review at ICLR 2027; 38 pages). Shared by DAIR.AI.
What it is
Model Carving learns a Transformer's architecture and its weights in a single pretraining run. Every attention and MLP sublayer gets a learnable scalar gate on its write to the residual stream. A penalty pushes gates toward zero, and sublayers whose gates close are removed outright. What remains is a smaller, heterogeneous network. Layers no longer all have the same shape, and some lose their attention or their MLP.
How it works
Start overparameterized. The run begins with every sublayer present and with extra residual connections joining each pair of distinct layers. Each connection has a learned coefficient that can grow or shrink. The method works on standard Transformers and on looped (weight-tied across depth) Transformers. In looped models, each loop gets its own gates and can read earlier loops' outputs.
Objective = loss + compute. The training objective adds a term for the compute the remaining sublayers cost, in effect a count of live sublayers. That count has no gradient, so it is replaced with a smooth logarithmic penalty in the spirit of reweighted L1 (Candès et al.), without a floor inside the log. This penalty pushes in proportion to the relative change of a gate. The authors argue that is the right unit: it matches the first-order loss increase from deleting the sublayer.
Pressure tied to learning rate. The pressure is calibrated against a forecast of how much the model is still learning at a fixed learning rate. It is switched off during the LR cooldown.
Removal is real. Closed sublayers are not executed at inference time, so the savings show up in FLOPs and decode latency, not just in parameter counts.
Reported results
At equal training compute, carved models reach lower validation loss than dense models trained with up to 1.7x more compute (standard Transformers from 140M to 2.7B parameters, looped from 140M to 1.3B).
They beat size-matched pruned and distilled models, and the advantage grows with scale.
The gains carry over to few-shot evaluation and generation, and a chat-quality lead persists through instruction tuning.
Up to 34% fewer FLOPs per token and up to 1.6x faster decoding with no quality loss.
Why it matters
The usual way to get a small, fast model is to train a large dense one and then prune or distill it. If these results hold at larger scale, the cheaper path is to carve during pretraining. The resulting non-uniform architecture also challenges the assumption that every layer needs both attention and an MLP.
Tradeoffs and failure modes
Scale is unproven past 2.7B. The authors list larger models, longer training and different data as the immediate follow-up. Frontier-scale behavior is unknown.
Cooldown interaction. Because the pressure is turned off during cooldown, carved models gain 10% to 16% less from the cooldown than dense models do. The authors suggest an LR-schedule-aware pressure as a fix.
Heterogeneous layers are harder to serve. Kernels, tensor-parallel sharding, KV-cache layout and pipeline stages usually assume identical layers. Irregular depth can turn the FLOP savings into smaller wall-clock gains on some stacks. The reported 1.6x decode speedup is the paper's own measurement.
Topology depends on the data. The paper's analysis says carving removes computation a task doesn't use. A model carved for one data mix may be under-provisioned for capabilities that mix underrepresented, and that can't be added back by fine-tuning.
Hyperparameter surface. The penalty strength and its calibration add knobs to pretraining, and a mis-set pressure deletes too much or too little early in a long run.
Single paper, under review. No independent replication yet.
Review checklist
If you ship small models, does your baseline include carving-style structured sparsity during pretraining, not just post-hoc pruning or distillation?
Can your serving stack run models whose layers differ in shape (missing attention or MLP) without losing the FLOP savings?
Does the pretraining data mix cover every capability you need, since carving removes what the data doesn't exercise?
Have you compared against a dense model at equal training compute, not equal parameter count?
Is the learning-rate schedule's cooldown accounted for when comparing carved and dense runs?
Related entries
R239: Dynamic Expert Pruning (per-agent MoE expert masks: pruning at inference time rather than during training)
R197: Inkling 2 Mini (a looped MoE built to run locally)
R148: Nemotron-Labs-Sigma (another route to cheaper decoding)
R113: TokenEconomizer (cost reduction at the agent level rather than the model level)