Introduction
As Large Language Models (LLMs) scale to hundreds of billions of parameters, the hardware requirements for inference have become a significant bottleneck. While quantization offers a path to reduced numerical precision, structured pruning—the physical removal of redundant components like attention heads or neural network layers—remains a formidable challenge.
Traditional pruning methods often require full-parameter gradient calculations, which are computationally prohibitive for LLMs. Conversely, "one-shot" pruning methods, while fast, typically rely on simple heuristics that can lead to catastrophic drops in reasoning and generalization. Compresso addresses this gap by introducing a training-based pruning framework that transforms the LLM from a passive object of compression into an active collaborator.
Methodology: The Compresso Framework
Compresso introduces three primary innovations to make structured pruning viable and effective for LLMs:
- LoRA-Augmented $L_0$ Regularization: To maintain memory efficiency, Compresso avoids updating all model weights. Instead, it utilizes Low-Rank Adaptation (LoRA) alongside learnable binary masks ($Z$) for attention heads, Feed-Forward Network (FFN) dimensions, and hidden dimensions. $L_0$ regularization encourages these masks toward zero (pruning) while the remaining weights are fine-tuned.
- Collaborative Prompting: This novel approach provides the model with a specific "collaborative prompt" during both pruning and inference. This prompt informs the model of its optimization state, allowing it to adapt its internal representations and outputs to its leaner architecture.
- Instruction-Based Pruning: By training on instruction-following datasets like GPT4-Alpaca rather than raw web-crawl data, Compresso ensures the pruned model retains its ability to follow complex human instructions.
Experimental Setup
The authors evaluated Compresso by pruning LLaMA-7B into 5.4B, 5.0B, and 4.5B variants. Training was conducted on the GPT4-Alpaca dataset (52k samples). Evaluation spanned a comprehensive suite of benchmarks, including commonsense reasoning (e.g., StoryCloze, HellaSwag), reading comprehension (BoolQ, RACE-High), and general logic (MMLU, BBH).
Key Results and Insights
Compresso consistently outperformed existing structured pruning baselines, such as LLM-Pruner. Notably, at the 5.4B parameter level, Compresso achieved a 60.35% average on reading comprehension tasks, significantly higher than the 48.92% achieved by LLM-Pruner.
Emergent Pruning Patterns and Self-Awareness
Analysis of the pruned architectures revealed a non-uniform "W" pattern in FFN dimension retention, where Compresso preserves more parameters in the middle layers of the model. This suggests these layers are more critical for maintaining performance than the initial or final layers.
Furthermore, the "collaborative prompt" proved to be a vital recovery tool. Removing this prompt during inference resulted in a 7.64% performance drop in reading comprehension for the 5.4B model, indicating that the model's awareness of its compressed state is fundamental to its functional recovery.
Efficiency and Regularization
Remarkably, the Compresso-5.4B model actually outperformed the original LLaMA-7B on StoryCloze (+4.81%) and Reading Comprehension (+2.62%). This suggests that the structured pruning process, when combined with instruction tuning, acts as a powerful form of high-quality distillation. The process is also highly efficient, requiring only 4.54M trainable parameters for the 7B model, making it accessible on standard hardware like NVIDIA V100 GPUs.
Limitations and Future Work
While effective, the collaborative prompt adds input tokens, which can slightly increase prompt processing time. Future research could explore "baking" this awareness directly into the model weights to eliminate the need for the prompt at inference. Additionally, while successful on 7B and 13B models, the scalability of this approach to 70B+ parameter models remains an open question.
Summary updated