Lune

ICML2020Top-tier venue

Up or Down? Adaptive Rounding for Post-Training Quantization

Markus Nagel, Rana Ali Amjad, Mart van Baalen, Christos Louizos, Tijmen Blankevoort

Abstract

When quantizing neural networks, assigning each floating-point weight to its nearest fixed-point value is the predominant approach. We find that, perhaps surprisingly, this is not the best we can do. In this paper, we propose AdaRound, a better weight-rounding mechanism for post-training quantization that adapts to the data and the task loss. AdaRound is fast, does not require fine-tuning of the network, and only uses a small amount of unlabelled data. We start by theoretically analyzing the rounding problem for a pre-trained neural network. By approximating the task loss with a Taylor series expansion, the rounding task is posed as a quadratic unconstrained binary optimization problem. We simplify this to a layer-wise local loss and propose to optimize this loss with a soft relaxation. AdaRound not only outperforms rounding-to-nearest by a significant margin but also establishes a new state-of-the-art for post-training quantization on several networks and tasks. Without fine-tuning, we can quantize the weights of Resnet18 and Resnet50 to 4 bits while staying within an accuracy loss of 1%.

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.

256 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers cites Post-Training Quantization for Vision Transformer
  • ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers cites Learned Step Size quantization
  • ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers cites Data-Free Quantization Through Weight Equalization and Bias Correction
  • ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers cites HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-Precision
  • Post-Training Quantization for Vision Transformer cites Data-Free Quantization Through Weight Equalization and Bias Correction
  • BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction cites Learned Step Size quantization
  • BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction cites Data-Free Quantization Through Weight Equalization and Bias Correction
  • BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction cites HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-Precision
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees cites ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformers
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees cites Post-Training Quantization for Vision Transformer
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees cites BRECQ: Pushing the Limit of Post-Training Quantization by Block Reconstruction
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees cites Data-Free Quantization Through Weight Equalization and Bias Correction
  • QuIP: 2-Bit Quantization of Large Language Models With Guarantees cites HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-Precision
  • Mixed Precision DNNs: All you need is a good parametrization cites Learned Step Size quantization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers256

  1. SparseGPT: Massive Language Models Can be Accurately Pruned in One-ShotElias Frantar, Dan AlistarhICML 2023 · 1,240 citations
  2. ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale TransformersZhewei Yao, Reza Yazdani Aminabadi, Minjia Zhang, Xiaoxia Wu et al.NeurIPS 2022 · 816 citations
  3. BRECQ: Pushing the Limit of Post-Training Quantization by Block ReconstructionYuhang Li, Ruihao Gong, Xu Tan, Yang Yang et al.ICLR 2021 · 619 citations
  4. Post-Training Quantization for Vision TransformerZhenhua Liu, Yunhe Wang, Kai Han, Wei Zhang et al.NeurIPS 2021 · 528 citations
  5. QuIP: 2-Bit Quantization of Large Language Models With GuaranteesJerry Chee, Yaohui Cai, Volodymyr Kuleshov, Christopher De SaNeurIPS 2023 · 503 citations

Builds on5

  1. Learned Step Size quantizationSteven K. Esser, Jeffrey L. McKinstry, Deepika Bablani, Rathinakumar Appuswamy et al.ICLR 2020 · 1,037 citations
  2. HAWQ: Hessian AWare Quantization of Neural Networks With Mixed-PrecisionZhen Dong, Zhewei Yao, Amir Gholami, Michael W. Mahoney et al.ICCV 2019 · 645 citations
  3. Data-Free Quantization Through Weight Equalization and Bias CorrectionMarkus Nagel, Mart van Baalen, Tijmen Blankevoort, Max WellingICCV 2019 · 622 citations
  4. Mixed Precision DNNs: All you need is a good parametrizationStefan Uhlich, Lukas Mauch, Fabien Cardinaux, Kazuki Yoshiyama et al.ICLR 2020 · 159 citations
  5. And the Bit Goes Down: Revisiting the Quantization of Neural NetworksPierre Stock, Armand Joulin, Rémi Gribonval, Benjamin Graham et al.ICLR 2020 · 157 citations

Related papers

  1. FlexRound: Learnable Rounding based on Element-wise Division for Post-Training QuantizationJung Hyun Lee, Jeonghoon Kim, Se Jung Kwon, Dongsoo LeeICML 2023 · 56 citations
  2. Gradient ℓ1\ell_1 Regularization for Quantization RobustnessMilad Alizadeh, Arash Behboodi, Mart van Baalen, Christos Louizos et al.ICLR 2020 · 8 citations
  3. PD-Quant: Post-Training Quantization Based on Prediction Difference MetricJiawei Liu, Lin Niu, Zhihang Yuan, Dawei Yang et al.CVPR 2023
  4. Diversifying Sample Generation for Accurate Data-Free QuantizationXiangguo Zhang, Haotong Qin, Yifu Ding, Ruihao Gong et al.CVPR 2021
  5. Additive Powers-of-Two Quantization: An Efficient Non-uniform Discretization for Neural NetworksYuhang Li, Xin Dong, Wei WangICLR 2020 · 315 citations
Dusk over the sea between two cliffs drawn in fine vertical lines