Additive Powers-of-Two Quantization: An Efficient Non-uniform Discretization for Neural Networks

Yuhang Li, Xin Dong, Wei Wang
9/28/2019
cs.LGstat.ML

Official code: yhhhli/APoT_Quantization (287 stars, Python, last commit 2024-12-11).

Abstract

We propose Additive Powers-of-Two~(APoT) quantization, an efficient non-uniform quantization scheme for the bell-shaped and long-tailed distribution of weights and activations in neural networks. By constraining all quantization levels as the sum of Powers-of-Two terms, APoT quantization enjoys high computational efficiency and a good match with the distribution of weights.

Show full abstract

A simple reparameterization of the clipping function is applied to generate a better-defined gradient for learning the clipping threshold. Moreover, weight normalization is presented to refine the distribution of weights to make the training more stable and consistent. Experimental results show that our proposed method outperforms state-of-the-art methods, and is even competitive with the full-precision models, demonstrating the effectiveness of our proposed APoT quantization. For example, our 4-bit quantized ResNet-50 on ImageNet achieves 76.6% top-1 accuracy without bells and whistles; meanwhile, our model reduces 22% computational cost compared with the uniformly quantized counterpart. The code is available at https://github.com/yhhhli/APoT_Quantization.

View on arXivView PDF

Code Implementations(1)

PyTorch implementation for the APoT quantization (ICLR 2020)

28752Python, ShellDec 21, 20191 years ago

Similar Papers

Cite this paper

@article{li2019additive,
  title  = {Additive Powers-of-Two Quantization: An Efficient Non-uniform Discretization for Neural Networks},
  author = {Yuhang Li and Xin Dong and Wei Wang},
  year   = {2019},
  eprint = {1909.13144},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1909.13144}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1909.13144.svg)](https://codeofpaper.com/paper/1909.13144)

Discussion