Compressing Large Language Models (LLMs) via pruning or quantization usually relies on a small set of "calibration data" to guide the process. This paper reveals that the choice of this data is far from trivial. By moving beyond random samples and instead curating data for representativeness and diversity in the model's activation space, the authors’ new framework, COLA, significantly better preserves complex reasoning and coding capabilities in compressed models.
The Calibration Data Problem
As LLMs grow, deploying them on consumer hardware requires post-training compression (PTC) techniques like quantization (reducing bit-precision) and pruning (removing redundant weights). These methods are "training-free" but require a small set of calibration data to calculate weight importance or activation dynamic ranges.
Historically, researchers treated calibration data as an afterthought, often just grabbing 128 random samples from generic datasets like WikiText or C4. However, this paper identifies a major gap: random data often fails to "activate" the specific neural pathways responsible for high-level reasoning. When you compress a model using generic data, you might accidentally prune away the very weights that make the model good at math or coding, leading to a "lobotomized" compressed model that can still chat but struggles with complex logic.
Introducing COLA: Curating Optimal Calibration Data
To address this, the authors introduce COLA (Curating Optimal LLM compression cAlibration data), a three-stage pipeline designed to optimize calibration sets:
- Dataset Selection (Domain Correspondence): Instead of generic text, COLA selects source datasets that align with the target deployment (e.g., using MathQA for a math-heavy assistant). This relies on a scoring function based on semantic similarity and token distribution.
- Dataset Processing (Compositional Properties): The framework optimizes sequence lengths (typically 2048 tokens) and performs "format enrichment." Crucially, converting data into a Q&A format with explicit reasoning chains helps the model maintain its internal reasoning mechanisms during compression.
- Sample Selection (Activation Space): Moving beyond text-level analysis, COLA runs a forward pass through the uncompressed model to extract hidden state activations. Using random projection for dimensionality reduction followed by k-means clustering, it selects samples closest to the centroids. This ensures the calibration set is both representative of the domain and diverse in how it triggers the model's internal "neurons."
Key Insights and Mechanisms
The study evaluated models like LLaMA3 and Qwen2.5 across various benchmarks (WikiText2, GSM8K, HumanEval) and uncovered several critical insights into how compression interacts with data:
- The Spectral Signature of Reasoning: Using Fourier Transforms, the authors show that general language modeling relies on "low-frequency" weight components, while complex reasoning (math/code) is stored in "high-frequency" components. Standard random calibration data often fails to preserve these high-frequency signals.
- Diminishing Returns on Quantity: Adding more calibration samples helps, but only up to a point (usually 64–128 samples). Beyond that, the quality and diversity of the samples matter much more than the raw count.
- Pruning is More Sensitive than Quantization: Pruning methods (like SparseGPT) are significantly more sensitive to calibration data quality than quantization methods (like AWQ) because pruning permanently deletes connections, whereas quantization merely rounds them.
- Reasoning Chains are Vital:
Including "Explicit Reasoning Chains" (ERC) in calibration data acts like a "stress test" for the model's logic circuits. As shown above, formatting calibration data with these chains ensures complex reasoning pathways aren't optimized away during the compression process.
Results and Future Directions
The COLA framework consistently outperformed random sampling and LLM-generated baselines across all tasks. For instance, on LLaMA3-8B (SparseGPT 50% pruning), COLA improved math accuracy by 1.51 percentage points over random WikiText. For Qwen2.5-7B (AWQ 4-bit), it achieved a code generation score of 64.15, compared to 62.10 with standard WikiText calibration. Notably, the benefits of COLA increased with model size, providing a 2.31 percentage point boost in commonsense reasoning on LLaMA3.1-70B.
While the study focused on standard architectures and specific compression levels (50% pruning, 4-bit quantization), it paves the way for future work on Mixture-of-Experts (MoE) models and compression-method-specific curation strategies. Ultimately, COLA demonstrates that in the realm of LLM compression, what you calibrate on is just as important as how you compress.
Summary updated