Loss Aware Post-training Quantization

Yury Nahshan, Brian Chmiel, Chaim Baskin, Evgenii Zheltonozhskii, Ron Banner +2 more
11/17/2019
224 citations
cs.LGcs.CV
quantization-pruning

Official code: ynahshan/nn-quantization-pytorch (59 stars, Jupyter Notebook, last commit 2020-12-08).

Abstract

Neural network quantization enables the deployment of large models on resource-constrained devices. Current post-training quantization methods fall short in terms of accuracy for INT4 (or lower) but provide reasonable accuracy for INT8 (or above).

Show full abstract

In this work, we study the effect of quantization on the structure of the loss landscape. Additionally, we show that the structure is flat and separable for mild quantization, enabling straightforward post-training quantization methods to achieve good results. We show that with more aggressive quantization, the loss landscape becomes highly non-separable with steep curvature, making the selection of quantization parameters more challenging. Armed with this understanding, we design a method that quantizes the layer parameters jointly, enabling significant accuracy improvement over current post-training quantization methods. Reference implementation is available at https://github.com/ynahshan/nn-quantization-pytorch/tree/master/lapq

View on arXivView PDF

Code Implementations(1)

5914Jupyter Notebook, PythonSep 4, 20195 years ago

Similar Papers

Cite this paper

@article{nahshan2019loss,
  title  = {Loss Aware Post-training Quantization},
  author = {Yury Nahshan and Brian Chmiel and Chaim Baskin and Evgenii Zheltonozhskii and Ron Banner and Alex M. Bronstein and Avi Mendelson},
  year   = {2019},
  eprint = {1911.07190},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1911.07190}
}

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/1911.07190.svg)](https://codeofpaper.com/paper/1911.07190)

Discussion