Introduction
The rapid scaling of Large Language Models (LLMs) has led to unprecedented capabilities but also significant deployment challenges due to their massive parameter counts. Compression techniques, primarily pruning and quantization, are essential for making these models accessible. However, a major hurdle in this field is the lack of sensitive evaluation metrics. Standard metrics like Perplexity (PPL) provide a "smooth" average over a dataset, which can mask "sharp" failures in autoregressive generation. In practice, a single incorrect token early in a sequence can cause the model to diverge into nonsense, a phenomenon PPL often fails to capture until the degradation is severe. This paper introduces Divergent Token Metrics (DTMs), a family of metrics that measure exactly when and how often a compressed model's output deviates from the original.
Divergent Token Metrics
To better capture generation quality loss, the authors propose shifting from probability distribution averages to token-level divergence. They introduce three primary metrics:
- First Divergent Token (FDT): This identifies the specific token index where a compressed model first disagrees with the original model's greedy output for a given prompt.
- Share of Divergent Tokens (SDT): This measures the total proportion of tokens in a generated sequence that differ from the original model's output.
- Divergent Perplexity (DPPL): This calculates perplexity using the original model’s output as the "ground truth," effectively measuring the distributional shift relative to the uncompressed model.
These metrics enable a more surgical approach to compression. By using FDT to "probe" individual components, the authors developed an iterative pruning algorithm and a quantization search tree. If compressing a specific attention head or MLP layer causes an early FDT, that component is marked as sensitive and left uncompressed; if the FDT remains high, the component is compressed further.
Experimental Setup
The researchers evaluated their methods using the Llama-2 family (7B and 13B versions). Calibration was performed using randomly sampled data from the C4 dataset. Evaluation metrics included Wikitext2 for perplexity and a suite of standard NLP benchmarks—such as ARC, BoolQ, and Winogrande—to ensure that the compressed models retained their reasoning and zero-shot capabilities.
Key Insights and Results
Non-Uniform Component Sensitivity
A major insight from this work is that LLM components are not equally important for maintaining output fidelity. The authors found that the first and last layers of the model are significantly more sensitive to compression than the middle layers. Specifically, the "Value" matrices in attention blocks and "Up-projection" matrices in MLPs are the most critical to preserve. Conversely, attention components were found to be surprisingly redundant; approximately 25% of all attention components in Llama-2 could be pruned by more than 90% without significant performance loss.
High-Sparsity and Efficient Quantization
Using DTMs as a guide, the authors produced a 75% sparse Llama-2-13B model that maintained a single-digit perplexity score, a significant improvement over previous pruning research which often struggled to maintain performance beyond 60-70% sparsity. Furthermore, FDT allowed the authors to identify the most sensitive 20% of components for quantization. By keeping these sensitive parts at higher precision, the remaining 80% could be naively quantized to 8-bit (int8) precision using simple rounding, achieving high efficiency without the complex outlier management required by methods like LLM.int8().
Discriminative Power
The paper demonstrates that FDT has superior discriminative power compared to PPL. In tests where weights were pruned either randomly or by magnitude, FDT clearly distinguished the "broken" random model from the "functional" magnitude-pruned model. In contrast, standard Perplexity performed no better than guessing in identifying the functional model at high compression levels.
Conclusion
Divergent Token Metrics offer a more precise yardstick for LLM compression by focusing on the mechanics of autoregressive divergence. By identifying sensitive components through FDT, researchers can push the limits of pruning and quantization further than previously possible. Future work will investigate the behavior of these metrics under diverse sampling strategies and their implications for model safety and alignment.
Summary updated