Post-Training Sparsity-Aware Quantization

Gil Shomron, Freddy Gabbay, Samer Kurzum, Uri Weiser
5/23/2021
cs.LGcs.ARcs.CV
quantization-pruning

Official code: gilshm/sparq (34 stars, Python, last commit 2023-02-26).

Abstract

Quantization is a technique used in deep neural networks (DNNs) to increase execution performance and hardware efficiency. Uniform post-training quantization (PTQ) methods are common, since they can be implemented efficiently in hardware and do not require extensive hardware resources or a training set.

Show full abstract

Mapping FP32 models to INT8 using uniform PTQ yields models with negligible accuracy degradation; however, reducing precision below 8 bits with PTQ is challenging, as accuracy degradation becomes noticeable, due to the increase in quantization noise. In this paper, we propose a sparsity-aware quantization (SPARQ) method, in which the unstructured and dynamic activation sparsity is leveraged in different representation granularities. 4-bit quantization, for example, is employed by dynamically examining the bits of 8-bit values and choosing a window of 4 bits, while first skipping zero-value bits. Moreover, instead of quantizing activation-by-activation to 4 bits, we focus on pairs of 8-bit activations and examine whether one of the two is equal to zero. If one is equal to zero, the second can opportunistically use the other's 4-bit budget; if both do not equal zero, then each is dynamically quantized to 4 bits, as described. SPARQ achieves minor accuracy degradation and a practical hardware implementation. The code is available at https://github.com/gilshm/sparq.

View on arXivView PDF

Code Implementations(1)

gilshm/sparqOfficial100%

Post-training sparsity-aware quantization

345Python, CudaMay 22, 20213 years ago

Similar Papers

Cite this paper

@article{shomron2021posttraining,
  title  = {Post-Training Sparsity-Aware Quantization},
  author = {Gil Shomron and Freddy Gabbay and Samer Kurzum and Uri Weiser},
  year   = {2021},
  eprint = {2105.11010},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2105.11010}
}

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

Discussion