Optimal Quantization Using Scaled Codebook
Yerlan Idelbayev, Pavlo Molchanov, Maying Shen, Hongxu Yin, Miguel Á. Carreira-Perpiñán, José M. Álvarez
Abstract
We study the problem of quantizing N sorted, scalar datapoints with a fixed codebook containing K entries that are allowed to be rescaled. The problem is defined as finding the optimal scaling factor α and the datapoint assignments into the α-scaled codebook to minimize the squared error between original and quantized points. Previously, the globally optimal algorithms for this problem were derived only for certain codebooks (binary and ternary) or under the assumption of certain distributions (Gaussian, Laplacian). By studying the properties of the optimal quantizer, we derive an O(N K log K) algorithm that is guaranteed to find the optimal quantization parameters for any fixed codebook regardless of data distribution. We apply our algorithm to synthetic and real-world neural network quantization problems and demonstrate the effectiveness of our approach.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
2 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Post-training Quantization with Multiple Points: Mixed Precision without Mixed Precision cites Data-Free Quantization Through Weight Equalization and Bias Correction
- BitsFusion: 1.99 bits Weight Quantization of Diffusion Model cites Data-Free Quantization Through Weight Equalization and Bias Correction
Cited by top-tier papers2
Builds on2
- Data-Free Quantization Through Weight Equalization and Bias CorrectionMarkus Nagel, Mart van Baalen, Tijmen Blankevoort, Max WellingICCV 2019 · 622 citations
- Post-training Quantization with Multiple Points: Mixed Precision without Mixed PrecisionXingchao Liu, Mao Ye, Dengyong Zhou, Qiang LiuAAAI 2021 · 54 citations
Related papers
- Up or Down? Adaptive Rounding for Post-Training QuantizationMarkus Nagel, Rana Ali Amjad, Mart van Baalen, Christos Louizos et al.ICML 2020 · 816 citations
- Optimal and Approximate Adaptive Stochastic QuantizationRan Ben-Basat, Yaniv Ben-Itzhak, Michael Mitzenmacher, Shay VargaftikNeurIPS 2024 · 12 citations
- The Lattice Geometry of Neural Network Quantization: A Short Equivalence Proof of GPTQ and Babai's AlgorithmJohann BirnickICLR 2026 · 12 citations
- Block and Subword-Scaling Floating-Point (BSFP) : An Efficient Non-Uniform Quantization For Low Precision InferenceYun-Chen Lo, Tse-Kuang Lee, Ren-Shuo LiuICLR 2023
- PD-Quant: Post-Training Quantization Based on Prediction Difference MetricJiawei Liu, Lin Niu, Zhihang Yuan, Dawei Yang et al.CVPR 2023
