Abstract
Large language models (LLMs) enable unparalleled few- and zero-shot reasoning capabilities but at a high computational footprint. While quantization is effective, other compression methods like pruning often struggle to maintain performance without extensive retraining. This work introduces LayerChop, an "embarrassingly simple" approach that combines deterministic layer pruning with continued self-supervised pretraining. At the 7B parameter scale, LayerChop outperforms complex semi-structured pruning and knowledge distillation, providing a 1.84x inference speedup with minimal performance loss.
Introduction
The rapid advancement of Large Language Models (LLMs) has brought transformative capabilities to natural language processing, yet their deployment remains constrained by massive computational requirements. Most existing compression research, rooted in the "BERT era," focuses on encoder-only models and task-specific fine-tuning. However, modern LLMs are decoder-only and valued for their general-purpose, zero-shot capabilities.
Current LLM pruning methods often prioritize "one-shot" execution to avoid the high cost of retraining. Unfortunately, this frequently leads to significant performance degradation. We argue that the "pretrain-then-finetune" paradigm has been overlooked in LLM compression. By treating continued pretraining as a recovery phase for a pruned model, we can reclaim reasoning capabilities lost during structural modification.
Methodology: The CHOP Strategies
We explore two primary strategies for structural compression:
- LayerChop (Depth Pruning): This method deterministically removes 50% of the model's layers. Our ablation studies indicate that retaining the first and last layers—which handle embeddings and final outputs—while removing a "max-gap" of middle layers yields the best results.
- DimCHOP (Width Pruning): Adapted from the PLATON algorithm, this approach uses a "sensitivity score" based on the magnitude of the gradient-weight product and an uncertainty metric to mask specific dimensions across all weight matrices.
The critical innovation is the subsequent phase: continued self-supervised pretraining. Following the "chop," models are refined on a large corpus, allowing remaining weights to adapt to the reduced architecture.
Experimental Setup
Models were refined using the C4 (Colossal Clean Crawled Corpus), with training spanning approximately 160 billion tokens. Evaluation focused on zero-shot reasoning across six diverse tasks: PIQA, Hellaswag, Winogrande, OpenBookQA, SciQ, and Arc-Easy.
Results and Discussion
Performance Recovery and Scaling
A key finding is that while a 50% pruned model initially suffers a massive performance drop, continued pretraining enables significant recovery. As shown in Figure 5, LayerChop models consistently approach or exceed the performance of models pretrained from scratch with equivalent parameter counts across various scales (300M to 7B).
Comparison with State-of-the-Art
At the 7B scale, LayerChop demonstrates superior efficiency compared to sophisticated semi-structured methods. While 2:4 pruning (e.g., Wanda, SparseGPT) is hardware-friendly, LayerChop provides a better end-to-end speedup (1.84x vs 1.24x) by reducing the total operation count. As illustrated in Figure 1, LayerChop achieves lower perplexity (better performance) than these semi-structured alternatives at the 7B scale.
The Inefficiency of Distillation
In contrast to smaller BERT-style models where knowledge distillation is highly effective, we found it inefficient at the 7B scale. The computational overhead of maintaining a teacher model during training outweighs the benefits when compared to the simplicity of LayerChop's continued pretraining.
Conclusion
LayerChop proves that "embarrassingly simple" layer pruning, when coupled with sufficient recovery training, is a highly effective strategy for LLM compression. It offers a compelling alternative to complex pruning and distillation methods, particularly at the 7B scale. Future work will investigate the scalability of this approach to 70B+ parameter models and conduct ethical audits to ensure compressed models do not amplify dataset biases.
Summary updated