TL;DR
When compressing Large Language Models (LLMs) to run on edge devices, practitioners heavily rely on top-1 task accuracy to evaluate performance, but this metric can mask severe internal degradation. This paper introduces a distribution-sensitive framework using Total Variation Distance (TVD) and Jensen-Shannon Divergence (JSD) to measure true information loss across the model's entire vocabulary. Their findings show that mixed-precision quantization (like Q4_K) preserves significantly more distributional fidelity than uniform methods (Q4_0) at nearly identical memory footprints.
What Problem Does This Paper Address?
To deploy massive LLMs on memory-constrained devices like laptops or smartphones, engineers use Post-Training Quantization (PTQ) to shrink weight bit-widths (e.g., from 16-bit to 4-bit). Traditionally, these compressed models are evaluated using zero-shot task accuracy.
However, accuracy only looks at the argmax prediction—the single top token chosen by the model. This creates a dangerous statistical blind spot. A heavily degraded model might guess the correct answer by pure chance from a completely flattened probability distribution, or it might default blindly to a dominant prior token. In both cases, standard benchmarks show stable accuracy, hiding massive internal prediction "flips" and a collapse in model confidence. The authors argue that we must move from discrete accuracy scores to continuous, full-vocabulary probability distributions to truly understand quantization quality.
Methods
The authors introduce a dual-stream evaluation pipeline that contrasts standard task performance with distribution-level fidelity:
- Stream 1 (Task-Accuracy View): Computes standard zero-shot accuracy by selecting candidate options that minimize length-normalized negative log-likelihood (NLL).
- Stream 2 (Distribution-Fidelity View): Extracts the full-vocabulary logits at the immediate token decision boundary, applies a temperature-1.0 softmax, and calculates statistical distances against the uncompressed BFloat16 (BF16) baseline.
To measure the shift in probability mass, they utilize two bounded, symmetric metrics:
- Total Variation Distance (TVD): Represents the absolute difference between distributions, directly interpretable as the minimum fraction of probability mass that must be reassigned to make the quantized distribution match the baseline.
- Jensen-Shannon Divergence (JSD): An information-theoretic metric that stably handles near-zero probabilities common in low-bit models.
The framework is mathematically anchored by a coarse-graining theorem proving that mapping full-vocabulary outputs to a smaller multiple-choice answer space can never increase the observed distributional discrepancy, justifying the need for full-vocabulary analysis.
Datasets
The framework was validated across a 120-run experimental matrix using four established zero-shot benchmarks:
- MMLU: Multidomain QA spanning STEM, humanities, and social sciences.
- BoolQ: Reading comprehension tasks consisting of naturally occurring yes/no questions.
- PIQA: Physical commonsense reasoning.
- CausalBench: Causal reasoning and analysis.
Key Insights and Ideas
- The Illusion of Accuracy: Quantized models can maintain stable task accuracy while their internal predictive distributions drastically drift. For example, when compressing the Teuken-7B model to a 4-bit uniform format (
Q4_0) on PIQA, accuracy drops by a negligible 0.2%, yet its TVD spikes to 0.560. This means 56% of the model's probability mass has been completely rearranged. - Degenerate Majority-Class Guessing: On benchmarks like BoolQ, smaller 1B and 2B models achieved identical accuracy across all quantization levels with zero prediction flips. Full-vocabulary analysis revealed why: the models had collapsed into predicting the "True" token uniformly for all examples, matching the majority class perfectly without actual task understanding.
- Monotonicity of Divergence: While accuracy and F1 scores fluctuate erratically and non-monotonically as quantization tightens, TVD and JSD increase predictably. This makes divergence metrics a much more reliable diagnostic signal for progressive model degradation.
Key Results
The authors evaluated five foundation model architectures (Teuken-7B, LLaMA-3.1-8B, Mistral-7B, Gemma-2B, and LLaMA-3.2-1B) across six quantization regimes (from uncompressed BF16 down to 2-bit Q2_K).
- Mixed-Precision vs. Uniform Quantization: The modern mixed-precision scheme (
Q4_K), which keeps sensitive layers at higher precision while aggressively compressing robust layers, vastly outperforms legacy uniform quantization (Q4_0). For LLaMA-3.1-8B on MMLU,Q4_Kyields a TVD of just 0.055 compared toQ4_0's 0.221—a four-fold fidelity improvement at virtually identical VRAM footprints (~5.5 GB). - The Hardware Pareto Frontier: Plotting VRAM footprint against TVD clearly maps out a hardware-quality Pareto frontier.
Q4_Kconsistently emerges as an optimal empirical sweet spot, offering up to a 65% memory reduction for LLaMA-3.1-8B while maintaining tight distributional fidelity to the original model.
Limitations and Future Work
While powerful as a diagnostic complement, the authors note several limitations:
- Model Scope: The study focuses entirely on base foundation models, leaving instruction-tuned and RLHF-aligned architectures for future exploration.
- Single-Step Evaluation: The divergence metrics are calculated at a single prompt-conditioned decision step rather than tracking error accumulation across multi-step autoregressive generation.
- Quantization Formats: The analysis is restricted to the
llama.cpp/GGUF ecosystem.
Future work aims to scale full-vocabulary divergence evaluations to other popular compression frameworks (like AWQ, GPTQ, and SmoothQuant) and correlate these metrics directly with on-device hardware performance (latency, throughput, and energy consumption).
Summary updated