arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1909.13144cs.LGstat.ML
收藏

加性二次幂Quantization:一种有效的神经网络非均匀离散化方法

Additive Powers-of-Two Quantization: An Efficient Non-uniform Discretization for Neural Networks

National University of Singapore(新加坡国立大学);Harvard University(哈佛大学)

Yuhang Li, Xin Dong, Wei Wang

摘要:

针对神经网络中权重和激活的钟形和长尾分布,提出了一种有效的非均匀量化方案--加性二次幂(APoT)量化。通过将所有量化水平约束为2的幂项之和,APoT量化享有高计算效率和与权重分布的良好匹配。一个简单的重新参数化的裁剪功能,以产生一个更好的定义梯度学习裁剪阈值。此外,提出了权重归一化来细化权重分布,使训练更加稳定和一致。实验结果表明,我们提出的方法优于国家的最先进的方法,甚至是竞争力的全精度模型,证明了我们提出的APoT量化的有效性。例如,我们在ImageNet上的4位量化ResNet-50实现了76.6%的top-1准确率,没有花哨的装饰;同时,与均匀量化的模型相比,我们的模型减少了22%的计算成本。该代码可在https://github.com/yhhhli/APoT_Quantization上获得。

英文摘要:

We propose Additive Powers-of-Two~(APoT) quantization, an efficient non-uniform quantization scheme for the bell-shaped and long-tailed distribution of weights and activations in neural networks. By constraining all quantization levels as the sum of Powers-of-Two terms, APoT quantization enjoys high computational efficiency and a good match with the distribution of weights. A simple reparameterization of the clipping function is applied to generate a better-defined gradient for learning the clipping threshold. Moreover, weight normalization is presented to refine the distribution of weights to make the training more stable and consistent. Experimental results show that our proposed method outperforms state-of-the-art methods, and is even competitive with the full-precision models, demonstrating the effectiveness of our proposed APoT quantization. For example, our 4-bit quantized ResNet-50 on ImageNet achieves 76.6% top-1 accuracy without bells and whistles; meanwhile, our model reduces 22% computational cost compared with the uniformly quantized counterpart. The code is available at https://github.com/yhhhli/APoT_Quantization.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑