Value-aware Quantization for Training and Inference of Neural Networks
This work addresses memory efficiency for deep learning practitioners, offering incremental improvements in quantization techniques for training and inference.
The paper tackles the problem of reducing memory costs in neural networks by proposing value-aware quantization, which uses low precision for most data and high precision for a small fraction of large data. The result shows that with 3-bit activations, it achieves the same training accuracy as full precision while reducing memory costs by 41.6% and 53.7% in ResNet-152 and Inception-v3 compared to state-of-the-art methods, and with 4-bit weights and activations, it maintains inference accuracy within 1% drop.
We propose a novel value-aware quantization which applies aggressively reduced precision to the majority of data while separately handling a small amount of large data in high precision, which reduces total quantization errors under very low precision. We present new techniques to apply the proposed quantization to training and inference. The experiments show that our method with 3-bit activations (with 2% of large ones) can give the same training accuracy as full-precision one while offering significant (41.6% and 53.7%) reductions in the memory cost of activations in ResNet-152 and Inception-v3 compared with the state-of-the-art method. Our experiments also show that deep networks such as Inception-v3, ResNet-101 and DenseNet-121 can be quantized for inference with 4-bit weights and activations (with 1% 16-bit data) within 1% top-1 accuracy drop.