WorksComputer Science
Model Carving: Training Transformers That Optimize Their Own Topology
Abstract
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.
Introduction
A long-standing north star for many in machine learning has been to build models as adaptive as the brain. One field that has emerged to pursue this has been adaptive computation, which enables models to make their computations input-dependent at inference-time through techniques such as routing [2] (Raposo et al. 2024), Mixture-of-Experts (Shazeer et al., 2017), and early-exiting [22] (Schuster et al. 2022). However, among the brain’s most striking forms of plasticity is structural. During development, our brains significantly overproduce synapses and then gradually prune those whose metabolic cost outweighs their functional utility [35, 11, 8]. In this sense, the architecture that performs the computation is shaped in part by its own use during training-time.
Neural networks have largely kept architecture and training separate. Training optimizes a model’s weights within an architecture fixed before the first gradient step is taken: a classic Transformer (Vaswani et al., 2017) executes a homogeneous set of attention and MLP matrices at every layer, in the same fixed order. While this uniformity is a convention, it fails to leverage the rich expressivity of heterogeneous neural network structures. For instance, reordering sublayers alone can improve perplexity (Press et al., 2020), whole layers of trained LLMs can be removed with modest degradation [23] (Men et al. 2024), and recent state-of-the-art models already break uniformity by hand, such as Gemma 3 interleaving local and global attention [20] or Jamba interleaving attention and state-space layers (Lieber et al., 2024). Where structure is learned, it is usually learned outside of training through neural architecture search (NAS). Early methods trained thousands of candidate networks under a reinforcement-learning controller Zoph & Le (2017) or an evolutionary loop Real et al. (2019); So et al. (2019). Weight-sharing methods amortized this cost by training a single supernet that contains every candidate operation, while optimizing a separate set of architecture parameters on held-out data Liu et al. (2019a). Fundamentally, the architecture is still chosen by a second optimization problem– over a controller, a population, or architecture parameters– run alongside, rather than within, the optimization of the model’s weights.
In this paper, we present Model Carving, which collapses these into a single optimization problem. Rather than selecting an architecture and then training it, we take an overparameterized network and leverage gates to allow the training loss to remove its own components– freeing a smaller, heterogeneous network from inside (Figure 1). Each sublayer writes to the residual stream through a learned, scalar gate, and every sublayer that stays in the graph carries a pressure. We construct this pressure online as the loss that that sublayer’s compute would buy if spent as extra training tokens. When a sublayer contributes less to the loss than its pressure, its gate shrinks to zero and is subsequently removed from the computation graph. Therefore, by construction, a sublayer is kept only if its contribution to the loss is worth its compute. Gates and weights are optimized jointly, on the same objective, the same data, and in the same run. In this sense, we enable the architecture that performs the computation to be shaped in part by its own use.
Figure 1. Model Carving trains the weights and the topology of a Transformer in one run. (Left) Training starts from an overparameterized Transformer: every sublayer writes through a gate (dot), and learned connections (arcs) join each pair of layers. A looped Transformer repeats the stack for loops, with its own gates in each loop. (Middle) During training, a gate falls when its sublayer’s contribution to the loss (green) is below its pressure (orange), and a gate at zero closes its sublayer. (Right) The trainer removes the closed sublayers from the computation graph, and the freed FLOPs buy more training tokens, resulting in a smaller Transformer with a heterogeneous set of layers.
We evaluate Model Carving on standard Transformers from 140M to 2.7B parameters and looped Transformers from 140M to 1.3B, comparing the resulting models at equal training compute with “full-depth” models from which Model Carving starts, and with “shallower-depth” models constructed at the carved models’ inference cost. At equal training compute, Model Carving reaches a loss that full-depth models would need up to 1.7 times the compute to reach, matches or improves their downstream performance, and outscores public models trained with several times its compute, while running up to 34% fewer inference FLOPs per token. Carved models also decode up to 1.61 times faster at each model’s largest batch. We further find that Model Carving’s advantage over standard models grows with compute, namely a compute-optimal carved model reaches a lower loss than full-depth models in both families, and the gap widens with scale, which suggests that the convention of homogeneously repeated layers is not the most efficient design.
Model Carving also pushes the frontier for building ML models for edge computing. Edge devices, where memory and inference compute are scarce, need models that are small and cheap to run, and the dominant paradigm of building these is to start from a larger model that is pruned and retrained Han et al. [25] or used as a teacher for model distillation Hinton et al. [32]. Model Carving outperforms both pruning and distillation from larger models on the quality-efficiency frontier, and its lead is robust to weight quantization.
Model Carving
The central insight of Model Carving is that we can simultaneously train the weights of a model and allow it to learn its own architecture by leveraging gates. Given a specified training FLOPs budget, we incentivize the model to remove the components whose contribution to the loss is less than their compute cost by shrinking their gates to zero. Model Carving has four parts, all within one training run: (1) initialize an overparameterized, gated Transformer that defines what can be removed (§ 2.1); (2) define a training objective that places a pressure on each sublayer for its compute (§ 2.2); (3) estimate that pressure online from the run’s own learning curve (§ 2.3); and (4) apply the pressure to the gates, which drives the gates of sublayers that contribute less than their pressure to zero, after which the trainer removes those sublayers from the computation graph (§ 2.4).
Overparameterizing and gating a Transformer
An intuition for Model Carving may be obtained from biology, where synaptic pruning gradually eliminates weak synapses as the brain matures. Likewise, we start Model Carving from an overparameterized Transformer that defines what can be removed, in which every sublayer is present and additional residual connections join each pair of distinct layers. Model Carving then removes the sublayers that do not earn their compute during training, while each connection grows or shrinks through its learned coefficient – thereby
“carving” an architecture from within. We demonstrate Model Carving on both standard and looped Transformers (Dehghani et al., [14]; Fu et al., [18]), where a looped Transformer is weight-tied across depth, and applies the same stack of layers in each of loops. In a looped Transformer, each loop has its own set of gates and learned connections which can also read the outputs from previous loop layers.
Fundamentally, a Transformer layer applies an attention sublayer and then an MLP sublayer, each added to the residual stream . Model Carving scales the output of every sublayer application (one sublayer in one loop) to the size of the stream and multiplies it by a learned gate :
where is the sublayer’s output. We initialize each gate at 0.1 (Appendix § 11.§ 1). Starting the gates at 0.2 or above removes few or no sublayers and keeps nearly the full inference cost (swept and tested in Appendix § 11.§ 1). This normalization allows the gate alone to set the size of the write relative to the stream, and a gate at zero removes the sublayer’s output from the residual stream (§ 2.4).
The learned connections (Huang et al., [34]; Pagliardini et al., 2024) allow each layer to reuse and add the outputs of earlier layers to the current residual stream. Each is scaled through a learned coefficient that gates the connection itself. Specifically, after layer with output and earlier layer outputs ,
The coefficients train with the weights and carry no pressure of their own, so each connection grows or shrinks as the loss requires. The bound limits the total magnitude of the coefficients from inflating the residual stream through the connections themselves (Appendix § 11 gives their initialization and how we enforce the bound).
The training objective and the value of compute
Let be the training FLOP budget. A sublayer removed at update makes every later update cheaper, which lowers the FLOPs per token and grants the run more tokens for the same .
Therefore, the critical question is: how do we allow Model Carving to balance the quality cost of removing a sublayer with its saved compute? Two quantities decide this, which both change as the model learns: what a sublayer contributes to the loss now (which the gradient measures at every update) and what its compute would buy as extra tokens within the training FLOP budget.
To answer this, we combine the two in one training objective and design an adaptive pressure function which eliminates the need for a penalty sweep. At update , the weights , the connection coefficients and the gates train on the loss
where is the next-token loss on the batch , and every sublayer that stays in the graph carries a pressure : an estimate of the loss those additional tokens would buy if that sublayer was removed. This pressure is the penalty on the gates, and serves as the opposing force of the quality loss. Removing raises the first term by its quality cost and lowers the second by , so the objective prefers removal exactly when the quality cost is below the pressure. This moves the compute budget into the loss, replacing the need for a penalty sweep with online estimation instead, which Model Carving does by extrapolating the run’s own learning curve ([15]).
Formally, let be the training loss after tokens, and let
be the rate of learning. The loss improves with each multiplication of the token count rather than with each added token, so we measure progress in -folds of tokens: one -fold multiplies the token count by , that is, it raises by one. The rate of learning is then the reduction in loss per -fold of tokens (so that doubling the tokens– -folds – lowers the loss by about ). Suppose the run is at tokens and will reach tokens when the budget is spent with the current model graph. Then, a fraction of its tokens still remains. If uses a fraction of the training FLOPs per token, the removal of makes every later token cost as much, and the run ends at tokens instead of . The gained tokens come at the end of the run, where the rate of learning is per -fold of tokens, so the pressure on is times the -folds gained:
For small , this reduces to : the value of one FLOP at the end of the run, namely with training FLOPs per token, times the compute of that would use for the rest of the run. This value of one FLOP is the Lagrange multiplier of the budget in Equation (3).
By construction, Model Carving’s pressure formulation naturally follows a nice decay schedule (Appendix § 12). Early in training, is close to one, and compute saved now buys tokens over the whole remaining run. Late in training, falls toward zero (and the pressure with it), because compute saved near the end buys almost no tokens. Therefore, through , a model that is still learning fast faces a high pressure on its compute, and a model near convergence faces a low one, and it learns to close gates early and less so as training proceeds. During the final learning-rate decay, we set the pressure to zero.
Reading the rate of learning
The one quantity the pressure relies on that the run cannot observe directly is the rate of learning at the end of training, . Model Carving estimates it in two steps: it reads the current rate of learning (the slope of the learning curve) by evaluating the same batch twice, and it forecasts that rate to the end of the run with a power law.
Reading the current rate. The slope of the logged training loss is mostly noise (consecutive batches differ in difficulty by more than the loss improves between them). Our trainer therefore keeps a snapshot of the parameters from an earlier point and, at a planned update , scores the current batch once more with the snapshot, recording
where is the loss the training step has already computed on that batch. Both losses see the same tokens, so the difficulty of the batch cancels, and is a finite-difference estimate of the rate of Equation (4) between and . Each batch calculation costs one forward pass at specific updates (101 to 204 per run), which is a negligible overhead (though also charged to the training FLOP budget). See Appendix § 11 for the details and engineering.
Forecasting the rate to the end of the run. Within a run at a constant learning rate, the loss is well described by a power law in tokens that approaches a floor with exponent ((Tissue et al., 2025; Luo et al., 2025)), so the rate is a straight line in log–log coordinates:
We fit this line to the readings by least squares, with a prior on the exponent taken from published scaling laws ((Tissue et al., 2025; Luo et al., 2025)), which we replace after approximately 4000 updates by an exponent fit from the run’s own rate of learning (Appendix § 11). The forecast is the constant-learning-rate fit at the projected end of the run, , and moves later as sublayers are removed.
Applying the pressure to the gates
The pressure as a penalty on the gates. Model Carving trains the gates jointly with the weights. However, the second term of our objective, Equation (3), is in part a discrete count of the sublayers that remain, so it has no gradient. Therefore, we replace each count by the logarithmic penalty
which is the smooth replacement for a count of nonzero entries in Candès et al. [10] (but unlike Candès et al., we add no inside the logarithm, so has no lower bound.)
We provide some intuition for why we apply this construction. Each gate scales how much of the sublayer’s write gets written to the stream with a quality cost, the first-order increase in loss from removing the sublayer, of . This is the loss gradient per relative change of the gate; therefore, the right measure of a penalty is how hard it pushes per relative change of the gate, , which is in the same units of loss as . For comparison, a linear () penalty pushes with which decreases as the gate shrinks and likewise shrinking the quality cost with it, so the two only compare with the gradient (a coefficient in loss per unit of gate, which would have to be swept). In contrast, the logarithmic penalty pushes with the constant at every size, so we compare the pressure with the quality cost directly. Ignoring Adam’s momentum, when exceeds , the gate falls, shrinks with it, and the gate falls all the way until we clip it to exactly zero as in Equation (8). When exceeds , the gate is kept and settles at the tension point.
The sets how far a gate must fall before the penalty charges its full pressure. In this case, when a gate falls to one twentieth of its value, the penalty decreases by exactly , because . A gate therefore falls only when its quality cost is below (about a tenth of its pressure) which is the rule of § 2.2 applied with a slight margin to keep removal conservative.
We apply our rule with one change to the Adam step. First, the loss gradient takes an ordinary Adam step. Second, we subtract from that the penalty gradient , divided by Adam’s denominator for that gate. If the gate is now below zero, we clip it to zero:
with and the bias-corrected first and second moments. Therefore, the clipping sets a falling gate to exactly zero rather than to a small value that would still cost compute.
Removing sublayers inside the run. Once a gate shrinks to zero, its sublayer contributes nothing, but it still runs until we remove it from the computation graph. Each graph is a static compiled program, so every 300 updates the trainer collects the sublayers whose gates reached zero and compiles the graph without them in a background thread while training continues. 400 updates later, training switches to the new graph. Finally, the graph at the end of the budget is the final carved model: a static Transformer with a heterogeneous set of layers that runs on any standard kernel.
Experimental setup
Construction We apply Model Carving broadly across two types of language models and various scales: standard Transformers at 140M, 370M, 770M, 1.3B and 2.7B parameters, and looped Transformers at 140M, 370M, 770M and 1.3B parameters. In figures and tables, we label each pair by the size of the full-depth model it was carved from. The standard Transformers follow standard GPT-2/3 construction (Radford et al., 2019; Brown et al., [7]), with learned LayerNorm, GELU MLPs, and rotary position encoding (Su et al., 2021). The looped Transformers are Fully Looped Transformers (Fu et al., [18]), looped four times. Each loop restarts the residual stream from the normalized token embeddings and, from the second loop on, every attention sublayer takes its queries from the previous loop’s normalized output to stabilize a known residual-norm explosion with standard looped Transformers. At each size, the two types share the width, the number of layers and heads (24 layers of width 2,048 with 32 heads at 1.3B), rotary position encoding and 4× MLPs. We provide the shapes of every size in Appendix § 10.
Baselines Each Model Carving run compares against two standard model baselines, trained on the same data, the same recipe, and with the same training FLOPs: (1) a “full-depth” baseline from which the carved run starts, and (2) a “shallower-depth” baseline with fewer layers to match the inference FLOPs per token of the final carved model. We use Muon (Jordan et al., [37]) for the weight matrices and AdamW (Loschchilov & Hutter, 2019) for the other parameters, with the orchards’ default learning rates (0.02 for standard and 0.0283 for looped Transformers (Karpathy, [40])), no warmup, a linear cooldown to zero over the last 20% of training, and weight decay inversely proportional to the length of the run (all values in Appendix § 10). We train on a shuffled sample of FineWeb-Edu (Penedo et al., 2024), with sequences of 2,048 tokens, a 49,152-token vocabulary and tokens per update. For each scale, we set the FLOP budget (§ 2.2) to the amount of training FLOPs needed to train each “full-depth” baseline for 50 tokens per parameter.
Symbolic tasks We also evaluate Model Carving on a suite of symbolic tasks, which allows us to check whether Model Carving during training removes exactly the computation that the task does not need (known for certain symbolic tasks). To do so, we train a three-layer looped Transformer with four loops, so 24 sublayer applications, on composition (trained length of 8), ListOps, and modular addition modulo 113 (Liu et al., 2023; Nangia & Bowman, 2018; Nanda et al., 2023). For these tasks, we do not forecast the rate of learning (as they do not have a natural training budget), and instead select a fixed value which we swept (0.28 for , 0.4 for ListOps, and 0.5 for modular addition). Therefore, the pressure on sublayer is and the training budget (which sets and ) is the full-depth model’s training FLOPs over about 1.05B tokens. We repeat each run with three seeds.
Pruning and distillation baselines On the 1.3B standard Transformer, we also compare against pruning the trained full-depth model and retraining it at equal total training compute. We prune the full-depth model’s last save before its cooldown to approximately the same inference FLOPs per token as the carved model and continue training with the remaining budget until it matches the carved run’s training FLOPs. We test and compare three types of pruning. Sheared-LLaMA-style pruning (Xia et al., 2024) learns hard-concrete masks on whole attention and MLP sublayers under a Lagrangian constraint on the expected inference FLOPs, then continues pretraining. Minitron-style width pruning (Muralidharan et al., 2024) cuts the hidden and MLP widths uniformly by activation importance on 1,024 sequences, keeping every layer and head, then retrains with distillation from the full-depth model plus the language-modeling loss. ShortGPT-style layer removal (Men et al., 2024) defines a layer’s Block Influence (BI) as how much the layer changes its input, and removes the seven layers with the lowest BI. We measure BI on 1,024 sequences, and then continue pretraining the rest.
We also train our own distillation baseline at every standard size from 140M to 1.3B and at looped 140M and 370M, by distilling the trained full-depth model of the same size into a freshly initialized student with the shallower-depth shape, whose inference cost matches the carved model’s. We train this student on the forward KL divergence to the teacher’s next-token distribution, following Hinton et al. [32].
Scaling analysis Following Approach 2 of Hoffmann et al. [33], we compare carved and full-depth Transformers of both types at five training budgets from to FLOPs. At each budget, we fit a parabola through our trained compute-optimal points to compare compute-optimal sizes and losses, and train the full cooldown of both models at these compute-optimal sizes of each budget. Second, we report two compute multipliers. The compute multiplier of a carved model in Table 1 is the training compute at which a power law [31] fit to the final losses of the trained full-depth models (50 tokens per parameter) reaches the carved loss. The compute-optimal multiplier compares their compute-optimal frontiers, that is, the compute at which the full-depth compute-optimal loss reaches the carved compute-optimal loss.
| Model | Params (M) | Sublayers per token | Tokens (B) | Training FLOPs | Inference GFLOPs/token | Val. bpb | Equal-token bpb | CORE-22 | |
| Looped Transformer | |||||||||
| 140M full-depth | 151 | 128 / 128 | 7.6 | 1.18 | 0.899 | 0.983 | 18.9 | ||
| 144 | 120 / 128 | 8.0 | 1.11 | 0.900 | 18.9 | ||||
| 144 | 120 / 128 | 8.0 | 1.11 | 0.915 | 17.9 | ||||
| 151 | 117 / 128 | 7.9 | 1.09 | 0.883 | 0.958 | 19.9 | 1.33 | ||
| 1.00 | 0.91 | 1.04 | 1.000 | 0.92 | −0.015 | −0.025 | +1.1 | ||
| 370M full-depth | 375 | 160 / 160 | 18.8 | 3.04 | 0.808 | 0.888 | 25.7 | ||
| 296 | 120 / 160 | 24.7 | 2.31 | 0.816 | 24.6 | ||||
| 296 | 120 / 160 | 24.7 | 2.31 | 0.828 | 23.8 | ||||
| 375 | 124 / 160 | 22.6 | 2.36 | 0.788 | 0.860 | 28.5 | 1.55 | ||
| 1.00 | 0.78 | 1.21 | 1.000 | 0.78 | −0.020 | −0.028 | +2.7 | ||
| 770M full-depth | 802 | 160 / 160 | 40.1 | 6.47 | 0.743 | 0.820 | 31.1 | ||
| 622 | 120 / 160 | 53.0 | 4.89 | 0.750 | 29.3 | ||||
| 802 | 118 / 160 | 52.1 | 4.76 | 0.723 | 0.793 | 33.5 | 1.62 | ||
| 1.00 | 0.74 | 1.30 | 1.000 | 0.74 | −0.020 | −0.027 | +2.3 | ||
| 1.3B full-depth | 1,309 | 192 / 192 | 65.4 | 10.67 | 0.704 | 0.776 | 35.2 | ||
| 1,007 | 144 / 192 | 86.7 | 8.05 | 0.710 | 33.1 | ||||
| 1,309 | 147 / 192 | 82.7 | 8.17 | 0.683 | 0.751 | 36.0 | 1.71 | ||
| 1.00 | 0.77 | 1.26 | 1.000 | 0.77 | −0.021 | −0.025 | +0.8 | ||
| Standard Transformer | |||||||||
| 140M full-depth | 151 | 32 / 32 | 7.6 | 0.35 | 0.926 | 1.005 | 15.7 | ||
| 130 | 26 / 32 | 8.9 | 0.30 | 0.931 | 16.0 | ||||
| 130 | 26 / 32 | 8.9 | 0.30 | 0.947 | 14.2 | ||||
| 130 | 27 / 32 | 8.3 | 0.31 | 0.922 | 0.996 | 16.5 | 1.07 | ||
| 0.86 | 0.84 | 1.09 | 0.999 | 0.87 | −0.004 | −0.009 | +0.8 | ||
| 370M full-depth | 375 | 40 / 40 | 18.8 | 0.84 | 0.835 | 0.910 | 22.1 | ||
| 296 | 30 / 40 | 24.0 | 0.66 | 0.843 | 22.0 | ||||
| 296 | 30 / 40 | 24.0 | 0.66 | 0.855 | 19.8 | ||||
| 296 | 31 / 40 | 22.8 | 0.67 | 0.832 | 0.903 | 22.0 | 1.07 | ||
| 0.79 | 0.78 | 1.22 | 1.000 | 0.80 | −0.003 | −0.007 | −0.0 | ||
| 770M full-depth | 802 | 40 / 40 | 40.1 | 1.74 | 0.769 | 0.842 | 26.7 | ||
| 622 | 30 / 40 | 51.9 | 1.35 | 0.778 | 26.3 | ||||
| 622 | 30 / 40 | 51.9 | 1.35 | 0.789 | 25.3 | ||||
| 622 | 31 / 40 | 50.1 | 1.37 | 0.767 | 0.836 | 27.2 | 1.05 | ||
| 0.78 | 0.78 | 1.25 | 1.000 | 0.78 | −0.002 | −0.006 | +0.5 | ||
| 1.3B full-depth | 1,309 | 48 / 48 | 65.4 | 2.82 | 0.729 | 0.800 | 29.8 | ||
| 956 | 34 / 48 | 89.9 | 2.06 | 0.739 | 29.3 | ||||
| 956 | 34 / 48 | 89.9 | 2.06 | 0.749 | 29.7 | ||||
| 940 | 34 / 48 | 89.3 | 2.03 | 0.727 | 0.794 | 31.2 | 1.05 | ||
| 0.72 | 0.71 | 1.37 | 1.000 | 0.72 | −0.003 | −0.006 | +1.5 | ||
| 2.7B full-depth | 2,642 | 64 / 64 | 132.1 | 5.62 | 0.676 | 0.745 | 36.0 | ||
| 1,777 | 42 / 64 | 196.6 | 3.77 | 0.689 | 34.4 | ||||
| 1,751 | 42 / 64 | 196.4 | 3.74 | 0.675 | 0.741 | 37.0 | 1.03 | ||
| 0.66 | 0.66 | 1.49 | 1.000 | 0.66 | −0.001 | −0.004 | +1.0 |
Table 1. Model Carving outperforms standard models in loss and downstream evaluations with up to 34% fewer FLOPs per token. Each row compares the full-depth model, a shallower-depth model, the carved model, and a student distilled from the full-depth model into the shallower-depth shape (§ 4.3). Sublayers per token counts the attention and MLP sublayers a token passes through. All train on the same data and optimizer. The change row compares the carved model with the full-depth model, namely the ratios for parameters, sublayers, tokens and FLOPs, differences for bpb, and CORE-22. measures the compute multiplier, defined as training compute at which full-depth training reaches the carved loss (see § 3). Finally, Table 14 gives the compute-optimal multiplier .
Evaluation We report bits per byte (bpb) on the same 16,384 held-out validation sequences for every model, and the CORE score over 22 downstream tasks (Li et al., 2024; Wang et al., 2026) (Appendix § 13). On generative tasks across math problems (GSM8K, MATH-500), knowledge recall (TriviaQA), reading comprehension (SQuAD), and last-word prediction (LAMBADA) [13, 30, 38] (Lightman et al. 2024; Rajpurkar et al. 2016; Paperno et al. 2016), we sample free-form answers at temperature 0.7 and evaluate pass@ [12], the fraction of problems that at least one of samples solves, with paired 95% bootstrap intervals over prompts. We compare both the settings of equal sample counts and equal inference budget, where the carved model can draw as many samples as the full-depth model’s inference FLOPs allow. We measure decoding throughput on one H100 GPU at contexts of 1,024 to 8,192 tokens, at equal batch sizes, and at each model’s largest tested batch (Appendix § 13). We also compare carved models against publicly released models, which we rescore with the same harness, prompts, few-shot examples, their own tokenizers, and seed as our own models. Appendix § 10 has the hardware we used per run.
Finally, we also evaluate whether Model Carving’s lead remains after instruct-tuning our three largest scales (standard 1.3B and 2.7B, looped 1.3B) for one epoch on chat data with nanochat’s default recipe [40]. As a check, we repeat the tuning with a gentler recipe, at 0.02 or 0.1 times the pretraining rate with a 3% warmup, the range used for Llama 2 and Tülu 2 [36] (Touvron et al. 2023), and each model takes the rate with its lower chat validation loss.
Results
Carving produces better models with lower inference cost
Model Carving sets a new compute-quality frontier for both training and inference. Across both looped and standard Transformers up to 2.7B parameter scale, Model Carving produces models with lower validation loss than the full-depth model it was carved from at both isoToken and isoFLOP comparisons, while costing 8–34% fewer FLOPs per token at inference (Table 1, Figure 2 and Figure 4). Every carved model is also smaller and cheaper to run than the full-depth model it starts from, with 66% to 86% of the parameters in the standard Transformer family, and up to 26% fewer FLOPs per token in the looped Transformer family (Table 1). Moreover, the gains are not simply from the extra tokens per parameter a smaller model gets, as
Figure 2. Model Carving produces models with lower loss than standard models when compared both at isoFLOP and isoToken. Validation bpb of the 1.3B looped family and 2.7B standard family against training FLOPs (a, b) and training tokens (c, d). Panels (c, d) end where the full-depth run starts its cooldown. The title signifies the parameter number of the model Model Carving started from. The number at the end of each line is the model’s inference GFLOPs per token.
Figure 4. Carved models have lower loss, cost fewer inference FLOPs, and decode faster. Validation bpb against whole-model inference FLOPs per token for (a) looped and (b) standard Transformers. (c) Validation bpb against measured decode tokens per second, each model at its largest batch. We decode on one H100 GPU at a 4,096-token context, with one compiled call per decode step. Each arrow shows the carved/full-depth throughput ratio (all contexts and batches in Appendix § 15).
the shallower-depth model ends with higher loss and a lower CORE-22 score than the carved model at all scales and across seeds (Table 1).
Carved models perform better on downstream tasks. On CORE-22, carved models match or outperform both the full-depth and shallower-depth baselines. The largest gains are noticeably in looped Transformers (Table 1; Appendix § 14).
On generative tasks, we evaluate both the setting of equal-samples and equal-inference, where given the full-depth model’s inference cost, equal-inference means the carved 2.7B standard model can draw approximately 1.5 times as many samples per problem. Therefore, it solves up to 37% more problems on all five tasks at equal-inference (Table 2). We also report equal samples, within which both models perform near parity at about two points of one another.
| Task | Full-depth | Carving | Difference | Carving (24) | Difference |
| GSM8K | 0.284 | 0.300 | +0.016 [−0.009, 0.040] | 0.375 | +0.091 [0.064, 0.118] |
| MATH-500 | 0.142 | 0.152 | +0.010 [−0.021, 0.039] | 0.194 | +0.052 [0.018, 0.086] |
| TriviaQA | 0.413 | 0.391 | −0.022 [−0.029, −0.016] | 0.429 | +0.016 [0.009, 0.022] |
| SQuAD | 0.624 | 0.623 | −0.001 [−0.007, 0.005] | 0.649 | +0.025 [0.019, 0.032] |
| LAMBADA | 0.765 | 0.750 | −0.015 [−0.024, −0.006] | 0.782 | +0.018 [0.008, 0.027] |
Table 2. At equal inference FLOPs, the carved 2.7B model solves more problems on all five generative tasks. Fraction of problems solved by at least one of samples (pass@) at temperature 0.7, for the standard 2.7B full-depth model versus standard 2.7B carved model. The full-depth model draws 16 samples per problem, whereas the carved model draws 16 (equal samples) or 24, which cost about the same inference FLOPs as the full-depth model’s 16 because each carved token costs 0.66 times as much.
Carved models beat released models trained with several times their compute. We rescore publicly released models with our own evaluation harness, and find that carved models have higher downstream performance than released models trained with significantly more compute (above 80B tokens, otherwise explicitly labeled in Figure 3). The standard 1.3B carved model outscores OPT-1.3B and Pythia-1.4B, whose estimated training costs are 2.8 and 4.6 times its own, with fewer inference FLOPs than either, and the 2.7B carved model outscores the larger Delphi-3.4B (Appendix § 14 contains all comparisons).
Figure 3. At matched inference cost, carved models outperform public models trained at similar scales. CORE-22 against inference FLOPs per byte (a, c) and training FLOPs (b, d) for looped (a, b) and standard (c, d) Transformers. We label explicitly released models with over 1T training tokens in (b, d). We rescore every released model with our own evaluation where weights are public (§ 3). We list the released models in Appendix § 14.
Carved models decode faster
Carved models decode up to 1.45 times faster at equal batch size and up to 1.61 times faster at each model’s largest batch. By construction, Model Carving removes sublayers, and thus runs 8–34% fewer inference FLOPs per token.
The removed attention sublayers also shrink the key-value cache, so the carved models keep 5% to 31% less KV cache per token, with the largest saving in the 2.7B standard model (Appendix § 15). A decode step mostly moves weights and KV cache, and carved models move less of both, which is close to the ratio of their inference FLOPs. On a workstation GPU (RTX PRO 6000, an example edge setting) with one request at a time, the carved standard 1.3B and 2.7B models also decode 1.3 and 1.4 times faster than their full-depth models (Appendix § 15). Carved models also gain more at each model’s largest batch, because its smaller weights and cache allow for a larger batch (Figure 4c).
Carved models outperform pruned models and distilled models
We compare Model Carving to the pruning methods of Sheared-LLaMA, Minitron and ShortGPT. We prune the 1.3B standard full-depth model to about the carved model’s inference cost using each of these methods, and retrain it to Model Carving’s total training compute (§ 3). Both Sheared-LLaMA-style pruning with continued training, and Minitron-style pruning (which recovers by distillation from the full-depth model) end with a higher loss and score lower on CORE-22 than the carved model. ShortGPT-style layer removal with continued pretraining also ends with a higher loss and scores lower on CORE-22 than the carved model (Appendix § 16 with the full comparison).
At equal training compute, Model Carving outperforms distillation from the full-depth model. We distill the trained full-depth model of each pair into a fresh student with the shallow-depth shape (§ 3), so the student has the shallower-depth model’s shape and training tokens and the carved model’s inference cost. All teacher training and forward pass costs are excluded. At every finished size, the student ends with a higher loss and a lower CORE-22 score than the carved model (Table 1) (full numbers in Appendix § 16).
Model Carving’s advantage grows with scale
Carving’s gains scale with compute (Figure 5). Following Hoffmann et al. [33], we fit scaling laws for Model Carving and calculate the compute-optimal point for carved models versus standard models. At each of our five training budgets, the carved compute-optimal loss is below the compute-optimal loss for non-carved models (Figure 5). The gap grows with compute in both families, as the full-depth compute-optimal model needs to times the compute to reach the carved compute-optimal loss in looped Transformers, and to times in standard Transformers – increasing with the budget (Appendix § 17).
Figure 5. Model Carving’s advantage grows with scale. The carved compute-optimal loss is below the full-depth compute-optimal loss, and the gap grows with compute. Validation bpb post-cooldown for each training budget, from (light green) to FLOPs (dark purple), against parameters (final size for carved models), for looped (a-c) and standard (d-f) Transformers. Panels (a, d) show full-depth and (b, e) carved models. We use quadratic fits in log parameters at each budget, and use diamonds to show their minima. (c, f) The minima against training FLOPs.
Moreover, we find that this advantage holds in the regime of overtraining. With about times the compute of its main run ( FLOPs, about 130 training tokens per parameter for the full-depth model instead of 50), the 370M looped carved model keeps the same gains over its full-depth baseline (Appendix § 17).
In the looped family, the compute multiplier of Table 1 also grows with size, from 1.33 at 140M to 1.71 at 1.3B, so Model Carving’s gains scale with compute. At 50 tokens per parameter, the carved 1.3B looped model matches a full-depth model with about 1.3 times the parameters trained on 1.3 times the tokens. In the standard family, the multiplier is smaller at about 1.07.
Model Carving removes computation a task does not need
On symbolic tasks, Model Carving finds the minimal circuit that solves the task (Figure 6). On modular addition, the carved model keeps only 2 of its 24 sublayer applications, both of them attention (an attention-only Transformer!). It passes with 99% test accuracy, and different seeds learned different attention-only sublayers to keep. On ListOps, Model Carving removes 17 to 20 of the 24 sublayers across three seeds. On composition, Model Carving keeps full accuracy at the trained length while removing 13 of the 24 sublayers in all three seeds (Appendix § 21).
Figure 6. On symbolic tasks, Model Carving learns a minimal architecture for each task, down to an attention-only Transformer! Each row is the carved looped Transformer of one task, unrolled into its four loops. The colored sublayers are ones Model Carving kept and gray ones are removed. We label this number as kept, as well as the exact match accuracy. We show all the seeds in Table 19.
Analysis
Analysis
Training without removal
Model Carving matches or beats the performance of DenseFormer-style models with 23% fewer inference FLOPs. Model Carving changes two things relative to the full-depth model. (1) it trains an overparameterized network, with gated sublayer writes and learned connections, and (2) it removes sublayers from the model. For a descriptive comparison, we train the same model without gates and only learned connections (as done by Pagliardini et al. (2024)) at standard 140M, 370M and 770M (Figure 13 in Appendix § 12). Model Carving achieves about the same performance as the overparameterized DenseFormer control while saving inference FLOPs for free. For instance, the carved looped 370M model beats the DenseFormer-style model in both loss (0.788 against 0.794 bpb) and CORE-22 (28.5 against 27.5) with 23% fewer inference FLOPs. Therefore, Model Carving achieves the performance of an overparameterized model at the efficiency of a smaller model.
Figure 13. Carved models run up to 22% fewer inference FLOPs than the DenseFormer-style models. Validation bpb against whole-model inference FLOPs per token comparing Model Carving vs. Model Carving without removal (DenseFormer controls). Labels: the carved model’s parameter count.
The learned topology
Model Carving learns diverse, yet transferable topologies (Figure 7). In every standard Transformer, Model Carving removes sublayers within one early segment. For instance, the 2.7B model removes the attention of layers 2 to 11 and the MLP of layers 1 to 12 (Figure 7a). At every scale, this early segment ends at about a third of the depth (all nine topologies in Appendix § 12). Interestingly, this is the opposite of what the pruning literature finds, where deeper layers are the easiest to remove ([23] (Men et al. 2024)).
Figure 7. Carving learns diverse topologies. (a, b) The sublayers that the carved standard 2.7B and looped 1.3B models keep (attention, MLP) and remove, by layer and, for the looped model, by loop. (c, d) Their learned connection weights. Each row is a layer that reads, and each column an earlier output that it can read from.
Some useful knowledge would be whether Model Carving removals can also be generally transferable across scales, which would mean we have found a simply more optimal, heterogeneous architecture. To evaluate this, we predict each sublayer of a held-out size from what Model Carving removed in other sizes. The AUC measures how well these predictions separate removed from kept sublayers (1.0 is perfect and 0.5 is chance), and we find this is at least 0.97 for standard Transformers and looser for looped Transformers (0.76 to 0.88). Therefore, Model Carving seems to have found a better architecture that indeed transfers across scales.
Model Carving gives each loop its own depth profile. Another benefit of Model Carving is allowing looped models to differentiate their weight-tied iterations without sacrificing the weight-tied property. The 1.3B looped model carves sublayers in the early layers of every loop, at the end of the first three loops, and in the late layers of the last loop (Figure 7b). Thus, the same sublayer can be executed in one loop while being removed in another, which gives weight-tied models a different set of sublayers at each depth (which we call the depth-profile).
Model Carving retains the sublayers that matter most. To test whether Model Carving learns to keep only the “most important” sublayers (with respect to predictive quality), we perform a knockout ablation where we remove one sublayer at a time from the final trained model, keep every other weight fixed, and then measure the rise in validation loss.
We find that removing the median kept sublayer of the carved 2.7B model raises the loss more than five times as much as removing the median sublayer of the full-depth baseline. In standard Transformers this ratio grows with scale, from about 2.4 times at 140M to 5.5 times at 2.7B. Therefore, while in the 2.7B full-depth model, most sublayers cost little to lose, as the pruning literature also finds [23] (Men et al. 2024), almost every sublayer that Model Carving keeps is costly to lose.
The improvement and the learned topology repeat across seeds
We also evaluate a second seed to check whether both the performance of and the topologies learned by Model Carving are robust to seeds. In every pair, both seeds end below the full-depth model. The leads of the first and second seeds are 0.0041 and 0.0038 bpb at standard 140M, 0.0025 and 0.0033 at standard 370M, 0.0026 and 0.0028 at standard 1.3B, and 0.0152 and 0.0156 at looped 140M (Appendix § 18). The sublayer removals and topologies found also repeat across seeds (Appendix § 18).
Model Carving’s chat lead persists through instruction tuning, and its loss lead through quantization
After instruction tuning, the carved models keep their chat leads. We tune three model pairs (standard 1.3B and 2.7B, looped 1.3B) for one epoch with nanochat’s default recipe (0.8 times the pretraining learning rate) and with a gentler recipe swept over two rates (0.02 and 0.1 times the pretraining rate, with a 3% warmup), in which each model takes the rate with its lower chat validation loss (§ 3). With the default recipe, carved models outperform non-carved models (CORE-22 over the 13 tasks with stable scores), and on chat pass@k on GSM8K, TriviaQA and SquAD within the same inference cost. Motivated by the benchmark-noise analysis of Heineman et al. [28]; Madaan et al. (2024), we call 13 of the CORE tasks “stable,” namely those whose scores increase with model size and have a 1.5 signal-to-noise ratio across our full-depth models (Appendix § 13). With the gentler recipe, carved models also beat non-carved models, by 2.0 to 9.5 points of pass@k on GSM8K, TriviaQA and SquAD (Table 3). We also try tuning the standard 1.3B pair for two epochs instead of one, as Llama 2 and Tülu 2 do ([36] (Touvron et al. 2023)), and this widens its CORE-22 lead on the 13 stable tasks from 0.7 to 1.5 points (Appendix § 19).
| Measure | Full-depth | Model Carving | Difference | Model Carving | Difference |
| Equal samples (16 each) | Nearly equal allowance | ||||
| Standard 1.3B, default recipe | |||||
| CORE-22 (13 stable) | 33.5 | 36.3 | +2.8 [+1.6, +3.9] | ||
| GSM8K | 0.459 | 0.444 | −0.015 [−0.041, +0.010] | 0.496 | +0.036 [+0.008, +0.064] |
| TriviaQA | 0.402 | 0.409 | +0.007 [+0.002, +0.012] | 0.435 | +0.033 [+0.027, +0.038] |
| SQuAD | 0.899 | 0.904 | +0.005 [−0.000, +0.011] | 0.922 | +0.023 [+0.018, +0.029] |
| Standard 1.3B, gentler recipe | |||||
| CORE-22 (13 stable) | 40.2 | 40.9 | +0.7 [−0.3, +1.7] | ||
| GSM8K | 0.218 | 0.232 | +0.014 [−0.009, +0.037] | 0.277 | +0.059 [+0.034, +0.085] |
| TriviaQA | 0.504 | 0.506 | +0.002 [−0.003, +0.007] | 0.530 | +0.026 [+0.021, +0.032] |
| SQuAD | 0.909 | 0.919 | +0.009 [+0.004, +0.015] | 0.935 | +0.026 [+0.020, +0.031] |
| Standard 2.7B, default recipe | |||||
| CORE-22 (13 stable) | 43.5 | 45.1 | +1.6 [+0.6, +2.6] | ||
| GSM8K | 0.525 | 0.545 | +0.019 [−0.006, +0.045] | 0.598 | +0.073 [+0.046, +0.101] |
| TriviaQA | 0.504 | 0.527 | +0.023 [+0.018, +0.028] | 0.557 | +0.053 [+0.047, +0.058] |
| SQuAD | 0.936 | 0.931 | −0.006 [−0.010, −0.001] | 0.946 | +0.009 [+0.005, +0.014] |
| Standard 2.7B, gentler recipe | |||||
| CORE-22 (13 stable) | 48.4 | 48.0 | −0.5 [−1.4, +0.5] | ||
| GSM8K | 0.318 | 0.345 | +0.027 [+0.002, +0.051] | 0.412 | +0.095 [+0.067, +0.123] |
| TriviaQA | 0.603 | 0.605 | +0.002 [−0.003, +0.006] | 0.631 | +0.028 [+0.022, +0.033] |
| SQuAD | 0.923 | 0.925 | +0.002 [−0.003, +0.007] | 0.942 | +0.020 [+0.015, +0.025] |
| Looped 1.3B, default recipe | |||||
| CORE-22 (13 stable) | 36.2 | 42.1 | +5.9 [+4.6, +7.1] | ||
| GSM8K | 0.569 | 0.628 | +0.058 [+0.032, +0.085] | 0.656 | +0.086 [+0.059, +0.114] |
| TriviaQA | 0.454 | 0.509 | +0.055 [+0.050, +0.060] | 0.525 | +0.072 [+0.066, +0.077] |
| SQuAD | 0.932 | 0.940 | +0.007 [+0.003, +0.012] | 0.947 | +0.014 [+0.010, +0.019] |
| Looped 1.3B, gentler recipe | |||||
| CORE-22 (13 stable) | 46.5 | 50.0 | +3.5 [+2.4, +4.6] | ||
| GSM8K | 0.349 | 0.383 | +0.034 [+0.009, +0.060] | 0.418 | +0.070 [+0.042, +0.096] |
| TriviaQA | 0.551 | 0.592 | +0.041 [+0.036, +0.046] | 0.608 | +0.057 [+0.051, +0.062] |
| SQuAD | 0.930 | 0.946 | +0.016 [+0.011, +0.020] | 0.954 | +0.024 [+0.019, +0.029] |
Table 3. After instruction tuning, the carved models keep their chat leads under both recipes. Full-depth and carved models after one epoch of tuning. CORE-22 on the 13 stable tasks (centered points) and chat pass@k (fraction of problems) on GSM8K, TriviaQA and SQuAD, at equal samples (16 each) and within a nearly equal inference allowance (carved models draw samples to match the inference cost of the full-depth model’s 16).
Carved models are robust to weight quantization. We also evaluate how robust carved models are to quantization. We quantize the weight matrices of every model to 8 bits by rounding, and to 6, 5, 4 and 3 bits with GPTQ [17] in groups of 64 and calibrated on 128 training sequences, while keeping the embeddings, norms, gates and connection weights in full precision. Model Carving’s lead is robust to weight quantization down to 4 bits (except standard 2.7B), and down to 3 bits in the looped family (Appendix § 13).
Cooldown vs. excess loss
Carved models have lower loss excess from the constant-LR phase. One observed phenomenon is that carved models gain less from their cooldown than full-depth models. Notably, across the eight pairs from 140M to 1.3B, Model Carving’s final cooldown lowers the loss 10% to 16% less than the full-depth model’s, while the shallow-depth model’s cooldown gains as much as the full-depth model’s, ruling out the size confound (Appendix § 20).
A cooldown fundamentally removes the excess loss that the noise of a constant learning rate adds [24] (Wen et al. 2025), and we find that carved models carry less of that excess. We test this by averaging the weights along the constant-rate trajectory to remove much of this noise. At standard 140M, we find this averaging helps Model Carving less, by 4% to 9% (Appendix K). Therefore, part of Model Carving’s lead at the peak learning rate is gain that the full-depth model collects only during its cooldown.
To test whether the shape or length of the cooldown has an effect, we rerun the final cooldown of the standard 140M pair with cosine and square-root shapes, and with a longer cooldown (about 35% and 45% of training instead of 20%) in both runs. Under every schedule, Model Carving’s cooldown gain stays 10 to 13% smaller than the full-depth model’s, while still finishing better overall.
Related work
Learning the architecture. The central idea of Model Carving is to learn which sublayers a Transformer should keep in the same run that trains its weights. We take inspiration from prior work with a similar objective but using some form of a sparsity penalty, as numerous approaches indeed apply , , and FLOP-based penalties on channels and heads [21] (Liu et al. 2017; Louizos et al. 2018). Structure can also be learned during training without a penalty, as Zhu & Gupta (2017) used a gradually increasing pruning schedule to sparsify the weights during training. Although these methods are adjacent, the main difference is both Model Carving’s penalty and dynamic sublayer removal.
Neural architecture search likewise pursues learning a more capable architecture, but employs a second optimization problem. Early methods trained a space of thousands of candidate networks and performed search (Zoph & Le, 2017; Real et al., 2019; So et al., 2019), while DARTS, ProxylessNAS, and FBNet optimize architecture parameters on held-out data alongside a supernet’s weights followed by a fresh retraining [9] (Liu et al. 2019a; Wu et al. 2019). Model Carving needs neither the second optimization search nor the retraining.
Gates and connections across depth. Model Carving builds on work that scales and gates how layers write to the residual stream. Within the realm of skip connections, Highway networks gate each skip connection with learned, input-dependent gates (Srivastava et al., 2015), residual networks use identity skip connections [26], and ReZero scales each residual branch by a learned scalar that starts at zero [1]. Within the realm of over-connectivity, DenseNet connects each layer to all earlier ones [34], and DenseFormer and hyper-connections learn how much each layer reads from earlier layers (Pagliardini et al., 2024; Zhu et al., 2025a). Model Carving uses both ideas, with a scalar gate on each sublayer and DenseFormer-style learned connections.
Pruning and distillation. In 1989, Optimal Brain Damage (LeCun et al., 1989) showed how unimportant weights from a trained network could be removed with little impairment. Model Carving’s thesis pushes further, namely that removal of unimportant sublayers allows critical sublayers to train better. However, most methods for pruning derive the mask from a larger model that has already been trained. For structured pruning, much of the benefit comes from the pruned architecture rather than from the inherited weights (Liu et al., 2019b), which suggests finding that architecture during training instead. In language models, Sheared-LLaMA and CoFi learn pruning masks under regularization and Lagrange multipliers (Wang et al., 2020b) that prune toward either a target shape or desired target sparsity (Xia et al., 2024; 2022), Minitron prunes by an estimated importance heuristic and retrains with distillation (Muralidharan et al., 2024), and it is well known that whole layers can be removed with little loss [23, 27] (Men et al. 2024). Model Carving removes sublayers without a specified target, and only in tension with the prediction loss (Appendix C). Carved models also remove sublayers in roughly the first third of each standard Transformer, in contrast to layer-removal studies that have found deeper layers easier to remove.
Adaptive computation. Another way to save computation is to decide per token, at inference-time, how much of the network to run, through halting [22], mixtures of experts (Shazeer et al., 2017), early exits (Schuster et al., 2022), or routers that skip blocks (Raposo et al., 2024) or set how many times a shared stack runs [2]. However, these methods keep each parameter and run a router or halting rule while decoding, whereas a carved model is a single static graph and stores no key–value cache for removed attention sublayers. In fact, the two are complementary!
Scaling laws. Lastly, compute-optimal training picks one model size for a budget before training, from loss fits across many runs [39, 33], while accounting for inference favors smaller models trained on more tokens (Sardana et al., 2024). Model Carving makes this trade inside one run and brings it to each sublayer by extrapolating the run’s own learning curve [15] with the power-law form of within-run loss laws (Tissier et al., 2025; Luo et al., 2025).
More broadly, the methods above set the trade-off between quality and compute outside the run that trains the model, through a penalty coefficient, a target size, a routing capacity, or a scaling-law fit. The thesis of Model Carving is to place this in compute versus prediction quality tension within the training itself, which is why one set of fixed settings works at every size and in both model families.
Discussion
Carving keeps its lead while removing computation early in training, contrary to pruning. Pruning at initialization or early in training is far from a new idea. These masks learned before training, such as in SNIP (Lee et al., 2019), GraSP (Wang et al., 2020a) and SynFlow (Tanaka et al., 2020), often fall short of pruning after training ([16]). However, despite Model Carving making most of its sublayer removals during the first 20% of training, carved models reach a lower loss than the full-depth model at matched training compute. We discuss below why Model Carving differs in this case.
First, Carving removes full sublayers, akin to structured pruning, for which most of the gain comes from the pruned architecture rather than the individual weights (Liu et al., 2019b). Model Carving thus finds this architecture inside the run that trains it.
Second, the gates update smoothly while the weights learn. As in ReZero ([1]), each sublayer writes through a scalar gate. Our pressure pushes every gate toward zero, but a gate falls only where the pressure outweighs its sublayer’s contribution, while the rest of the network keeps training. Therefore, a gate can fall far and rise again, yet only a zero gate removes its sublayer, and no sublayer with a gate value of zero returns to a nonzero gate value (Appendix § 11.§ 1).
Finally, we give the gates their own optimizer, with the pressure as their only sparsity penalty. The gates take a separate Adam step without weight decay, and a normalized write lets the gate alone set the size of each write relative to the stream (Equation (1)). Therefore, a gate only adjusts by the loss and the pressure.
Model Carving offers a compute-efficient solution for building edge models. Edge devices are deployed in settings where inference compute and memory are the bottlenecks. Currently, the most common ways to build edge models involve pruning a larger model or distilling from it. Model Carving offers a new method to develop and train smaller models directly, also robust to quantization.
Limitations and future work
Larger scale. In this study, we explore the largest scales of 2.7B parameters on standard Transformers and 1.3B parameters on looped Transformers. This regime demonstrates that the percentage of inference compute that Model Carving saves increases with scale (see § 4.4). Deeper models may have even more potential to be carved, and thus an immediate follow-up is to test our method on larger scales, longer training, and different data.
Cooldown. The pruning pressure forecasts the learning with the assumption of a fixed LR, but we simply turn off the pressure during the cooldown (with intuition being to settle into a minimum). As a result, Model Carving gains 10% to 16% less from the cooldown than dense models do (see § 6.5), given that the pruning pressure does not account for the cooldown yet. We suspect it would be more accurate to use a pruning pressure that takes into account the learning-rate schedule (Tissuse et al., 2025; Luo et al., 2025), and that in future work, it is also worth exploring whether pruning the structure during the cooldown is fruitful.
Initial settings. Most of the pruning happens in the first 20% of the training, which indeed relies on the prior. The gate initialization and margin ln 20 are hyperparameters applied at all scales and families. In future work, it would be interesting to explore uncertainty-aware learning predictors (to push pruning until the estimate is stable), dynamic pruning rules (that allow the re-insertion of pruned sublayers), and a theoretical derivation of these hyperparameters.
Dynamic batch sizes and learning rate. In a similar vein, we believe that Model Carving may benefit from dynamic hyperparameters, as carving out sublayers alters model size and thus the optimal hyperparameters. Scaling laws (with respect to model size and training tokens) are well-defined for adapting learning rate, batch size, and weight decay. For instance, under the maximal update parametrization (P), the optimal learning rate remains stable as the model’s width changes (Yang et al., 2021), or optimal batch size increases with training tokens ([4]). We designed a first schedule that increases the batch size during training (Smith et al., 2018; McCandlish et al., 2018), which reached the same final loss of the carved 140M model with 38% fewer updates, and we plan to test it at larger sizes.
Granularity and deployment costs. Model Carving currently prunes entire attention and MLP applications. More generally, however, our method can prune any granular computational component that has a gating mechanism and a fraction of the FLOPs. It would be interesting to explore the use of Model Carving on attention heads and MLP dimensions, layer types, and to include device latency or memory in the pruning pressure.
Combining with adaptive computation. Model Carving arrives at a static structure and is not able to adaptively allocate more compute to harder tokens. Token-level adaptive computation at inference time (e.g., through halting, early exits, and routing [22, 2] (Schuster et al. 2022; Raposo et al. 2024)) is a complementary approach to Model Carving. Specifically, Model Carving first arrives at a structure, and then adaptive computation could be used to allocate token-level compute based on the sublayers (or number of loops in a looped Transformer).
Carving pretrained models. All our experiments train from scratch and from a random initialization. In future work, it would be interesting to explore whether principles from Model Carving can be used to prune or fine-tune a pretrained model by adding gating and training with the pruning pressure.
Models and training settings
We list the shape of every model in Table 4. At each scale, standard and looped Transformers share the same width, number of layers and heads, a 49,152-token vocabulary, a 2,048-token context, MLPs four times the width with GELU, learned LayerNorm, and rotary position encoding (the only difference being a looped Transformer applies its layers four times).
| Size | Layers | Width | Heads | Parameters (M) | Training tokens (B) | Updates |
| 140M | 16 | 768 | 12 | 151 | 7.6 | 7,201 |
| 370M | 20 | 1,152 | 18 | 375 | 18.8 | 17,889 |
| 770M | 20 | 1,728 | 27 | 802 | 40.1 | 38,223 |
| 1.3B | 24 | 2,048 | 32 | 1,309 | 65.4 | 62,401 |
| 2.7B | 32 | 2,560 | 32 | 2,642 | 132.1 | 126,001 |
Table 4. Model shapes and the full-depth training runs. Tokens and updates are measured with respect to the full-depth runs, at 512 sequences of 2,048 tokens per update.
Optimizer settings We use Muon (Jordan et al., [37]) for the weight matrices with momentum 0.95 and five Newton–Schulz steps, and AdamW (Loshchilov & Hutter, 2019) for the embeddings, unembedding, and norms with and . The learning rate is 0.02 for standard and 0.0283 for looped Transformers, with the embedding at 0.15 times that rate and the unembedding at 0.2 times that rate, no warmup, and a linear cooldown to zero over the last 20% of the updates. We set weight decay to be inversely proportional to the length of the run (calculated from the learning rate times the weight decay equals 12.5 divided by the planned number of updates) which gives 0.087 at standard 140M and 0.010 at standard 1.3B. Carved runs adjust this value as sublayers leave (Appendix § 11).
Hardware The runs trained on NVIDIA H100, H200 and B200 GPUs of a university cluster, a cloud provider, and an industry research cluster. Every run used 1,048,576 tokens per update.
Method details
One training update. (1) Run the forward and backward pass on the batch with the current graph and update the weights and connections. (2) Compute the rate of learning of Equation (6) from the snapshot and add it to the fit of Equation (7). (3) Project the end of the run from the remaining budget and the cost per update of the current graph, and set the end rate . (4) For each open gate, use Equation (5) to set its pressure, take the Adam step, and then the penalty step and the clip at zero of Equation (8). (5) At each removal step, remove the sublayers whose gates are at zero in the executed graph. (6) Charge the executed FLOPs and stop when the charge reaches the budget.
Cost model. To calculate FLOPs per token, we count every executed sublayer application, connection, and readout, and training FLOPs are three times the forward FLOPs as is conventional. An attention application costs forward-and-backward FLOPs per token at width and context , and an MLP application . in Equation (5) is sublayer ’s share of the training FLOPs per token of the executed graph without the sublayers whose gates are already at zero.
Projected end. At each update, we project the last update from the remaining budget and the cost per update of the current model graph. Here, in Equation (5) is the token count at that update, and is the fraction of that is still remaining.
Snapshots. We use two snapshots to retain the weights and gates in float32 for updating the learning exponent. We take a snapshot from an earlier point which is a quarter to half an e-fold of tokens back.
Exponent fit. The fit of Equation (7) places each snapshot reading (forward pass value) at the midpoint of its interval and solves, by least squares with a prior on the exponent from published loss curves,
The prior’s weight in Equation (9) equals the data’s weight on the slope at the first fit, so the readings outweigh it as they accumulate. We remove readings from an early transient period, and the fitting starts around update 1,400 at 1.3B. The exponents the runs learn end between 0.4 and 0.65, which is within or very closely near the 0.42 to 0.62 reported for single-run loss curves by Tissue et al. (2025); Luo et al. (2025) (Appendix § 12).
Gates. Every gate starts at 0.1 and takes Adam steps with learning rate per tokens, and . We give a looped model one gate per sublayer per loop, so a sublayer decreases the number of stored parameters only when it is closed in each loop.
Removal schedule. Every 300 updates, the trainer compiles a smaller execution graph in a background thread without the sublayers whose gates are zero, and switches to it 400 updates later.
Connections. Each connection row starts with a sum of 0.5 and trains with Adam at learning rate , and . After each update, a row with norm above one is rescaled to norm one, and a row with signed sum above 0.95 is rescaled to 0.95. The connections themselves carry no pressure.
Weight decay and cooldown. We normalize the weight decay to the projected length of the run (Appendix § 10) which adjusts as sublayers leave. The cooldown covers the last 20% of the projected run, after which we set the pressure to zero and no sublayers are removed.
Fixed settings. Apart from the pressure, Model Carving has a short list of fixed “settings” for both families and all scales: the initialized gate value (0.1), the update at which the pressure starts (340), the penalty constant , the removal intervals, and the cooldown (20%).
The carved model at inference. After training, the carved model is a static Transformer with fewer (and heterogeneous) sublayers. The same graph runs for every token, so serving does not require any routing or masking, and runs on any standard kernel. Further, each kept attention application keeps the standard key–value cache. The learned connections only act as gates to the current token’s earlier layer outputs, so they add no state across tokens.
Gate falling and rising behavior
Notably, once a sublayer is removed (gate shrinks to zero), it does not return. Across the nine carved runs, 193 sublayers were removed before the cooldown freeze and none returned. Gates above zero do fall and rise (Figure 8), as of the 671 kept gates, 184 fell below half of their peak and 141 of them later doubled, and 35 fell below a tenth of their peak and 33 of those doubled. Once a gate falls nearly to zero, however, zero follows quickly by our pressure construction.
Figure 8. Gates falling and rising behavior, and a gate at zero stays at zero. (a) For every gate of the nine carved runs, its lowest reading before the cooldown freeze against its highest later reading. Crosses: the removed sublayers whose gates reach zero and do not return. (b) The gates that fell below a tenth of their peak, by run.
Starting gate value. Table 5 shows a sweep over the value at which every gate starts for the 140M model in both families. Initializing the gate at 0.2 and above ends up removing few or no sublayers while keeping nearly the full inference cost. Our paper default 0.1 removes 3 to 5 of 32 applications in the standard runs and 11 of 128 in the looped run.
| Starting gate value | Standard 140M: Removed | Standard 140M: FLOPs per token | Standard 140M: Lead | Looped 140M: Removed | Looped 140M: FLOPs per token | Looped 140M: Lead |
| 0.05 | 3 | 0.90 | 0.0016 to 0.0034 | 21 | 0.83 | 0.0148 |
| 0.1 | 3 to 5 | 0.84 to 0.90 | 0.0005 to 0.0043 | 11 | 0.91 | 0.0149 |
| 0.2 | 0 to 2 | 0.93 to 1.00 | 0.0070 to 0.0076 | 2 | 0.99 | 0.0161 |
| 0.4 | 0 | 1.00 | 0.0100 to 0.0110 | 3 | 0.98 | 0.0178 |
Table 5. Starting gate value at 140M. Removed: sublayer applications removed by the end of training, of 32 in the standard model and 128 in the looped model. FLOPs per token: the carved model’s inference FLOPs as a fraction of the full-depth model’s. Lead: the carved model’s lead in bpb over the full-depth model.
What the runs learned
We show the “learning” process of Model Carving in Figure 9. The readings of the rate of learning lie on one power law per run, and indeed the exponent each run learns settles within or very closely near the published range. As sublayers leave, the projected end of the run moves later by design and the trainer rescales the pressure on every sublayer, and, without a schedule set by hand, the pressure falls to under a third of its starting value before the cooldown. The removals follow the rule of § 2.4, namely a sublayer’s margin is its estimated contribution to the loss over its pressure (Figure 10).
Figure 9. How the pressure follows the learning curve in Model Carving. Rows: standard (top) and looped (bottom) Transformers, and color representing model size. (a, e) Paired readings of the rate of learning against training tokens, and each run’s own fit at the end of training. (b, f) The exponent over training with the gray band indicating the published exponent values. (c, g) The gate pressure set by the forecasted rate of learning at the end of the run, (Equation (5)). The pressure continues until the cooldown freeze at 80% of training. (d, h) The share of the final removals made by each training fraction.
Figure 10. The pressure on each sublayer, and the margin for removal. (a, d) The factors of the pressure for the largest model of each family, namely the end rate , the tokens to come , the compute share of an MLP sublayer, and its pressure . (b, e) The margin over training, from means over the last 1,000 updates. (c, f) For each size, the margin of each removed sublayer just before its removal (gray) and the median margin of each kept sublayer over 60 to 80% of training (blue), and the bars being the medians.
Figure 11 shows the final topology of every carved model and Figure 12 the learned connection weights of the standard models. Interestingly, in every standard model, the largest connection weights sit in the first layers’ reads of the embedding.
Figure 11. The learned topology of all nine carved models. Blue: kept sublayer; gray: removed. The horizontal axis is relative depth within a loop, so models of different depth align. A standard model is one row, and a looped model is four rows with its loops 1 to 4 from top to bottom.
Figure 12. Learned connection weights of the standard carved models. Reading layer goes down, source layer goes across (0: the embedding), and both on relative depth. Purple: the layer input moves toward that source; orange: away from it. The looped models also read the outputs of the previous loop, which we did not draw.
The same network without removal. Figure 13 and Table 6 compare each standard carved model with the same overparameterized model with learned connections but without gate removals, trained for the same FLOPs. These DenseFormer-style models have the same inference cost as the full-depth model’s plus the connections, which is under 0.1% more FLOPs per token. They end about 0.006 bpb below full-depth models and 0.014 bpb below shallower-depth models. On CORE-22, the DenseFormer model scores 22.0 and 27.4 at 370M and 770M, against 22.0 and 27.2 for the carved models and 22.1 and 26.7 for the full-depth models. Therefore, as mentioned in § 6, Model Carving achieves about the same performance as the overparameterized DenseFormer control while saving inference FLOPs for free – 22% (standard) and 23% (looped) less inference FLOPs comparatively. Therefore, Model Carving achieves the performance of an overparameterized model at the efficiency of a smaller model.
| Model | Params (M) | Tokens (B) | Inference GFLOPs/token | Val. bpb | CORE-22 | |
| Looped Transformer | ||||||
| 370M | full-depth | 375 | 18.8 | 3.039 | 0.808 | 25.7 |
| DenseFormer-style | 375 | 18.8 | 3.046 | 0.794 | 27.5 | |
| carved | 375 | 22.6 | 2.358 | 0.788 | 28.5 | |
| Standard Transformer | ||||||
| 140M | full-depth | 151 | 7.6 | 0.352 | 0.926 | 15.7 |
| DenseFormer-style | 151 | 7.5 | 0.353 | 0.920 | 15.2 | |
| carved | 130 | 8.3 | 0.307 | 0.922 | 16.5 | |
| 370M | full-depth | 375 | 18.8 | 0.845 | 0.835 | 22.1 |
| DenseFormer-style | 375 | 18.8 | 0.845 | 0.831 | 22.1 | |
| carved | 296 | 22.8 | 0.672 | 0.832 | 22.0 | |
| 770M | full-depth | 802 | 40.1 | 1.745 | 0.769 | 26.7 |
| DenseFormer-style | 802 | 40.1 | 1.746 | 0.762 | 27.4 | |
| carved | 622 | 50.1 | 1.366 | 0.767 | 27.2 |
Table 6. Carved models run up to 23% fewer inference FLOPs than DenseFormer-style models. We compare the full-depth model, the DenseFormer-style model from § 6.1, and the carved model. Carved models achieve matched or better performance with fewer inference FLOPs.
Evaluation protocol
Validation window and bits per byte. Every model is evaluated on the same 16,384 held-out blocks of 2,048 tokens, which hold 151,467,293 target bytes. We convert each block back to bytes, split into documents at the end-of-text token, and retokenize with the evaluated model’s tokenizer. Bits per byte divides the summed loss by the byte count, so we can compare models with different tokenizers.
CORE-22 and the 13 stable tasks. CORE-22 (Li et al., 2024) centers each task’s accuracy at its random baseline, , and averages the 22 tasks with equal weight. We run lm-evaluation-harness 0.4.12 with few-shot seed 1234 for every model. We obtain our paired intervals for a CORE-22 difference by resampling the items within each task (2,000 replicates). The 13 stable tasks are HellaSwag (zero-shot and 10-shot), Jeopardy, BIG-bench QA Wikidata, ARC-Easy, ARC-Challenge, PIQA, OpenBookQA, LAMBADA, Winograd, WinoGrande, SQuAD and CoQA, which, as defined by Heineman et al. [28]; Madaan et al. (2024), are the tasks whose centered scores increase with model size and has a signal-to-noise ratio of at least 1.5.
Pass@. Every prompt starts with the start token, and we perform sampling with top- 1.0, no top-, and temperature 0.7. Our intervals use 10,000 paired bootstrap resamples over problems. When we say “the full-depth model’s inference allowance,” we mean the largest number of samples the carved model can draw before exceeding those of the full-depth model’s samples: 24 against 16 at standard 2.7B, 22 at standard 1.3B, 20 at looped 1.3B, and 8 at looped 140M or 10 at the other looped sizes against 8.
Data sources: openai/gsm8k (main), HuggingFaceH4/MATH-500, mandarjoshi/trivia_qa, rajpurkar/squad, EleutherAI/lambada_openai.
Decoding throughput. After GPU warmup, we time 256 decode steps with random-token prompts at 1,024, 4,096, and 8,192 tokens and batch sizes from 1 to each model’s largest tested batch. We test on one H100 80 GB GPU per pair in two modes: one compiled call per step, and one compiled loop over all 256 steps. Our equal-batch comparisons use four paired repeats in alternating order on the same GPU, and largest-batch rates use four repeats per model. Both models use bfloat16 matrix products, cuDNN prefill attention, and XLA decode attention.
Weight quantization. We quantize the weight matrices of both models of every pair to 8 bits by symmetric rounding per output channel, and to 6, 5, 4 and 3 bits with GPTQ [17] in groups of 64 columns calibrated on 128 training sequences. Figure 14 shows Model Carving’s lead at each precision (down to 4 bits in every pair except standard 2.7B, and down to 3 bits in the looped family).
Figure 14. How robust Model Carving is under weight quantization. Full-depth bpb minus carved bpb at the same weight precision, for (a) looped and (b) standard Transformers, with 95% intervals over runs of 64 validation sequences. We trained originally in 16 bits.
Downstream results
Table Table 7 gives the CORE-22 comparisons on all 22 tasks and on the 13 stable tasks (Appendix § 13), and Table 8 gives the pass@ comparisons.
| Family | Size | CORE-22 | Stable-13 |
| Looped | 140M | +1.06 [−0.03, +2.13] | +1.54 [+0.33, +2.73] |
| 370M | +2.75 [+1.76, +3.79] | +4.12 [+2.98, +5.25] | |
| 770M | +2.33 [+1.21, +3.48] | +3.83 [+2.75, +4.93] | |
| 1.3B | +0.84 [−0.26, +1.98] | +3.52 [+2.54, +4.51] | |
| Standard | 140M | +0.76 [−0.24, +1.81] | +1.09 [−0.10, +2.28] |
| 370M | −0.04 [−1.07, +0.95] | +0.12 [−0.97, +1.22] | |
| 770M | +0.45 [−0.52, +1.46] | +0.09 [−0.96, +1.22] | |
| 1.3B | +1.46 [+0.36, +2.51] | +0.43 [−0.56, +1.39] | |
| 2.7B | +0.99 [−0.07, +2.06] | +0.35 [−0.64, +1.33] |
Table 7. CORE-22 and stable-13 differences with paired 95% intervals over items (2,000 replicates).
| Task | Looped 140M | Looped 370M | Looped 770M | Looped 1.3B |
| Samples (full-depth / carved) | 8 / 8 | 8 / 10 | 8 / 10 | 8 / 10 |
| GSM8K | +0.011 [−0.003,+0.025] | +0.020 [+0.004,+0.037] | +0.026 [+0.009,+0.044] | +0.066 [+0.047,+0.084] |
| MATH-500 | +0.007 [−0.007,+0.021] | +0.011 [−0.005,+0.029] | −0.012 [−0.031,+0.006] | +0.030 [+0.009,+0.051] |
| TriviaQA | +0.009 [+0.006,+0.013] | +0.035 [+0.031,+0.039] | +0.069 [+0.065,+0.074] | +0.044 [+0.040,+0.049] |
| SQuAD | +0.046 [+0.040,+0.052] | +0.056 [+0.050,+0.062] | +0.063 [+0.058,+0.069] | +0.047 [+0.041,+0.052] |
| LAMBADA | +0.019 [+0.010,+0.028] | +0.056 [+0.047,+0.065] | +0.058 [+0.050,+0.067] | +0.052 [+0.044,+0.060] |
Table 8. Pass@ (temperature 0.7) of the looped pairs within the full-depth model’s inference allowance as a fraction of problems, with paired 95% intervals over problems.
Released models. We compare public, released models in Figure 3 and list every model with its CORE-22 score, training compute, and inference cost in Table 9. We rescore every released model with public weights with our own harness, requests, and seed (except Parcae, whose baselines have no public weights so we use the published means from Prairie et al. (2026)).
| Model | Tokens | Training FLOPs | GFLOPs per byte | CORE-22 |
| Looped Transformers | ||||
| Model Carving-140M | 7.9B | 0.241 | 19.9 | |
| Model Carving-370M | 22.6B | 0.522 | 28.5 | |
| Model Carving-770M | 52.1B | 1.05 | 33.5 | |
| Model Carving-1.3B | 82.7B | 1.81 | 36.0 | |
| Parcae-140M (Prairie et al., 2026) | 11.2B | 0.0887 | 13.5 | |
| Parcae-370M | 29.6B | 0.275 | 20.0 | |
| Parcae-770M | 61.6B | 0.607 | 24.1 | |
| Parcae-1.3B | 104.0B | 1.13 | 29.3 | |
| Huginn-3.5B (Geiping et al., [19]) | 800.0B | 25.1 | 40.7 | |
| Nanbeige4.2-3B (Nanbeige Lab et al., 2026) | 28T | (proxy) | – | 58.6 |
| Ouro-1.4B (Zhu et al., 2025b) | 7.7T | 2.41 | 54.7 | |
| Ouro-2.6B | 7.7T | 4.77 | 60.2 | |
| Standard Transformers | ||||
| Model Carving-140M | 8.3B | 0.0679 | 16.5 | |
| Model Carving-370M | 22.8B | 0.149 | 22.0 | |
| Model Carving-770M | 50.1B | 0.302 | 27.2 | |
| Model Carving-1.3B | 89.3B | 0.45 | 31.2 | |
| Model Carving-2.7B | 196.4B | 0.827 | 37.0 | |
| DataDecide-750M (Magnusson et al., 2025) | 75.0B | 0.317 | 27.8 | |
| DataDecide-1B | 100.0B | 0.538 | 30.5 | |
| Delphi-273M (Held & Marin Community, [29]) | 2.2B | 0.0789 | 11.3 | |
| Delphi-447M | 3.7B | 0.143 | 16.0 | |
| Delphi-669M () | 4.7B | 0.228 | 17.3 | |
| Delphi-669M () | 7.8B | 0.228 | 18.2 | |
| Delphi-1.4B | 10.6B | 0.516 | 23.0 | |
| Delphi-1.9B () | 14.8B | 0.744 | 25.8 | |
| Delphi-1.9B () | 24.7B | 0.744 | 27.7 | |
| Delphi-3.4B | 46.3B | 1.35 | 33.6 | |
| GPT-Neo-125M (Black et al., [6]) | 300.0B | 0.0595 | 13.2 | |
| OPT-125M (Zhang et al., 2022) | 180.0B | (proxy) | 0.0627 | 13.3 |
| OPT-350M | 180.0B | (proxy) | 0.166 | 17.1 |
| OPT-1.3B | 180.0B | (proxy) | 0.616 | 26.2 |
| OPT-2.7B | 180.0B | (proxy) | 1.23 | 31.3 |
| Pythia-410M (Biderman et al., [5]) | 299.9B | 0.175 | 19.8 | |
| Pythia-1B | 299.9B | 0.422 | 24.3 | |
| Pythia-1.4B | 299.9B | 0.611 | 27.0 | |
| Llama-3.2-1B (Meta AI, 2024) | 9T | (proxy) | 0.551 | 36.6 |
| OLMo-2-1B (Team OLMo, 2025) | 4T | 0.57 | 41.6 | |
| Qwen2.5-0.5B (Qwen Team, 2025) | 18T | (proxy) | 0.233 | 32.0 |
| Qwen2.5-1.5B | 18T | (proxy) | 0.707 | 46.9 |
| SmolLM2-360M (Ben Allal et al., [3]) | 4T | 0.188 | 31.6 | |
| SmolLM2-1.7B | 11T | 0.802 | 46.7 | |
| Parcae baseline-140M (Prairie et al., 2026) | 11.2B | 0.0336 | 13.0 | |
| Parcae baseline-370M | 29.6B | 0.0914 | 17.5 | |
| Parcae baseline-770M | 61.6B | 0.193 | 22.4 | |
| Parcae baseline-1.3B | 104.0B | 0.351 | 25.4 |
Table 9. CORE-22, training compute, and inference cost of the models in Figure 3. “proxy” marks an estimate that assumes a 2,048-token context. Inference cost is whole-model FLOPs per byte at the average generation context.
Decoding at every context and batch
We report the decoding throughput of the carved model relative to its full-depth model at each context and batch setting in Table 10 (see our protocol in Appendix § 13). The ratio grows with the batch, because the carved models move fewer weights and less key–value cache per step (Table 11). On one RTX PRO 6000 workstation GPU with one request at a time, the carved standard 1.3B model decodes 1.31 to 1.34 times faster than its full-depth model and the carved standard 2.7B model 1.42 to 1.44 times faster, at 1,024 and 4,096 tokens in both timings.
| Pair | Context | Batch 1 | Largest common | Full-depth | Model Carving | Per step | Loop |
| Looped 1.3B | 1,024 | 1.21 | 1.22 (71) | 71 | 83 | 1.26 | 1.31 |
| 4,096 | 1.26 | 1.22 (20) | 20 | 24 | 1.29 | 1.28 | |
| 8,192 | 1.27 | 1.21 (10) | 10 | 12 | 1.29 | 1.37 | |
| Standard 1.3B | 1,024 | 1.24 | 1.31 (273) | 273 | 328 | 1.35 | 1.33 |
| 4,096 | 1.26 | 1.33 (80) | 80 | 104 | 1.34 | 1.35 | |
| 8,192 | 1.27 | 1.33 (41) | 41 | 52 | 1.35 | 1.34 | |
| Standard 2.7B | 1,024 | 1.34 | 1.43 (163) | 163 | 209 | 1.46 | 1.51 |
| 4,096 | 1.39 | 1.45 (48) | 48 | 68 | 1.48 | 1.47 | |
| 8,192 | 1.42 | 1.45 (24) | 24 | 34 | 1.48 | 1.61 |
Table 10. Decoding throughput of the carved model relative to the full-depth model on one H100, by context and batch. Equal batch: the ratio at batch 1 and at the largest batch both models ran (in parentheses), per-step timing. Largest tested batch: each model’s largest tested batch before OOM with one compiled call per step and with one compiled loop over the 256 steps.
| Family | Size | Attention kept | Full-depth (KiB) | Model Carving (KiB) | Ratio |
| Looped | 140M | 61 of 64 | 192.0 | 183.0 | 0.95× |
| 370M | 67 of 80 | 360.0 | 301.5 | 0.84× | |
| 770M | 63 of 80 | 540.0 | 425.2 | 0.79× | |
| 1.3B | 76 of 96 | 768.0 | 608.0 | 0.79× | |
| Standard | 140M | 15 of 16 | 48.0 | 45.0 | 0.94× |
| 370M | 17 of 20 | 90.0 | 76.5 | 0.85× | |
| 770M | 17 of 20 | 135.0 | 114.8 | 0.85× | |
| 1.3B | 18 of 24 | 192.0 | 144.0 | 0.75× | |
| 2.7B | 22 of 32 | 320.0 | 220.0 | 0.69× |
Table 11. Key–value cache per token. A looped model stores one cache for each loop of each layer.
Pruning and distillation baselines
Table 12 gives the values of § 4.3 at standard 1.3B. Each pipeline prunes the full-depth model to approximately the inference FLOPs per token as the carved model and retrains it so that the full-depth training and the continued training of the pruned model match the carved run’s training FLOPs. The final row prunes the fully trained full-depth model instead and retrains with distillation at 1.21 times the carved run’s compute. Table 13 gives the students from Table 1.
Table 12: Pruning the full-depth 1.3B standard Transformer and retraining it, versus the carved model.
| Model | Compute | Val. bpb | CORE-22 | Model Carving − model |
| Model Carving | 1.00 | 0.727 | 31.2 | |
| Sheared-LLaMA-style, continued pretraining | 1.00 | 0.742 | 27.6 | +3.7 [+2.5, +4.8] |
| Minitron-style, distillation and cross-entropy | 1.00 | 0.761 | 28.1 | +3.1 [+2.0, +4.2] |
| ShortGPT-style, continued pretraining | 1.00 | 0.745 | 27.9 | +3.4 [+2.3, +4.5] |
| Minitron-style, final full-depth save, distillation only | 1.21 | 0.747 | 29.3 | +1.9 [+0.8, +3.1] |
Table 12.
Table 13: Students distilled from the full-depth model of the same size into the shallower-depth shape, against the carved model. Validation bits per byte and CORE-22 of both, and the CORE-22 difference, student minus carved, with its paired 95% interval over items (2,000 replicates). One training run per model.
| Pair | Val. bpb Student | Val. bpb Model Carving | CORE-22 Student | CORE-22 Model Carving | Student − Model Carving |
| Standard 140M | 0.947 | 0.922 | 14.23 | 16.51 | −2.28 [−3.31, −1.25] |
| Standard 370M | 0.855 | 0.832 | 19.80 | 22.04 | −2.24 [−3.22, −1.24] |
| Standard 770M | 0.789 | 0.767 | 25.26 | 27.17 | −1.91 [−2.92, −0.89] |
| Standard 1.3B | 0.749 | 0.727 | 29.73 | 31.23 | −1.50 [−2.51, −0.48] |
| Looped 140M | 0.915 | 0.883 | 17.92 | 19.92 | −2.00 [−3.09, −0.87] |
| Looped 370M | 0.828 | 0.788 | 23.81 | 28.48 | −4.66 [−5.67, −3.63] |
Table 13.
Compute-optimal size and overtraining
Table 14 lists the minima of the fitted curves of Figure 5, that is, at each budget, the parameter count and loss at which a quadratic in log parameters through the points of that budget is lowest. The carved minimum is lower at every budget, and the gap grows with the budget.
Table 14: Compute-optimal size and loss at each budget of Figure 5 from the fitted curves.
| Family | Budget (FLOPs) | Full-depth Params (M) | Full-depth bpb | Model Carving Params (M) | Model Carving bpb | Gap (bpb) | |
| Looped | 187 | 0.931 | 169 | 0.922 | −0.009 | 1.16 | |
| 441 | 0.868 | 353 | 0.857 | −0.011 | 1.25 | ||
| 579 | 0.840 | 494 | 0.826 | −0.014 | 1.31 | ||
| 688 | 0.826 | 618 | 0.812 | −0.014 | 1.32 | ||
| 951 | 0.807 | 878 | 0.791 | −0.016 | – | ||
| Standard | 436 | 0.895 | 289 | 0.890 | −0.005 | 1.10 | |
| 632 | 0.838 | 563 | 0.832 | −0.007 | 1.17 | ||
| 971 | 0.814 | 816 | 0.806 | −0.009 | 1.20 | ||
| 1,073 | 0.802 | 1,043 | 0.792 | −0.010 | 1.25 | ||
| 1,371 | 0.785 | 1,611 | 0.771 | −0.014 | – |
Table 14.
Overtraining. We trained two looped pairs a second time at larger budgets. The 370M pair at FLOPs, 2.55 times the budget of its main run, gives the full-depth model about 129 tokens per parameter, and it ends at 0.778 bits per byte versus the carved model at 0.758, the same as the main pair’s 0.020 with 45 of 160 sublayer applications removed. The 140M pair at FLOPs (3.8 times the budget of its main run) gives the full-depth model about 191 tokens per parameter, yet it ends at 0.853 bits per byte versus the carved model at 0.836 with 28 of 128 applications removed.
Seeds
We trained second carved seeds to evaluate whether Model Carving’s learned topologies and advantage remain stable across seeds (Table 15). In the standard family the two seeds remove nearly the same sublayers, and in the looped family the three larger pairs share most of the smaller set.
Table 15: Second carved seeds. Lead: full-depth minus carved validation bpb at equal training compute, with a 95% block-bootstrap interval over runs of 64 validation sequences, for seed 0 and seed 1. Our count is of closed gates at each completed run’s end.
| Pair | Lead, seed 0 | Lead, seed 1 | Closed gates (0 / 1 / shared) | Total | Seed 1 reached |
| Standard 140M | 0.0041 [0.0039, 0.0043] | 0.0038 [0.0035, 0.0040] | 5 / 5 / 5 | 32 | the end |
| Standard 370M | 0.0025 [0.0023, 0.0028] | 0.0033 [0.0030, 0.0035] | 9 / 10 / 8 | 40 | the end |
| Standard 1.3B | 0.0026 [0.0022, 0.0030] | 0.0028 [0.0024, 0.0032] | 14 / 13 / 13 | 48 | the end |
| Standard 2.7B | 0.0006 | – | 22 / 22 / 20 | 64 | update 19,600 of 187,311 |
| Looped 140M | 0.0152 [0.0150, 0.0154] | 0.0156 [0.0155, 0.0158] | 11 / 10 / 4 | 128 | the end |
| Looped 370M | 0.0202 | – | 36 / 26 / 20 | 160 | update 15,210 of 21,560 |
| Looped 770M | 0.0197 | – | 32 / 37 / 24 | 160 | update 6,511 of 49,730 |
| Looped 1.3B | 0.0206 | – | 42 / 49 / 39 | 192 | update 25,740 of 78,840 |
Table 15.
Instruction tuning
Table 16 shows the paired intervals of the instruct tuned models’ differences and the standard 1.3B pair tuned for two epochs. Tuning also increases each model’s loss on the pretraining validation window (Table 17) by 0.17 to 0.26 bits per byte with the default recipe, and by 0.02 to 0.03 with the gentler recipe.
Table 16: Tuned models: carved minus full-depth with paired 95% intervals, on CORE-22 over the 13 stable tasks (centered points) and on chat pass@k (fraction of problems) at equal samples (16 each) and within the nearly equal inference allowance (16 full-depth samples against 24, 22 or 20 carved).
| Pair, recipe | Measure | Equal samples (16 each) | Nearly equal allowance |
| Standard 1.3B, default | CORE-22 (13 stable) | +2.78 [+1.59, +3.93] | |
| Standard 1.3B, default | GSM8K | −0.015 [−0.041, +0.010] | +0.036 [+0.008, +0.064] |
| Standard 1.3B, default | TriviaQA | +0.007 [+0.002, +0.012] | +0.033 [+0.027, +0.038] |
| Standard 1.3B, default | SQuAD | +0.005 [−0.000, +0.011] | +0.023 [+0.018, +0.029] |
| Standard 1.3B, gentler | CORE-22 (13 stable) | +0.68 [−0.29, +1.68] | |
| Standard 1.3B, gentler | GSM8K | +0.014 [−0.009, +0.037] | +0.059 [+0.034, +0.085] |
| Standard 1.3B, gentler | TriviaQA | +0.002 [−0.003, +0.007] | +0.026 [+0.021, +0.032] |
| Standard 1.3B, gentler | SQuAD | +0.009 [+0.004, +0.015] | +0.026 [+0.020, +0.031] |
| Standard 2.7B, default | CORE-22 (13 stable) | +1.57 [+0.57, +2.64] | |
| Standard 2.7B, default | GSM8K | +0.019 [−0.006, +0.045] | +0.073 [+0.046, +0.101] |
| Standard 2.7B, default | TriviaQA | +0.023 [+0.018, +0.028] | +0.053 [+0.047, +0.058] |
| Standard 2.7B, default | SQuAD | −0.006 [−0.010, −0.001] | +0.009 [+0.005, +0.014] |
| Standard 2.7B, gentler | CORE-22 (13 stable) | −0.45 [−1.45, +0.54] | |
| Standard 2.7B, gentler | GSM8K | +0.027 [+0.002, +0.051] | +0.095 [+0.067, +0.123] |
| Standard 2.7B, gentler | TriviaQA | +0.002 [−0.003, +0.006] | +0.028 [+0.022, +0.033] |
| Standard 2.7B, gentler | SQuAD | +0.002 [−0.003, +0.007] | +0.020 [+0.015, +0.025] |
| Looped 1.3B, default | CORE-22 (13 stable) | +5.89 [+4.63, +7.13] | |
| Looped 1.3B, default | GSM8K | +0.058 [+0.032, +0.085] | +0.086 [+0.059, +0.114] |
| Looped 1.3B, default | TriviaQA | +0.055 [+0.050, +0.060] | +0.072 [+0.066, +0.077] |
| Looped 1.3B, default | SQuAD | +0.007 [+0.003, +0.012] | +0.014 [+0.010, +0.019] |
| Looped 1.3B, gentler | CORE-22 (13 stable) | +3.49 [+2.43, +4.57] | |
| Looped 1.3B, gentler | GSM8K | +0.034 [+0.009, +0.060] | +0.070 [+0.042, +0.096] |
| Looped 1.3B, gentler | TriviaQA | +0.041 [+0.036, +0.046] | +0.057 [+0.051, +0.062] |
| Looped 1.3B, gentler | SQuAD | +0.016 [+0.011, +0.020] | +0.024 [+0.019, +0.029] |
| Standard 1.3B, gentler, two epochs | CORE-22 (13 stable) | +1.54 [+0.56, +2.52] | |
| Standard 1.3B, gentler, two epochs | GSM8K | +0.010 [−0.017, +0.036] | +0.065 [+0.036, +0.094] |
| Standard 1.3B, gentler, two epochs | TriviaQA | +0.004 [−0.001, +0.009] | +0.028 [+0.022, +0.033] |
| Standard 1.3B, gentler, two epochs | SQuAD | +0.015 [+0.010, +0.021] | +0.031 [+0.025, +0.037] |
Table 16.
Table 17: Forgetting: the rise of each model’s loss on the pretraining validation window after tuning in bpb, and the difference, carved minus full-depth (negative: the carved model forgets less).
| Pair | Recipe | Full-depth | MODEL CARVING | Difference |
| Standard 1.3B | default | 0.227 | 0.224 | −0.003 [−0.004, −0.002] |
| Standard 1.3B | gentler | 0.031 | 0.029 | −0.002 |
| Standard 2.7B | default | 0.211 | 0.166 | −0.045 [−0.047, −0.043] |
| Standard 2.7B | gentler | 0.022 | 0.022 | +0.000 |
| Looped 1.3B | default | 0.263 | 0.253 | −0.010 [−0.010, −0.009] |
| Looped 1.3B | gentler | 0.034 | 0.034 | −0.000 |
Table 17.
Cooldown
Table 18 gives the gain of the final cooldown for every model. The carved model gains 10% to 16% less than its full-depth model at every size in both families, and the shallower-depth model gains as much as the full-depth model. We searched the shape of the cooldown, but it does not change the gain.
Table 18: Gain of the final cooldown, in bpb.
| Family | Size | Full-depth | Shallower | Ratio | MODEL CARVING | Ratio |
| Looped | 140M | 0.0807 | 0.0811 | 1.00 | 0.0692 | 0.86 |
| Looped | 370M | 0.0771 | 0.0782 | 1.02 | 0.0653 | 0.85 |
| Looped | 770M | 0.0739 | 0.0756 | 1.02 | 0.0623 | 0.84 |
| Looped | 1.3B | 0.0704 | – | – | 0.0611 | 0.87 |
| Standard | 140M | 0.0734 | 0.0743 | 1.01 | 0.0659 | 0.90 |
| Standard | 370M | 0.0718 | 0.0719 | 1.00 | 0.0615 | 0.86 |
| Standard | 770M | 0.0697 | 0.0699 | 1.00 | 0.0612 | 0.88 |
| Standard | 1.3B | 0.0677 | 0.0690 | 1.02 | 0.0596 | 0.88 |
Table 18.
We find that Model Carving’s smaller cooldown gain is present at every point of the constant-rate LR phase, not only at the end (Figure 15a): 100-update cooldowns from three saves of the standard 140M pair remove 0.90 to 0.91 times as much loss from the carved model as from the full-depth model, and the final cooldowns remove 0.90 times as much. Averaging weights along the constant-rate trajectory also removes less loss from the carved model in the same way (Figure 15b).
Figure 15. Cooldown and weight averaging helps the carved model less than non-carved models (140m) (a) Validation loss decrease from a linear decay of the learning rate to zero (100 updates) at updates 3,960, 4,680 and 5,400, and the final cooldowns. (b) Loss decrease by averaging weights at the peak learning rate. From each of the checkpoint updates above, we train for 200 more updates at the peak rate and average 20 copies, each 10 updates apart. The ratio above each pair is the carved value divided by full-depth value.
Synthetic tasks
Tasks. composition gives a sequence of up to eight permutations of five objects and asks for their composition (Liu et al., 2023). ListOps (Nangia & Bowman, 2018) gives as input a nested prefix expression over digits with the operators MIN, MAX, median and sum modulo ten, nested at most five deep, and asks for its value. Modular addition takes two numbers below 113 and asks for their sum modulo 113 (Nanda et al., 2023). Each input ends with a query token, and we apply the loss at that position only.
Model and pressure. We use a looped Transformer with three layers applied in four loops, width 64 and four attention heads, so 24 sublayer applications. The tasks have no natural training budget so we do not forecast the rate of learning on these tasks. Instead, we use a fixed value that replaces in Equation (5), of values 0.28 for , 0.4 for ListOps and 0.5 for modular addition. The training budget (for and ) is the full-depth model’s training FLOPs over about 1.05B tokens. Table 19 contains the final sublayers and accuracy.
| Task | Seed | Kept | Kept applications | Carved | Full-depth |
| Modular addition | 0 | 2 | attention of loop 3 layer 1 and of loop 4 layer 3 | 0.998 | – |
| 1 | 2 | attention of loop 3 layer 1 and of loop 4 layer 2 | 1.000 | – | |
| 2 | 2 | attention of loop 3 layer 1 and of loop 4 layer 2 | 0.764 | – | |
| ListOps | 0 | 6 | attention of loop 3 layers 1 and 2 and of loop 4 layers 2 and 3; MLP of loop 4 layers 2 and 3 | 0.861 | 0.851 |
| 1 | 4 | attention of loop 3 layers 1 and 2 and of loop 4 layer 3; MLP of loop 4 layer 3 | 0.851 | 0.862 | |
| 2 | 7 | attention of loop 3 layers 1 and 2 and of loop 4 layers 2 and 3; MLP of loop 3 layer 2 and of loop 4 layers 2 and 3 | 0.868 | 0.800 | |
| composition | 0 | 11 | attention of loop 2 layer 1; attention and MLP of loop 3 layers 1 to 3 and of loop 4 layers 2 and 3 | 1.000 | – |
| 1 | 11 | attention of loop 2 layer 2; attention and MLP of loop 3 layers 1 to 3 and of loop 4 layers 2 and 3 | 1.000 | – | |
| 2 | 11 | attention of loop 2 layer 1; attention and MLP of loop 3 layers 1 to 3 and of loop 4 layers 2 and 3 | 1.000 | – |
Table 19. Synthetic tasks. The sublayers each carved run keeps, and its exact match accuracy on the held-out test split.
References
- [1]Thomas C. Bachlechner, Bodhisattwa Prasad Majumder, Huanru Henry Mao, Garrison Cottrell, and Julian McAuley. ReZero is all you need: Fast convergence at large depth. arXiv preprint arXiv:2003.04887, 2020. URL https://arxiv.org/abs/2003.04887.
- [2]Sangmin Bae, Yujin Kim, Reza Bayat, Sungyun Kim, Jiyoun Ha, Tal Schuster, Adam Fisch, Hrary Harutyunyan, Ziwei Ji, Aaron C. Courville, and SeYoung Yun. Mixture-of-recursions: Learning dynamic recursive depths for adaptive token-level computation. In Advances in Neural Information Processing Systems, 2025. URL https://arxiv.org/abs/2507.10524.
- [3]Loubna Ben Allal et al. SmolLM2: When smol goes big—data-centric training of a small language model. arXiv preprint arXiv:2502.02737, 2025. URL https://arxiv.org/abs/2502.02737.
- [4]Shane Bergsma, Nolan Dey, Gurpreet Gosal, Gavia Gray, Daria Soboleva, and Joel Hestness. Power lines: Scaling laws for weight decay and batch size in LLM pre-training. In Advances in Neural Information Processing Systems, 2025. URL https://arxiv.org/abs/2505.13738.
- [5]Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O’Brien, Eric Hallahan, Mohammad Af lah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van der Wal. Pythia: A suite for analyzing large language models across training and scaling. In Proceedings of the 40th International Conference on Machine Learning, 2023. URL https://arxiv.org/abs/2304.01373.
- [6]Sid Black, Leo Gao, Phil Wang, Connor Leahy, and Stella Biderman. GPT-Neo: Large scale autoregressive language modeling with Mesh-Tensorflow, March 2021. URL https://doi.org/10.5281/zenodo.5297715. Version 1.0.
- [7]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. In Advances in Neural Information Processing Systems, 2020. URL https://arxiv.org/abs/2005.14165.
- [8]Ed Bullmore and Olaf Sporns. The economy of brain network organization. Nature Reviews Neuroscience, 13 (5):336–349, 2012. doi: 10.1038/nrn3214.DOI
- [9]Han Cai, Ligeng Zhu, and Song Han. ProxylessNAS: Direct neural architecture search on target task and hardware. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=HylVB3AqYm.arxiv.org/abs/1812.00332
- [10]Emmanuel J. Candès, Michael B. Wakin, and Stephen P. Boyd. Enhancing sparsity by reweighted ℓ₁ minimization. Journal of Fourier Analysis and Applications, 14(5–6):877–905, 2008. doi: 10.1007/s00041-008-9045-x.DOI
- [11]Gal Chechik, Isaac Meilijson, and Eytan Ruppin. Synaptic pruning in development: A computational account. Neural Computation, 10(7):1759–1777, 1998. doi: 10.1162/089976698300017124.DOI
- [12]Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, et al. Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021. URL https://arxiv.org/abs/2107.03374.
- [13]Karl Cobbe, Vineet Kosaraju, Mohammad Bavarian, Mark Chen, Heewoo Jun, Lukasz Kaiser, Matthias Plappert, Jerry Tworek, Jacob Hilton, Reiichiro Nakano, Christopher Hesse, and John Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021. URL https://arxiv.org/abs/2110.14168.
- [14]Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Lukasz Kaiser. Universal transformers. In International Conference on Learning Representations, 2019. URL https://arxiv.org/abs/1807.03819.
- [15]Tobias Domhan, Jost Tobias Springenberg, and Frank Hutter. Speeding up automatic hyperparameter optimization of deep neural networks by extrapolation of learning curves. In Proceedings of the Twenty-Fourth International Joint Conference on Artificial Intelligence, 2015. URL https://ijcai.org/proceedings/2015/0487.pdf.
- [16]Jonathan Frankle, Gintare Karolina Dziugaite, Daniel M. Roy, and Michael Carbin. Pruning neural networks at initialization: Why are we missing the mark? In International Conference on Learning Representations, 2021. URL https://arxiv.org/abs/2009.08576.
- [17]Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. GPTQ: Accurate post-training quantization for generative pre-trained transformers. In International Conference on Learning Representations, 2023. URL https://arxiv.org/abs/2210.17323.
- [18]Rao Fu, Zixuan Yang, Jiankun Zhang, Jing Ma, Hechang Chen, Yu Li, and Yi Chang. Simply stabilizing the loop via fully looped transformer. arXiv preprint arXiv:2605.18797, 2026. URL https://arxiv.org/abs/2605.18797.
- [19]Jonas Geiping, Sean McLeish, Neel Jain, John Kirchenbauer, Siddharth Singh, Brian R. Bartoldson, Bhavya Kailkhura, Abhinav Bhatele, and Tom Goldstein. Scaling up test-time compute with latent reasoning: A recurrent depth approach. In Advances in Neural Information Processing Systems, 2025. URL https://arxiv.org/abs/2502.05171.
- [20]Gemma Team. Gemma 3 technical report. arXiv preprint arXiv:2503.19786, 2025. URL https://arxiv.org/abs/2503.19786.
- [21]Ariel Gordon, Elad Eban, Ofir Nachum, Bo Chen, Hao Wu, Tien-Ju Yang, and Edward Choi. MorphNet: Fast & simple resource-constrained structure learning of deep networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 1586–1595, 2018.arxiv.org/abs/1711.06798
- [22]Alex Graves. Adaptive computation time for recurrent neural networks. arXiv preprint arXiv:1603.08983, 2016. URL https://arxiv.org/abs/1603.08983.
- [23]Andrey Gromov, Kushal Tirumala, Hassan Shapourian, Paolo Glorioso, and Daniel A. Roberts. The unreasonable ineffectiveness of the deeper layers. In International Conference on Learning Representations, 2025. URL https://arxiv.org/abs/2403.17887.
- [24]Alexander Hägele, Elie Bakouch, Atli Kosson, Loubna Ben Allal, Leandro von Werra, and Martin Jaggi. Scaling laws and compute-optimal training beyond fixed training durations. In Advances in Neural Information Processing Systems, 2024. URL https://arxiv.org/abs/2405.18392.
- [25]Song Han, Jeff Pool, John Tran, and William J. Dally. Learning both weights and connections for efficient neural networks. In Advances in Neural Information Processing Systems, 2015. URL https://proceedings.neurips.cc/paper_files/paper/2015/file/ae0eb3eed39d2bcbef4622b2499a05fe6-Paper.pdf.arxiv.org/abs/1506.02626
- [26]Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778, 2016.arxiv.org/abs/1512.03385
- [27]Shwai He, Guoheng Sun, Zheyu Shen, and Ang Li. What matters in transformers? not all attention is needed. arXiv preprint arXiv:2406.15786, 2024. URL https://arxiv.org/abs/2406.15786.
- [28]David Heineman, Valentin Hofmann, Ian Magnusson, Yuling Gu, Noah A. Smith, Hannah Hajishirzi, Kyle Lo, and Jesse Dodge. Signal and noise: A framework for reducing uncertainty in language model evaluation. In Advances in Neural Information Processing Systems, 2025. arXiv:2508.13144.arxiv.org/abs/2508.13144
- [29]Will Held and Marin Community. Scaling laws that extrapolate 300× past the fit, 2026. URL https://openphena.ai/blog/delphi/.
- [30]Dan Hendrycks, Collin Burns, Saurav Kadavath, Akul Arora, Steven Basart, Eric Tang, Dawn Song, and Jacob Steinhardt. Measuring mathematical problem solving with the MATH dataset. In Proceedings of the Neural Information Processing Systems Track on Datasets and Benchmarks, 2021. URL https://arxiv.org/abs/2103.03874.
- [31]Tom Henighan, Jared Kaplan, Mor Katz, Mark Chen, Christopher Hesse, Jacob Jackson, Heewoo Jun, Tom B. Brown, Prafulla Dhariwal, Scott Gray, Chris Hallacy, Benjamin Mann, Alec Radford, Aditya Ramesh, Nick Ryder, Daniel M. Ziegler, John Schulman, Dario Amodei, and Sam McCandlish. Scaling laws for autoregressive generative modeling. arXiv preprint arXiv:2010.14701, 2020.arxiv.org/abs/2010.14701
- [32]Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. URL https://arxiv.org/abs/1503.02531.
- [33]Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack W. Rae, Oriol Vinyals, and Laurent Sifre. Training compute-optimal large language models. In Advances in Neural Information Processing Systems, 2022. URL https://arxiv.org/abs/2203.15556.
- [34]Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. URL https://arxiv.org/abs/1608.06993.
- [35]Peter R. Huttenlocher. Synaptic density in human frontal cortex—developmental changes and effects of aging. Brain Research, 163(2):195–205, 1979. doi: 10.1016/0006-8993(79)90349-4.DOI
- [36]Hamish Ivison, Yizhong Wang, Valentina Pyatkin, Nathan Lambert, Matthew Peters, Pradeep Dasigi, Joel Jang, David Wadden, Noah A. Smith, Iz Beltagy, and Hannenah Hajishirzi. Camels in a changing climate: Enhancing LM adaptation with Tülu 2. arXiv preprint arXiv:2311.10702, 2023. URL https://arxiv.org/abs/2311.10702.
- [37]Keller Jordan, Yuchen Jin, Vlado Boza, You Jiacheng, Franz Cesista, Laker Newhouse, and Jeremy Bernstein. Muon: An optimizer for hidden layers in neural networks, 2024. URL https://kellerjordan.github.io/posts/muon/.
- [38]Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), 2017. URL https://aclanthology.org/P17-1147/.arxiv.org/abs/1705.03551
- [39]Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B. Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020. URL https://arxiv.org/abs/2001.08361.
- [40]Andrej Karpathy. nanochat: The best ChatGPT that $100 can buy, 2025. URL https://github.com/karpathy/nanochat.














