arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.05025cs.LG
收藏

用于低位宽和硬件兼容神经网络的二次幂Quantization

Power-of-Two Quantization for Low Bitwidth and Hardware Compliant Neural Networks

Meta Reality Lab Research(Meta现实实验室研究部门);AGH UST(AGH科技大学)

Dominika Przewlocka-Rus, Syed Shakib Sarwar, H. Ekin Sumbul, Yuecheng Li, Barbara De Salvo

摘要:

在低功耗嵌入式设备中部署深度神经网络以用于实时的约束应用需要优化网络的存储器和计算复杂性,通常通过量化权重。大多数现有的作品采用线性量化,这会导致相当大的下降,在精度的权重位宽低于8。由于权重的分布通常是不均匀的(大多数权重集中在零附近),因此其他方法(如对数量化)更适合,因为它们能够更精确地保持权重分布的形状。此外,使用以2为底的对数表示允许通过用位移位替换乘法来优化乘法。在本文中,我们探讨利用较低的位精度的非线性量化技术,并确定有利的硬件实现选项。我们开发了量化感知训练(QAT)算法,该算法允许训练低位宽的二次幂(PoT)网络,并在不同任务中实现了与最先进的浮点模型相当的精度。我们探讨了PoT权重编码技术,并研究了三种不同量化方案(均匀,PoT和附加PoT(APoT))的MAC单元的硬件设计,以显示使用所提出的方法时提高的效率。实验结果表明,对于低位宽精度,非均匀量化的性能优于均匀量化,同时PoT量化大大降低了神经网络的计算复杂性。

英文摘要:

Deploying Deep Neural Networks in low-power embedded devices for real time-constrained applications requires optimization of memory and computational complexity of the networks, usually by quantizing the weights. Most of the existing works employ linear quantization which causes considerable degradation in accuracy for weight bit widths lower than 8. Since the distribution of weights is usually non-uniform (with most weights concentrated around zero), other methods, such as logarithmic quantization, are more suitable as they are able to preserve the shape of the weight distribution more precise. Moreover, using base-2 logarithmic representation allows optimizing the multiplication by replacing it with bit shifting. In this paper, we explore non-linear quantization techniques for exploiting lower bit precision and identify favorable hardware implementation options. We developed the Quantization Aware Training (QAT) algorithm that allowed training of low bit width Power-of-Two (PoT) networks and achieved accuracies on par with state-of-the-art floating point models for different tasks. We explored PoT weight encoding techniques and investigated hardware designs of MAC units for three different quantization schemes - uniform, PoT and Additive-PoT (APoT) - to show the increased efficiency when using the proposed approach. Eventually, the experiments showed that for low bit width precision, non-uniform quantization performs better than uniform, and at the same time, PoT quantization vastly reduces the computational complexity of the neural network.

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

↑