Optimal Formats for Weight Quantisation

Douglas Orr, Luka Ribar, Carlo Luschi · DOI

Abstract

Weight quantization is a cornerstone of efficient deep learning deployment, yet the field has largely relied on empirical heuristics. This paper introduces a systematic framework for weight quantization by connecting it to classical quantization theory. By leveraging the Fisher Information Matrix and the "cube root density rule," the authors demonstrate that optimal quantization formats are inherently linked to the underlying weight distributions. Their findings reveal that successful modern formats, such as block-scaling, are effective because they implicitly utilize variable-length encoding. The proposed framework enables a more principled approach to format design, achieving significant bit savings and improved model performance across a range of Large Language Models (LLMs).

Introduction

As Large Language Models (LLMs) scale to hundreds of billions of parameters, reducing their memory footprint through quantization becomes essential for deployment on consumer hardware. However, the current landscape of quantization formats—ranging from standard integer types to specialized formats like NF4—is often treated as a "recipe book" of empirical successes rather than a unified science. This work addresses the fundamental "format design" problem: how to optimally represent model parameters to minimize performance degradation (measured by KL divergence) under strict memory constraints.

Theoretical Framework

The authors bridge deep learning and classical signal processing by approximating the minimization of KL divergence with the minimization of squared quantization error, weighted by the diagonal of the Fisher Information Matrix. A key theoretical pillar is the "Cube Root Density Rule" from the 1950s, which suggests that the optimal density of quantization levels should be proportional to the cube root of the parameter's probability density function (pdf).

Performance of quantization schemes across different weight distributions.

This theoretical insight led to the development of $\sqrt[3]{p}$ block-scaled quantizers tailored for common weight distributions like Normal, Laplace, and Student-t. The analysis shows that for heavy-tailed distributions typical of LLM weights, quantizers designed for the Student-t distribution offer a significant advantage over standard baselines.

Empirical Evaluation and Insights

The study validates these principles across modern LLM architectures, including Llama 3.1, Qwen 2.5, and Gemma 3. A central insight is that block-scaling (e.g., MX formats) acts as a form of "hidden" variable-length encoding. By allocating bits between a block scale and its elements, the format effectively prioritizes "important" values.

KL Divergence vs. Bits per parameter for fixed and variable-length formats.

Key results from the empirical sweep include:

  • Bit Savings: Variable bit-width allocation, guided by Fisher Information, saves approximately 0.25 bits per parameter for the same level of model degradation compared to uniform bit allocation.
  • Format Superiority: Variable-length strategies, such as block-scaled and sparse outlier formats, consistently outperform fixed-length counterparts.
  • Student-t Advantage: Quantizers optimized for Student-t distributions consistently surpass industry standards like NF4 and SF4 in LLM benchmarks, better capturing the outliers common in model weights.

Conclusion

By moving from empirical trial-and-error to a systematic framework, this work provides a roadmap for designing the next generation of quantization formats. While challenges remain in hardware acceleration for non-linear formats, the theoretical foundations established here offer a reliable compass for balancing compression and model fidelity. Future work will focus on developing efficient hardware kernels to bring these theoretically optimal formats into production environments.

Summary updated

BibTeX
@inproceedings{orr2025optimal,
  author = {Douglas Orr and Luka Ribar and Carlo Luschi},
  title = {{Optimal Formats for Weight Quantisation}},
  booktitle = {ES-FoMo-III @ ICML},
  year = {2025},
  url = {https://openreview.net/forum?id=CEyraGEtcW},
}
Figure