Saved in:
Bibliographic Details
Main Authors: Orr, Douglas, Ribar, Luka, Luschi, Carlo
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.12988
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866912902904020992
author Orr, Douglas
Ribar, Luka
Luschi, Carlo
author_facet Orr, Douglas
Ribar, Luka
Luschi, Carlo
contents Weight quantisation is an essential technique for enabling efficient training and deployment of modern deep learning models. However, the recipe book of quantisation formats is large and formats are often chosen empirically. In this paper, we propose a framework for systematic design and analysis of quantisation formats. By connecting the question of format design with the classical quantisation theory, we show that the strong practical performance of popular formats comes from their ability to represent values using variable-length codes. We frame the problem as minimising the KL divergence between original and quantised model outputs under a model size constraint, which can be approximated by minimising the squared quantisation error, a well-studied problem where entropy-constrained quantisers with variable-length codes are optimal. We develop non-linear quantisation curves for block-scaled data across multiple distribution families and observe that these formats, along with sparse outlier formats, consistently outperform fixed-length formats, indicating that they also exploit variable-length encoding. Finally, by using the relationship between the Fisher information and KL divergence, we derive the optimal allocation of bit-widths to individual parameter tensors across the model's layers, saving up to 0.25 bits per parameter when applied to large language models.
format Preprint
id arxiv_https___arxiv_org_abs_2505_12988
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Optimal Formats for Weight Quantisation
Orr, Douglas
Ribar, Luka
Luschi, Carlo
Machine Learning
Weight quantisation is an essential technique for enabling efficient training and deployment of modern deep learning models. However, the recipe book of quantisation formats is large and formats are often chosen empirically. In this paper, we propose a framework for systematic design and analysis of quantisation formats. By connecting the question of format design with the classical quantisation theory, we show that the strong practical performance of popular formats comes from their ability to represent values using variable-length codes. We frame the problem as minimising the KL divergence between original and quantised model outputs under a model size constraint, which can be approximated by minimising the squared quantisation error, a well-studied problem where entropy-constrained quantisers with variable-length codes are optimal. We develop non-linear quantisation curves for block-scaled data across multiple distribution families and observe that these formats, along with sparse outlier formats, consistently outperform fixed-length formats, indicating that they also exploit variable-length encoding. Finally, by using the relationship between the Fisher information and KL divergence, we derive the optimal allocation of bit-widths to individual parameter tensors across the model's layers, saving up to 0.25 bits per parameter when applied to large language models.
title Optimal Formats for Weight Quantisation
topic Machine Learning
url https://arxiv.org/abs/2505.12988