Compression Scaling Laws:Unifying Sparsity and Quantization

Elias Frantar, Utku Evci, Wonpyo Park, Neil Houlsby, Dan AlistarharXiv 2025 · OpenReview

Abstract: We investigate how different compression techniques -- such as weight and activation quantization, and weight sparsity -- affect the scaling behavior of large language models (LLMs) during pretraining. Building on previous work showing that weight sparsity acts as a constant multiplier on model size in scaling laws, we demonstrate that this "effective parameter" scaling pattern extends to quantization as well. Specifically, we establish that weight-only quantization achieves strong parameter efficiency multipliers, while full quantization of both weights and activations shows diminishing returns at lower bitwidths. Our results suggest that different compression techniques can be unified under a common scaling law framework, enabling principled comparison and combination of these methods.

Introduction

Large Language Models (LLMs) have demonstrated remarkable capabilities, with performance scaling predictably with parameter count and training data. However, the computational and memory requirements of these models pose significant challenges for deployment and training. Compression techniques such as quantization and sparsity are commonly employed to mitigate these costs. While these methods have been studied extensively, their impact on the fundamental scaling laws of LLMs during pretraining remained poorly understood. This paper introduces a unified framework to predict the performance of compressed models using the concept of an Effective Parameter Multiplier (EPM).

Methodology

The researchers propose a "Compressed Training Law" that extends the Chinchilla scaling law by incorporating a compression-dependent factor. The loss $L$ is modeled as a function of parameters $N$, data $D$, and compression type $C$:

$$L(N, D, C) = \frac{a}{(N \cdot \text{eff}(C))^b} + \frac{c}{D^d} + e$$

Here, $\text{eff}(C)$ represents the Effective Parameter Multiplier (EPM), which acts as an "exchange rate" quantifying the value of a compressed parameter relative to a standard 16-bit parameter. To empirically validate this law, Llama-style models were trained on the C4 dataset using various compression schemes, including quantization via Straight-Through Estimation (STE) and top-k sparsification. A key technical finding was that hyperparameter tuning is simplified for compressed models: optimal learning rates for dense models transfer effectively to their compressed counterparts.

Key Results and Insights

The study reveals that the EPM is remarkably stable across different model scales and training durations. This data independence allows for the characterization of compression efficiency using small-scale experiments that reliably generalize to larger models.

Scaling Law Fits

The proposed scaling law provides an excellent fit for experimental data across a wide range of bitwidths. For weight-only quantization, the EPM remains high even at low precision. For instance, 4-bit weights retain approximately 92.3% of the effectiveness of 16-bit weights while offering a nearly 4x reduction in memory footprint. Even at 1-bit, the EPM remains significant at 0.466.

Scaling law fits for weight-only quantization across various bitwidths (1, 2, 4, and 16 bits), showing the predictable relationship between model size in bits and validation loss.

Weight-Only vs. Full Quantization

A critical distinction was observed between weight-only and full quantization (quantizing both weights and activations). Weight-only quantization is highly efficient, whereas quantizing activations leads to more significant performance degradation. The "sweet spot" for full quantization appears to be around 4 bits (EPM of 0.747); below this threshold, the EPM drops precipitously (e.g., to 0.067 at 1-bit), suggesting that the loss in parameter effectiveness outweighs the computational gains.

Comparison of validation loss across different quantization schemes. Weight-only quantization (2w16a) outperforms full quantization (4w4a) at similar bit budgets.

Sparsity and Quantization Trade-offs

The framework also allows for a direct comparison between sparsity and quantization. The researchers found that 50% sparsity (EPM of 0.871) is roughly equivalent to 8-bit full quantization (EPM of 0.857). However, at higher compression ratios, quantization typically emerges as the more efficient strategy; 4-bit quantization provides a better effective parameter count than 75% sparsity under similar computational budgets.

Discussion and Limitations

While this work provides a robust mathematical framework for understanding compression in LLMs, several avenues for future research remain. The current study focused on decoder-only architectures and did not quantize the attention mechanism. Furthermore, while EPM measures algorithmic efficiency, actual hardware performance depends heavily on specific kernel implementations. Future work will explore the scaling laws for hybrid methods that combine sparsity and quantization.

Summary updated

BibTeX
@misc{frantar2025compression,
  author = {Elias Frantar and Utku Evci and Wonpyo Park and Neil Houlsby and Dan Alistarh},
  title = {{Compression Scaling Laws:Unifying Sparsity and Quantization}},
  year = {2025},
  eprint = {2502.16440},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.16440},
}
Figure