ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization
Abstract
Domain fit: AI-core · Core AI workload signals detected from paper context and implementation/artifact evidence.
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
Results and benchmarks
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.
| Task | Dataset | Metric | Value | Source |
|---|---|---|---|---|
| Transformer | Llama3 8B instruct | Sciq Accuracy. | 0.93 | paper-derived |
| Transformer | UIDL | Sciq Accuracy. | 0.687 | paper-derived |
| Transformer | Ours (LSTSQ) | Sciq Accuracy. | 0.89 | paper-derived |
Audit each benchmark finding before selecting an implementation path. Evidence refs map to the disclosure below.
Evidence graph: 4 refs, 4 links.
Utility signals: depth 100/100, grounding 95/100, status high.
Implementation
Best maintained implementation now
mts-ai/ReplaceMe
43 stars · 7 forks · Last push May 27, 2025
- License
- CI
- Dependencies
- Docker
Official implementation from Papers with Code · Repository link is mentioned in the paper metadata · Community adoption signal (43 stars)
mts-ai/replaceme is the strongest maintained implementation based on ranking signals.
Open mts-ai/replaceme- License metadata missing
- No CI workflows detected
- Dependency manifest is missing
- Selected mts-ai/replaceme as the strongest maintained implementation for new work.
- Repository activity is within the last 24 months.
Reproduction readiness
Major work
No dependency manifest, manual reconstruction required
- mts-ai/replaceme has no requirements.txt, environment.yml, pyproject.toml, or Dockerfile.
- You will need to reverse-engineer dependencies from import statements in the source code.
- Last push was 455 days ago.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Hugging Face artifacts
No direct paper-linked artifacts were found. Showing strongest curated related artifacts for faster exploration.
Models
- haining/scientific_abstract_simplification
15 downloads · 24 likes
Broaden model search
Datasets
No trustworthy datasets matches right now.
Search datasets on Hugging FaceSpaces
No trustworthy spaces matches right now.
Search spaces on Hugging FaceResearch context
Tasks
Transformer
Methods
Transformer
Domains
Natural Language Processing
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.
Data includes links from Papers with Code ( CC-BY-SA-4.0 ).