Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization

About

We introduce ReplaceMe, a generalized training-free depth pruning method that effectively replaces transformer blocks with a linear operation, while maintaining high performance for low compression ratios. In contrast to conventional pruning approaches that require additional training or fine-tuning, our approach requires only a small calibration dataset that is used to estimate a linear transformation, which approximates the pruned blocks. The estimated linear mapping can be seamlessly merged with the remaining transformer blocks, eliminating the need for any additional network parameters. Our experiments show that ReplaceMe consistently outperforms other training-free approaches and remains highly competitive with state-of-the-art pruning methods that involve extensive retraining/fine-tuning and architectural modifications. Applied to several large language models (LLMs), ReplaceMe achieves up to 25\% pruning while retaining approximately 90\% of the original model's performance on open benchmarks - without any training or healing steps, resulting in minimal computational overhead. We provide an open-source library implementing ReplaceMe alongside several state-of-the-art depth pruning techniques, available at https://github.com/mts-ai/ReplaceMe

Dmitriy Shopkhoev, Ammar Ali, Magauiya Zhussip, Valentin Malykh, Stamatios Lefkimmiatis, Nikos Komodakis, Sergey Zagoruyko• 2025

Related benchmarks

TaskDatasetResultRank
Commonsense ReasoningHellaSwag
Accuracy65.7
1460
Language ModelingWikiText
PPL34
479
Physical Interaction Question AnsweringPIQA
Accuracy71.1
323
Question AnsweringARC-E
Accuracy65.9
242
Question AnsweringSciQ
Accuracy86.4
226
Multitask Language UnderstandingMMLU
Accuracy46.4
206
Language ModelingLAMBADA
Accuracy42.1
183
Reading ComprehensionRACE
Accuracy35.4
151
Science Question AnsweringARC-E
Accuracy65.9
138
Science Question AnsweringARC-C
Accuracy43.7
127
Showing 10 of 29 rows

Other info

Follow for update