Abstract
Making large language models (LLMs) more efficient in memory, latency, and serving cost is crucial for edge deployment, interactive applications, and sustainable inference at scale. Pruning is a promising technique, but existing pruning methods are limited: width pruning often breaks the standard transformer layout, requiring custom inference code, while depth pruning can cause abrupt accuracy drops. Also, while many pruning approaches are effective against LLMs, they struggle to maintain performance on small language models (SLMs). In this work, we propose COMPACT, which jointly (i) prunes rare vocabulary to shrink embedding/LM head layers and (ii) prunes FFN intermediate channels using common-token-weighted activations, aligning importance with the post-pruning token distribution. COMPACT inherits strengths of both depth and width pruning, such as: deployment-friendliness (keeps a standard transformer architecture), scale-adaptivity (trade off vocab. vs. FFN pruning), competitive pruning times, and strong memory savings alongside throughput gains. Experiments across Qwen, LLaMA, and Gemma families (0.5B-70B) show state-of-the-art downstream performance, with substantial reductions in parameters, GPU memory, and latency.
Introduction
As Large Language Models (LLMs) grow, deploying them on "edge" devices like smartphones or laptops becomes increasingly difficult due to high memory and energy costs. Pruning—the process of removing redundant parameters—is a standard solution. However, existing methods often suffer from three major flaws:
- Architecture Breaking: Many width pruning methods require custom, non-standard code to run, complicating maintenance.
- Performance Cliffs: Depth pruning (removing entire layers) is easy to implement but often leads to sudden, sharp drops in accuracy.
- Scale Blindness: Most methods treat Small Language Models (SLMs) the same as LLMs, ignoring that SLMs have significantly different parameter distributions.
Methodology
COMPACT introduces a two-pronged, scale-adaptive approach to address these issues:
Vocabulary Pruning
Leveraging Zipf’s Law, which states that a small subset of words is used very frequently while most are rare, COMPACT identifies and removes the rarest tokens from the model's vocabulary. This shrinks the embedding and LM head layers—a massive efficiency gain for SLMs where these layers represent a high percentage of total parameters.
Common-token-weighted FFN Pruning
To prune Feed-Forward Network (FFN) channels, COMPACT uses an activation-based scoring method ($act^2$). Crucially, these scores are weighted based only on the "common tokens" that remain after vocabulary pruning. This ensures the model is optimized for the actual token distribution it will encounter post-pruning.
Plug-and-Play Compatibility
Because COMPACT only modifies the dimensions of existing matrices rather than the structure of the transformer blocks, the resulting models are fully compatible with standard inference engines like vLLM.
Analysis of Parameter Distribution
A key insight driving COMPACT is the observation of how parameter distributions shift with model scale. In a 0.5B model, vocabulary parameters are nearly as significant as FFN parameters. Conversely, in a 70B model, vocabulary parameters are negligible compared to the FFN.
COMPACT succeeds because it is scale-adaptive, pruning more vocabulary in small models and focusing on FFN channels in larger ones. For instance, reducing vocabulary size by 67% (from 150k to 50k tokens) only affects how approximately 4% of words are tokenized, proving that much of an LLM's vocabulary is "dead weight" for general-purpose tasks.
Experimental Results
The researchers evaluated COMPACT using 256 samples from the C4 dataset for calibration and tested across seven benchmarks, including MMLU, HellaSwag, and GSM8K.
Performance Retention
COMPACT demonstrates superior performance retention, especially on SLMs. On Qwen 2.5-0.5B, COMPACT maintained 97.7% of the original performance at a 10% pruning ratio. In contrast, other baselines saw their accuracy on math tasks (GSM8K) collapse to near zero at similar ratios.
Efficiency and Speed
For LLaMA 3.1-8B, COMPACT achieved a 36% reduction in GPU memory and a 1.37x to 1.51x increase in throughput. Furthermore, COMPACT is training-free and highly efficient; it can prune a 70B model in just over two minutes on a single GPU.
Conclusion
COMPACT offers a robust framework for model compression that respects the architectural constraints of modern transformers while adapting to the unique parameter distributions of different model scales. While depth pruning currently maintains a slight edge in raw throughput by skipping layers entirely, COMPACT provides a more stable and architecture-agnostic alternative. Future work will focus on bridging the throughput gap and exploring hybrid approaches involving recovery fine-tuning.
Summary updated