Abstract
Large Language Models (LLMs) have achieved remarkable success but remain challenging to deploy on resource-constrained devices due to their immense parameter counts. We present VTrans, a novel pruning framework based on the Variational Information Bottleneck (VIB) principle. VTrans aggressively compresses Transformer models by targeting every structural component, including the often-overlooked embedding layer. Our method achieves up to 70% more compression than previous state-of-the-art methods with less than a 1% drop in accuracy. Furthermore, we introduce "Fast" and "Faster" variants that reduce compression time by up to 25x, enabling efficient model optimization for edge hardware.
Introduction
While models like BERT and LLaMA have revolutionized natural language processing, their deployment is often hindered by size and computational requirements. Pruning—the removal of redundant weights—is a common mitigation strategy. However, existing techniques suffer from three primary limitations: they typically ignore the embedding layer (which can exceed 20% of total parameters), require massive datasets for retraining, and rely on crude magnitude-based selection criteria that do not account for task-specific importance.
Methodology
VTrans reinterprets pruning through the lens of information theory using the Variational Information Bottleneck (VIB). The goal is to maximize the task-relevant information the model retains while minimizing redundant "noise" passed between layers.
Trainable Masks and Components
Instead of simple weight magnitude thresholds, VTrans learns stochastic "masks" ($z$ vectors) for every model component, including embeddings, attention heads, feed-forward network (FFN) units, and entire layers. Components with mask values falling below a learned threshold are pruned. To maintain high performance, the pruned "student" model is trained via knowledge distillation to mimic a full-sized "teacher" model.
Efficient Variants
To address the high computational cost of pruning, we propose two accelerated variants:
- Fast-VTrans: Utilizes only 3% of the original training data to achieve high sparsity.
- Faster-VTrans: Freezes pre-trained weights entirely, training only the VIB masks and minimal bias/normalization parameters. This significantly reduces the optimization search space and time.
Key Insights
- Embedding Layer Redundancy: VTrans reveals that the embedding layer is highly over-parameterized. The framework can prune up to 80% of embedding states with negligible performance impact, a component typically left untouched by prior methods.
- Pruning "No-Op" Attention Heads: Analysis shows that the model naturally prunes heads that attend primarily to special tokens (e.g.,
[CLS],[SEP]). Removing these "no-op" heads allows the remaining heads to specialize in task-critical keywords, leading to more disentangled representations.
Experimental Results
We evaluated VTrans across the GLUE benchmark, SQuAD v1.1, and WikiText-2.
Compression and Accuracy
VTrans consistently outperformed state-of-the-art methods like CoFi and DynaBERT, maintaining higher accuracy at significantly greater sparsity levels across multiple tasks.
Speed and Scalability
- Inference Speedup: Pruned models achieved up to a 4x speedup in real-world usage.
- Compression Efficiency: The Faster-VTrans variant compressed models up to 25 times faster than traditional iterative techniques.
- LLM Application: When applied to LLaMA-2-7B, VTrans achieved a 50% size reduction with lower perplexity and a 1.82x inference speedup compared to specialized structured pruning competitors like LLM-Pruner.
Conclusion and Future Work
VTrans demonstrates that VIB-based pruning is a powerful tool for creating efficient Transformers. While highly effective, future work will focus on hardware-specific optimizations for mobile processors and scaling the VIB principle to ultra-large "frontier" models exceeding 70B parameters.
Summary updated