Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inference
Benoit Jacob, Skirmantas Kligys, Bo Chen, Menglong Zhu, Matthew Tang, Andrew Howard, Hartwig Adam, Dmitry Kalenichenko
TL;DR
This work tackles the challenge of deploying CNNs on mobile devices by enabling integer-arithmetic-only inference through 8-bit quantization of weights/activations and a co-designed training procedure. It introduces an affine quantization scheme, efficient zero-point handling, and fused layer implementations, paired with simulated quantization during training to preserve accuracy. The approach is validated on MobileNets, ResNets, and Inception-v3, showing competitive accuracy with substantial latency reductions on ARM CPUs for ImageNet and COCO tasks. The results demonstrate the potential for real-time, on-device vision applications on widely available hardware, bridging the gap between accuracy and efficiency.
Abstract
The rising popularity of intelligent mobile devices and the daunting computational cost of deep learning-based models call for efficient and accurate on-device inference schemes. We propose a quantization scheme that allows inference to be carried out using integer-only arithmetic, which can be implemented more efficiently than floating point inference on commonly available integer-only hardware. We also co-design a training procedure to preserve end-to-end model accuracy post quantization. As a result, the proposed quantization scheme improves the tradeoff between accuracy and on-device latency. The improvements are significant even on MobileNets, a model family known for run-time efficiency, and are demonstrated in ImageNet classification and COCO detection on popular CPUs.
