F8Net: Fixed-Point 8-bit Only Multiplication for Network Quantization

Qing Jin, Jian Ren, Richard Zhuang, Sumant Hanumante, Zhengang Li +4 more
2/10/2022
cs.CVcs.AIcs.AR
quantization-pruning

Official code: snap-research/F8Net (93 stars, Python, last commit 2022-05-05).

Abstract

Neural network quantization is a promising compression technique to reduce memory footprint and save energy consumption, potentially leading to real-time inference. However, there is a performance gap between quantized and full-precision models.

Show full abstract

To reduce it, existing quantization approaches require high-precision INT32 or full-precision multiplication during inference for scaling or dequantization. This introduces a noticeable cost in terms of memory, speed, and required energy. To tackle these issues, we present F8Net, a novel quantization framework consisting of only fixed-point 8-bit multiplication. To derive our method, we first discuss the advantages of fixed-point multiplication with different formats of fixed-point numbers and study the statistical behavior of the associated fixed-point numbers. Second, based on the statistical and algorithmic analysis, we apply different fixed-point formats for weights and activations of different layers. We introduce a novel algorithm to automatically determine the right format for each layer during training. Third, we analyze a previous quantization algorithm -- parameterized clipping activation (PACT) -- and reformulate it using fixed-point arithmetic. Finally, we unify the recently proposed method for quantization fine-tuning and our fixed-point approach to show the potential of our method. We verify F8Net on ImageNet for MobileNet V1/V2 and ResNet18/50. Our approach achieves comparable and better performance, when compared not only to existing quantization techniques with INT32 multiplication or floating-point arithmetic, but also to the full-precision counterparts, achieving state-of-the-art performance.

View on arXivView PDF

Code Implementations(1)

[ICLR 2022 Oral] F8Net: Fixed-Point 8-bit Only Multiplication for Network Quantization

9314Python, ShellJan 30, 20224 years agoNOASSERTION
8-bitdeep-learningdeep-neural-networksefficient-neural-networksquantization

Similar Papers

Cite this paper

@article{jin2022fnet,
  title  = {F8Net: Fixed-Point 8-bit Only Multiplication for Network Quantization},
  author = {Qing Jin and Jian Ren and Richard Zhuang and Sumant Hanumante and Zhengang Li and Zhiyu Chen and Yanzhi Wang and Kaiyuan Yang and Sergey Tulyakov},
  year   = {2022},
  eprint = {2202.05239},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2202.05239}
}

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

Discussion