Model compression as constrained optimization, with application to neural nets. Part II: quantization

Miguel Á. Carreira-Perpiñán, Yerlan Idelbayev
7/13/2017
cs.LGcs.NEmath.OC
quantization-pruning

Official code: UCMerced-ML/LC-model-compression (71 stars, Python, BSD-3-Clause, last commit 2021-11-23).

Abstract

We consider the problem of deep neural net compression by quantization: given a large, reference net, we want to quantize its real-valued weights using a codebook with $K$ entries so that the training loss of the quantized net is minimal. The codebook can be optimally learned jointly with the net, or fixed, as for binarization or ternarization approaches.

Show full abstract

Previous work has quantized the weights of the reference net, or incorporated rounding operations in the backpropagation algorithm, but this has no guarantee of converging to a loss-optimal, quantized net. We describe a new approach based on the recently proposed framework of model compression as constrained optimization \citep{Carreir17a}. This results in a simple iterative "learning-compression" algorithm, which alternates a step that learns a net of continuous weights with a step that quantizes (or binarizes/ternarizes) the weights, and is guaranteed to converge to local optimum of the loss for quantized nets. We develop algorithms for an adaptive codebook or a (partially) fixed codebook. The latter includes binarization, ternarization, powers-of-two and other important particular cases. We show experimentally that we can achieve much higher compression rates than previous quantization work (even using just 1 bit per weight) with negligible loss degradation.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

Model compression by constrained optimization, using the Learning-Compression (LC) algorithm

7117PythonMay 14, 20205 years agoBSD-3-Clause

Similar Papers

Cite this paper

@article{carreiraperpin2017model,
  title  = {Model compression as constrained optimization, with application to neural nets. Part II: quantization},
  author = {Miguel Á. Carreira-Perpiñán and Yerlan Idelbayev},
  year   = {2017},
  eprint = {1707.04319},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1707.04319}
}

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

Discussion