Sliding-Window Merging for Compacting Patch-Redundant Layers in LLMs
Not on the map. Why?
Abstract (arXiv)
Depth-wise pruning accelerates LLM inference in resource-constrained scenarios but suffers from performance degradation due to direct removal of entire Transformer layers. This paper reveals ``Patch-like'' redundancy across layers via correlation analysis of the outputs of different layers in reproducing kernel Hilbert space, demonstrating consecutive layers exhibit high functional similarity. Building on this observation, this paper proposes Sliding-Window Merging (SWM) - a dynamic compression method that selects consecutive layers from top to bottom using a pre-defined similarity threshold, and compacts patch-redundant layers through a parameter consolidation, thereby simplifying the model structure while maintaining its performance. Extensive experiments on LLMs with various architectures and different parameter scales show that our method outperforms existing pruning techniques in both zero-shot inference performance and retraining recovery quality after pruning. In particular, in the experiment with 35% pruning on the Vicuna-7B model, our method achieved a 1.654% improvement in average performance on zero-shot tasks compared to the existing method. Moreover, we further reveal the potential of combining depth pruning with width pruning to enhance the pruning effect. Our codes are available at https://github.com/920927/SLM-a-sliding-layer-merging-method.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Builds on 21 of its 33 references that are in the map. First posted on arXiv 26 Feb 2025.
Builds on
21 of 33 references.
References · 21
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,710
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2015Aligning Books and Movies: Towards Story-like Visual Explanations by Watching Movies and Reading Bookscited by 1,041
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2019Are Sixteen Heads Really Better than One?cited by 803
9 more
- 2021Do Vision Transformers See Like Convolutional Neural Networks?cited by 671
- 2023FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUcited by 567
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
- 2021Block Pruning For Faster Transformerscited by 176
- 2022A Fast Post-Training Pruning Framework for Transformerscited by 161
- 2024SLEB: Streamlining LLMs through Redundancy Verification and Elimination of Transformer Blockscited by 96
- 2023ZipLM: Inference-Aware Structured Pruning of Language Modelscited by 46
- 2023What Matters In The Structured Pruning of Generative Language Models?cited by 30
- 2023Gradient-Free Structured Pruning with Unlabeled Datacited by 26
Built on by
Citing papers per year: 2025: 3; 2026: 5.
8 papers.
- 2025A Survey on Collaborative Mechanisms Between Large and Small Language Modelscited by 12
- 2025DipSVD: Dual-importance Protected SVD for Efficient LLM Compressioncited by 7
- 2025LLM Embedding-based Attribution (LEA): Quantifying Source Contributions to Generative Model's Response for Vulnerability Analysiscited by 2
- 2026LLM Compression by Block Removal with Constrained Binary Optimizationcited by 1
- 2026No Free Swap: Protocol-Dependent Layer Redundancy in Transformerscited by 1
- 2026Addressable Recall Compaction for Long Context-Window Control in AI Agentscited by 1
- 2026Unifying Depth and Width Pruning for LLMs via Binary Knapsack Optimizationcited by 0
- 2026XMerge: Cross-Axis Selection and Reconstructive Layer Merging for LLM Depth Compressioncited by 0
- 2026XMerge: Cross-Axis Selection and Reconstructive Layer Merging for LLM Depth Compression2 Sep 2026
- 2026Unifying Depth and Width Pruning for LLMs via Binary Knapsack Optimization13 Aug 2026
- 2026Addressable Recall Compaction for Long Context-Window Control in AI Agents27 Jul 2026
- 2026No Free Swap: Protocol-Dependent Layer Redundancy in Transformers15 May 2026
- 2026LLM Compression by Block Removal with Constrained Binary Optimization29 Jan 2026
- 2025DipSVD: Dual-importance Protected SVD for Efficient LLM Compression25 Jun 2025
- 2025LLM Embedding-based Attribution (LEA): Quantifying Source Contributions to Generative Model's Response for Vulnerability Analysis12 Jun 2025
- 2025A Survey on Collaborative Mechanisms Between Large and Small Language Models12 May 2025