BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization

Huanrui Yang, Lin Duan, Yiran Chen, Hai Li
2/20/2021
cs.LGcs.CV
quantization-pruning

Official code: yanghr/BSQ (41 stars, Python, Apache-2.0, last commit 2021-01-12).

Abstract

Mixed-precision quantization can potentially achieve the optimal tradeoff between performance and compression rate of deep neural networks, and thus, have been widely investigated. However, it lacks a systematic method to determine the exact quantization scheme.

Show full abstract

Previous methods either examine only a small manually-designed search space or utilize a cumbersome neural architecture search to explore the vast search space. These approaches cannot lead to an optimal quantization scheme efficiently. This work proposes bit-level sparsity quantization (BSQ) to tackle the mixed-precision quantization from a new angle of inducing bit-level sparsity. We consider each bit of quantized weights as an independent trainable variable and introduce a differentiable bit-sparsity regularizer. BSQ can induce all-zero bits across a group of weight elements and realize the dynamic precision reduction, leading to a mixed-precision quantization scheme of the original model. Our method enables the exploration of the full mixed-precision space with a single gradient-based optimization process, with only one hyperparameter to tradeoff the performance and compression. BSQ achieves both higher accuracy and higher bit reduction on various model architectures on the CIFAR-10 and ImageNet datasets comparing to previous methods.

View on arXivView PDF

Code Implementations(1)

yanghr/BSQOfficial100%
Apache-2.0

BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization (ICLR 2021)

419PythonJun 7, 20205 years agoApache-2.0

Similar Papers

Cite this paper

@article{yang2021bsq,
  title  = {BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization},
  author = {Huanrui Yang and Lin Duan and Yiran Chen and Hai Li},
  year   = {2021},
  eprint = {2102.10462},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2102.10462}
}

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

Discussion