Research map / Architectures and efficiency / Pruning and efficient tuning
ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes ReplaceMe, a training-free depth pruning method that replaces a contiguous block of transformer layers with a linear transform estimated on a small calibration set and fused into the MLP down-projection.
Problem
Depth pruning of large transformers usually requires costly post-pruning healing/retraining to recover performance; the paper targets pruning transformer blocks without any training while retaining most accuracy.
Approach
Select a contiguous block of layers by cosine distance between hidden states before and after the cut, then estimate a single linear transform (closed-form least squares or numerically optimized cosine objective) mapping the MLP output of the cut block to the output of the block after the removed span, merged into the MLP down-projection so no parameters are added.
Key results
- On Llama 2 7B at 25% compression without healing, Ours (Cosine) reaches 41.9 average accuracy, 92.5% relative performance, above the healed UIDL (40.9, 90.3%).
- On Llama 3 8B Instruct at 25% pruning, ReplaceMe cosine achieves Lambada perplexity 15.88 and 90.9% RP versus UIDL's 2216.96 perplexity and 82.5% RP.
- On CLIP ViT-L/14 at 13% compression, ReplaceMe (LS) stays close to the original on most benchmarks and outperforms UIDL at both 13% and 25%.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Replace selected blocks with a cosine-estimated linear transform rather than UIDL pruning | Llama 2 7B · 25% pruning, benchmark average | AVG accuracy: 40.9 -> 41.9 | Helped |
| Use cosine estimation rather than least-squares estimation (ablation) | ReplaceMe on Llama 2 7B · 25% pruning, benchmark average | AVG accuracy: 40.7 -> 41.9 | Helped |
| Use non-consecutive multiple linear transforms instead of one cosine-estimated transform (ablation) | ReplaceMe on Llama 3 8B Instruct · 25% pruning | Lambada OpenAI perplexity: 15.88 -> 13.95 | Helped |
| Use non-consecutive multiple linear transforms instead of one cosine-estimated transform (ablation) | ReplaceMe on Llama 3 8B Instruct · 25% pruning | Avg-acc: 0.63 -> 0.63 | No clear effect |
| Use instruction-style SlimOrca calibration instead of plain-text FineWeb calibration (ablation) | ReplaceMe (LS) on Llama 3 8B · 25% pruning | Avg-acc: 0.56 -> 0.62 | Helped |
| Use instruction-style SlimOrca calibration instead of plain-text FineWeb calibration (ablation) | ReplaceMe (Cosine) on Llama 3 8B · 25% pruning | Avg-acc: 0.58 -> 0.63 | Helped |
| Use self-generated calibration data instead of SlimOrca (ablation) | ReplaceMe (Cosine) on Llama 3 8B · 25% pruning | Perplexity: 15.90 -> 13.24 | Helped |
| Use self-generated calibration data instead of SlimOrca (ablation) | ReplaceMe (Cosine) on Llama 3 8B · 25% pruning | Avg-acc: 0.63 -> 0.61 | Hurt |
| Add L2 regularization with alpha 1000 to the LS objective (ablation) | ReplaceMe on Llama 3 8B · 25% pruning | Perplexity: 21.2 -> 20.8 | Helped |
| Add L2 regularization with alpha 10000 to the LS objective (ablation) | ReplaceMe on Llama 3 8B · 25% pruning | Avg-acc: 0.624 -> 0.626 | Helped |
| Add L1 regularization with alpha 1×10^-4 to the cosine objective (ablation) | ReplaceMe on Llama 3 8B · 25% pruning | Avg-acc: 0.634 -> 0.638 | Helped |
| Add L1 regularization with alpha 1×10^-4 to the cosine objective (ablation) | ReplaceMe on Llama 3 8B · 25% pruning | Perplexity: 15.9 -> 22.1 | Hurt |
Surprising findings
- Diagonal-only linear transforms recover accuracy comparably to generic matrices, while orthonormal (rotation-only) transforms give limited recovery, suggesting scaling matters more than rotation.
- Using self-generated calibration data lowers perplexity but tends to reduce downstream benchmark accuracy.
Limitations
- Effective only for reasonable compression ratios; high compression (e.g., 37.5-50%) requires healing of the linear transform.
- Performance degrades on math-heavy benchmarks for some models (e.g., Llama 3 variant marginal drop on math tasks).
- Perplexity remains notably higher than the uncompressed model (e.g., 15.88 vs 3.11) even when accuracy is retained.
Experimental setup
Datasets: SlimOrca FineWeb Arcee Aya MIMIC
Benchmarks: C3 CMNLI CHID WSC HellaSwag PIQA Race-M Race-H MMLU CMMLU Winogrande BoolQ
Metrics: accuracy average accuracy perplexity relative performance (RP) CO2 emissions
Baselines: LLM-Streamline LLM-Pruner SliceGPT LaCo UIDL SVD-LLM
Builds on: ShortGPT UIDL LLM-Streamline SliceGPT
Closest papers by meaning
- Streamlining Redundant Layers to Compress Large Language Models (ICLR 2025 · similarity 0.88)
- Fluctuation-Based Adaptive Structured Pruning for Large Language Models (AAAI 2024 · similarity 0.88)
- Týr-the-Pruner: Structural Pruning LLMs via Global Sparsity Distribution Optimization (NeurIPS 2025 · similarity 0.87)
- Sparsest Models Elude Pruning: An Exposé of Pruning’s Current Capabilities (ICML 2024 · similarity 0.87)
- SlimGPT: Layer-wise Structured Pruning for Large Language Models (NeurIPS 2024 · similarity 0.87)
- SLEB: Streamlining LLMs through Redundancy Verification and Elimination of Transformer Blocks (ICML 2024 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
