Abstract
Large generative Pre-trained Language Models (PLMs) like GPT-2 and BART are computationally intensive, making them difficult to deploy on edge devices. This paper introduces SIMPLE (Sparsity-Induced Mask learning for Pruning generative pre-trained Language modE), a structured pruning framework that significantly reduces model size and latency. By targeting attention heads, feed-forward layers, and the core hidden dimension—while employing a novel causal distillation loss—SIMPLE achieves up to a 7x speedup on CPUs with minimal impact on accuracy.
Introduction
Generative PLMs are notoriously resource-hungry. While quantization helps, it often requires specialized hardware for real-world speedups. Pruning offers a hardware-agnostic alternative by removing redundant parameters. However, traditional structured pruning often avoids the hidden dimension—the core vector size shared across embeddings, layer normalization, and attention modules. This dimension is difficult to prune because it is "coupled" across the entire network via skip connections. SIMPLE addresses this by effectively slimming the hidden dimension alongside other components to maximize efficiency.
The SIMPLE Framework
The SIMPLE approach follows a two-stage process to identify and remove redundant model components:
- Sparsity-Induced Mask Learning: Learnable masks (scalars between 0 and 1) are attached to every compressible component, including attention heads, FFN neurons, and each index of the hidden dimension. These masks are trained using an $\ell_1$ regularization penalty while distilling knowledge from the original teacher model to identify essential parameters.
- Causal Distillation Fine-tuning: Generative models are auto-regressive, meaning small errors can accumulate during sequence generation. To mitigate this, the authors introduce a causal distillation loss that aligns the "Key" and "Value" distributions of the pruned model's attention layers with the original model, ensuring stable generation.
Key Insights: The Outlier "Aha" Moment
A critical observation in this research is that generative models contain "persistent outliers" within the hidden dimension. A few specific dimensions maintain massive magnitudes regardless of the input, implying that the vast majority of the hidden dimension is redundant.
By pruning the hidden dimension, the model achieves collective slimming: reducing this shared dimension automatically shrinks the embedding layer, attention heads, FFNs, and layer normalization simultaneously. Furthermore, the researchers found that a large model pruned down to 12 layers outperformed a standard 12-layer model trained from scratch, suggesting that the over-parameterization of large models creates superior internal representations that can be effectively distilled.
Experimental Results
SIMPLE was evaluated across language modeling (WikiTxt2), abstractive summarization (XSum, CNN/DM), and machine translation (WMT16) tasks. Key findings include:
- Significant Speedups: A pruned BART model achieved a 1.51x speedup on GPUs and a 6.96x speedup on CPUs with a 67% reduction in total parameters.
- High Fidelity: SIMPLE consistently outperformed baselines like magnitude-based and movement pruning. On XSum, it reduced 68% of parameters with less than a 2.5-point drop in ROUGE-1 score.
- Synergy with Quantization: When combined with 2-bit quantization, pruned models achieved over 25x compression while remaining functional, outperforming state-of-the-art methods like DQ-BART.
Limitations and Future Work
While effective, the current mask learning stage is a separate post-pre-training step. Integrating this into the initial pre-training phase could further improve efficiency. Additionally, while tested on GPT-2 and BART, future research is needed to determine if these outlier patterns and pruning benefits scale to massive models like Llama-3 or GPT-4. Finally, as with all compression techniques, there is a risk of amplifying biases present in the original teacher model.
Summary updated