arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2302.14458cs.LGcs.AI
收藏

深度神经网络的超低精度无乘法训练

Ultra-low Precision Multiplication-free Training for Deep Neural Networks

Institute of Computing Technology, CAS(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Cambricon Technologies(寒武纪科技);Institute of Software, CAS(中国科学院软件研究所)

Chang Liu, Rui Zhang, Xishan Zhang, Yifan Hao, Zidong Du, Xing Hu, Ling Li, Qi Guo

摘要:

深度神经网络(DNN)的训练需要巨大的能量消耗,这限制了深度学习的发展,也增加了碳排放。因此,研究DNN的节能训练是必要的。在训练中,线性层消耗最多的能量,因为在乘法累加(MAC)中大量使用了耗能的全精度(FP 32)乘法。节能工作试图降低乘法的精度或用节能操作(如加法或按位移位)取代乘法,以减少FP 32乘法的能耗。然而,现有的能量有效的作品不能取代所有的FP 32乘法在前向和后向传播与低精度的能量有效的操作。在这项工作中,我们提出了一种自适应逐层缩放PoT量化(ALS-POTQ)方法和一种免乘法MAC(MF-MAC),以取代所有的FP 32乘法与INT 4加法和1位XOR运算。此外,我们还提出了权重偏差校正和参数化比率裁剪技术,以实现稳定的训练和提高准确性。在我们的训练方案中,所有上述方法都不会引入额外的乘法,因此我们在训练过程中减少了线性层高达95.8%的能耗。在实验中,我们在ImageNet上的CNN模型和WMT En-De任务上的Transformer模型的准确性下降不到1%。总之,我们在能源效率和准确性方面都明显优于现有方法。

英文摘要:

The training for deep neural networks (DNNs) demands immense energy consumption, which restricts the development of deep learning as well as increases carbon emissions. Thus, the study of energy-efficient training for DNNs is essential. In training, the linear layers consume the most energy because of the intense use of energy-consuming full-precision (FP32) multiplication in multiply-accumulate (MAC). The energy-efficient works try to decrease the precision of multiplication or replace the multiplication with energy-efficient operations such as addition or bitwise shift, to reduce the energy consumption of FP32 multiplications. However, the existing energy-efficient works cannot replace all of the FP32 multiplications during both forward and backward propagation with low-precision energy-efficient operations. In this work, we propose an Adaptive Layer-wise Scaling PoT Quantization (ALS-POTQ) method and a Multiplication-Free MAC (MF-MAC) to replace all of the FP32 multiplications with the INT4 additions and 1-bit XOR operations. In addition, we propose Weight Bias Correction and Parameterized Ratio Clipping techniques for stable training and improving accuracy. In our training scheme, all of the above methods do not introduce extra multiplications, so we reduce up to 95.8% of the energy consumption in linear layers during training. Experimentally, we achieve an accuracy degradation of less than 1% for CNN models on ImageNet and Transformer model on the WMT En-De task. In summary, we significantly outperform the existing methods for both energy efficiency and accuracy.

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

↑