Recent work has shown that layer pruning can effectively compress large language models (LLMs) while retaining strong performance on classification benchmarks, often with little or no finetuning. In contrast, generative reasoning tasks, such as GSM8K and HumanEval\textsuperscript{+}, exhibit substantially weaker recovery. We show that beyond surface-level text degradation, pruning leads to a loss of key algorithmic capabilities, including arithmetic computation and balanced parenthesis generation. Under realistic post-training constraints, using a single 80GB GPU and without access to pretraining-scale data or compute, we evaluate a simple recovery strategy based on supervised finetuning with self-generated responses. This approach recovers up to 90% of baseline performance on classification tasks, but recovery for generative reasoning remains limited. We further find that this gap persists even under a favorable task-aligned recovery setting, where pruned models are fully finetuned on self-generated GSM8K responses, suggesting that the degradation is not merely due to generic instruction data or parameter-efficient tuning. As complementary evidence, we analyze a depth-pruned model trained with nearly 100B post-pruning tokens and find that deficits persist even on simple arithmetic tasks that do not require multi-step generation. Overall, we characterize practical recovery limits of layer pruning for generative reasoning and provide guidance on when depth reduction is effective under constrained post-training regimes.
Figures & tables
Figure 1: Comparison of performance retention (normalized to baseline) between SFT with open source data versus SGR (our method), with BI and Reverse pruning metrics at 25% pruning ratio. Full results in A.10 .
Figure 2: Full Finetuning with GSM8K train set with SGR and evaluation on GSM8K test.
Figure 3: Effect of removing a single layer on model performance across generative benchmarks. Reasoning-intensive tasks such as GSM8K and HumanEval + exhibit severe performance degradation at specific layers, while XSUM remains comparatively robust except for layers whose removal induces general text degeneration. (We generally skip layer 0 for its poor results.)
Figure 4: Text degeneration under single-layer pruning, measured using 4-gram repetition (left) and Self-BLEU4 averaged across responses and normalized relative to the baseline.
Figure 5: Analysis of model performance and error types under single-layer pruning.
Figure 6: Comparison of model performance under pruning and recovery.
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7: Change in average generated response length after single-layer pruning, relative to the unpruned baseline.
Figure 8: Effect of single-layer pruning on the arithmetic ability of various models.
Model
HeSw
PIQA
MMLU
Wino
OBQA
ARC-E
ARC-C
Mean
Gemma2-2B-It
Reverse-order*
0.844
0.893
0.925
0.941
0.747
0.785
0.736
0.839
PPL*
0.859
0.948
0.616
0.837
0.826
0.867
0.706
0.808
Magnitude-L1*
0.844
0.951
0.475
0.804
0.854
0.895
0.730
0.793
Magnitude-L2*
0.791
0.918
0.424
0.789
0.669
0.812
0.594
0.714
BI*
0.796
0.880
0.874
0.957
0.758
0.805
0.725
0.828
Appendix
Table 1: Performance retention on classification benchmarks across Gemma and Llama with various pruning strategies. LoRA-trained results from ( Lu et al., 2024 ) are marked with an asterisk (*). QLoRA results largely match or outperform LoRA trained models across various pruning strategies showing consistent > 80% performance retention. HeSw = HellaSwag, Wino = Winogrande, OBQA = OpenBookQA.
Figure 9: Full Finetuning with GSM8K dataset.
Figure 10: Comparison between full supervised finetuning (Full-FT) and QLoRA on self-generated Dolci data.
Model
Recovery Strategy
GSM8K Retention
Qwen2.5-7B-Instruct
Unpruned baseline
1.000
BI pruning + SFT on Dolci
0.270
BI pruning + SGR on S.Dolci
0.329
BI pruning + SGR + RLVR
0.418
Mistral-7B-Instruct-v0.3
BI pruning + SFT on Dolci
0.236
BI pruning + SGR on S.Dolci
0.395
Appendix
Table 2: GSM8K results under successive post-pruning RLVR for Qwen2.5-7B-Instruct and Mistral-7B-Instruct-v0.3, each with seven layers removed using BI. Qwen and the Mistral results are reported as retention normalized to their respective unpruned baselines.
Figure 11: Perplexity curves during training for both standard finetuning and for SGR for the Qwen and Mistral models (Both are BI pruned: 25%).
Classification
Generative
Model
HeSw
PIQA
MMLU
Wino
OBQA
ARC-E
ARC-C
Mean
GSM8K
HumEval +
MBPP +
XSUM
Mean
Gemma2-2B-It
Open-source data
Reverse + Alpaca
0.844
0.893
0.925
0.941
0.747
0.785
0.736
0.839
0.040
0.119
0.029
0.814
0.251
BI + Alpaca
0.796
0.880
0.874
0.957
0.758
0.805
0.725
0.828
0.042
0.153
0.099
0.809
0.276
Reverse + Dolci
0.736
0.857
0.930
0.945
0.702
0.816
0.708
0.813
0.129
0.219
0.121
0.763
0.308
Appendix
Table 3: Performance retention (normalized to baseline). Results marked with (*) are sourced from ( Lu et al., 2024 ) . SGR is our method with the pruning metric in parentheses. Reverse, BI, and Iterative (described in Algorithm 1 ) indicate the pruning order, while Alpaca and Dolci denote the training data source; S.Alpaca and S.Dolci refer to self-generated variants of the corresponding datasets. ↑/↓ indicate improvement or degradation in mean retention of our SGR approach with respect to the standard approach of doing SFT with the open-source prompts and responses.
Classification
Generative
Model
HeSw
PIQA
MMLU
Wino
OBQA
ARC-E
ARC-C
Mean
GSM8K
HumEval +
MBPP +
XSUM
Mean
Gemma2-2B-It
Open-source data
Reverse + Alpaca
0.453
0.703
0.526
0.655
0.266
0.635
0.376
0.516
0.024
0.043
0.011
0.158
0.059
BI + Alpaca
0.427
0.692
0.497
0.666
0.270
0.651
0.370
0.511
0.025
0.055
0.037
0.157
0.069
Reverse + Dolci
0.395
0.674
0.529
0.658
0.250
0.660
0.362
0.504
0.077
0.079
0.045
0.148
0.087
Appendix
Table 4: Raw performance of the pruned models across classification and generative benchmarks. SGR is our method with the pruning metric in parentheses. Reverse, BI, and Iterative (described in Algorithm 1 ) indicate the pruning order, while Alpaca and Dolci denote the training data source; S.Alpaca and S.Dolci refer to self-generated variants of the corresponding datasets.
Figure 12: Average accuracy on generative tasks for Qwen and LLaMA across pruning strategies and ratios, alongside model throughput. Throughput (tokens/s) is shown on the secondary axis (dotted line). Even at moderate pruning ratio (25%), a substantial gap remains in generative vs classification tasks. Additional details are provided in Appendix A.12 .
Pruning Level
Throughput (tok/s)
Speedup
GPU Mem (GB)
LLaMA-3.1-8B-Instruct
Base
35.73
1.00 ×
14.96
∼ 10% pruned
40.37
1.13 ×
13.74
∼ 18% pruned
43.75
1.23 ×
12.52
∼ 25% pruned
46.30
1.30 ×
11.71
Qwen2.5-7B-Instruct
Appendix
Table 5: Throughput and memory under BI pruning at moderate pruning ratios. Pruning levels are grouped into approximate percentages of removed layers.
Method
GSM8K
HumanEval
MBPP
XSUM
Average
Qwen
2 Layers Pruned
BI
0.878
0.692
0.709
0.906
0.796
Iterative
0.940
0.817
0.736
0.930
0.856
Reverse
0.946
0.950
0.793
0.925
0.904
3 Layers Pruned
Appendix
Table 6: Retention on generative benchmarks under increasing pruning levels. We report results on GSM8K, HumanEval, MBPP, and XSUM. Average denotes the mean recovery across benchmarks.
Figure 13: Differences between finetuning with Self-Generated Responses (SGR) vs on Dolci dataset directly for the Qwen Model. At all pruning ratios, SGR is consistently better than the raw dataset.
Recovery setting
GSM8K
HumEval +
MBPP +
XSUM
Mean
QLoRA, S.Dolci (main setting)
0.294
0.207
0.315
0.175
0.248
Full FT, S.Dolci
0.415
0.220
0.310
0.158
0.276
QLoRA, 1M SGR ( 10× )
0.479
0.299
0.206
0.145
0.282
Appendix
Table 7: Raw generative benchmark scores of BI-pruned Qwen2.5-7B-Instruct (seven layers removed) under larger recovery budgets. The first row is taken from Table 4 .
Recovery setting
GSM8K
HumEval +
MBPP +
XSUM
Mean
QLoRA, S.Dolci (main setting)
0.329
0.283
0.398
0.861
0.468
Full FT, S.Dolci
0.464
0.300
0.391
0.781
0.484
QLoRA, 1M SGR ( 10× )
0.536
0.408
0.261
0.715
0.480
Appendix
Table 8: Performance retention (normalized to the unpruned baseline) for the settings in Table 7 . The first row is taken from Table 3 .
Qwen2.5-7B-Instruct
Single-token
Autoregressive
Unpruned
96.0
80.0
Pruned
37.0
22.0
Pruned + SGR
74.0
59.0
Appendix
Table 9: Arithmetic accuracy (%) under single-token prediction and autoregressive generation.
Qwen2.5-7B-Instruct
Accuracy (%)
Unpruned
85.0
Pruned
40.0
Pruned + SGR
49.5
Appendix
Table 10: Accuracy on 200 synthetic bracket-completion examples.
Qwen2.5-7B-Instruct
Logic
Arithmetic only
Both
Extraction
Unpruned
67
14
1
18
Pruned + SGR
66
23
5
6
Appendix
Table 11: Error categories for 100 randomly sampled incorrect GSM8K outputs per model.
Model
Training-data accuracy (%)
Qwen2.5-7B-Instruct
94.3
Llama-3.1-8B-Instruct
86.0
Mistral-7B-Instruct-v0.3
42.6
Appendix
Table 12: Accuracy of the self-generated GSM8K training responses used for task-aligned recovery (Appendix A.7 ).
Structured pruning reduces the size of large language models, often at the cost of lower accuracy. Whether this decline reflects diminished reasoning capacity or greater difficulty in sampling correct solutions is less clear. We examine this question across expert, FFN and layer pruning on four mathematical and coding benchmarks, comparing original and pruned models through pass@k at matched sampling budgets. Even after substantial pruning, some models match or exceed the original model's reasoning coverage despite lower pass@1, and solve problems left unsolved in the original samples. Retaining broad coverage, however, does not mean that correct solutions remain easy to obtain. Under severe pruning, diverse generated chain-of-thought (CoT) traces can coexist with increased repetition and less reliable generation. As correct answers become harder to sample, the additional attempts can sharply increase total token use even when individual responses become shorter. This separation between coverage and sampling efficiency also clarifies expert-selection gains, as methods with markedly different pass@1 can solve the same problems at large budgets yet require different numbers of attempts to reach a common coverage target. Pruning should therefore be assessed by both the range of problems a model can still solve and the sampling cost of obtaining correct solutions.
Structured pruning reduces LLM inference costs by removing model components to produce smaller dense models. However, existing methods can cause reasoning performance to collapse on long-form reasoning tasks such as AIME. We propose LayerTrim, a training-free structured pruning method that identifies redundant decoder layers and selectively trims their MLP features while preserving attention and decoder depth. LayerTrim is the first training-free structured pruning method designed to preserve long-form reasoning without gradients or recovery training. Across three reasoning language models and five benchmarks, LayerTrim outperforms existing structured pruning methods in most evaluated settings, improving average accuracy by up to 21.4 percentage points over RESP. On Qwen3-14B, LayerTrim achieves 1.24× faster prefill and 19.7% lower peak GPU memory than the dense model, while better preserving reasoning ability. It also achieves the shortest average generation length among evaluated pruned models, while retaining the highest average accuracy. These results demonstrate that LayerTrim improves reasoning efficiency through both structural compression and reduced token generation.
Woosang Lim, Haneul Yoo, Vincent-Daniel Yun +1
Seoul National University, Republic of Korea · New York University, United States · University of Southern California, United States
Layer-level pruning is attractive for large language model (LLM) deployment as it reduces the model size while preserving a dense architecture that can be efficiently executed on standard hardware. Current methods typically follow a one-shot paradigm, which first removes selected layers to reach a target model size and then performs additional training to recover model capabilities. However, pruning directly to the target size can substantially degrade reasoning capabilities, making subsequent recovery more difficult under a limited training budget. Moreover, this paradigm separates layer selection from recovery, limiting the use of recovery information to guide selection and potentially hindering the recovery of reasoning capabilities. To address these limitations, we propose LOOP, a Layer-level Recovery-Oriented On-Policy Pruning framework that interleaves pruning and recovery across multiple shots. In each shot, LOOP removes a single layer and performs short on-policy distillation, mitigating the abrupt degradation in reasoning capabilities associated with one-shot pruning. To guide layer selection in subsequent shots, LOOP reuses on-policy trajectories and optimization signals from recovery to jointly assess each remaining layer's reasoning contribution and recovery sensitivity, thereby making layer selection recovery-aware. Evaluations on several benchmarks show that LOOP consistently outperforms one-shot baselines in average accuracy across different model scales and pruning ratios.
Liang Xu, Shufan Shen, Zhongni Hou +4
State Key Lab. of AI Safety, Institute of Computing Technology, Chinese Academy of Sciences · University of Chinese Academy of Sciences · Meituan