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

使用全8位整数训练高性能和大规模深度神经网络

Training High-Performance and Large-Scale Deep Neural Networks with Full 8-bit Integers

Beijing Institute of Technology(北京理工大学);University of California, Santa Barbara(加州大学圣巴巴拉分校);Tsinghua University(清华大学)

Yukuan Yang, Shuang Wu, Lei Deng, Tianyi Yan, Yuan Xie, Guoqi Li

摘要:

深度神经网络(DNN)量化将网络中的浮点(FP)数据转换为整数(INT)是缩小模型大小以节省内存并简化计算加速操作的有效方法。近年来,DNN量化研究从推理发展到训练,为加速器的在线训练奠定了基础。然而,现有的方案在训练期间保持批量归一化(BN)不变,大多是不完全量化,其在数据路径的某些部分中仍然采用高精度FP。目前,还没有解决方案可以在大规模DNN的整个训练过程中仅使用低位宽INT数据,并且具有可接受的精度。在这项工作中,通过分解DNN中的所有计算步骤并融合三个特殊的量化函数以满足不同的精度要求,我们提出了一个统一的完整量化框架,称为“WAGEUBN”,以将DNN包括所有数据路径,包括W(权重),A(激活),G(梯度),E(错误),U(更新)和BN。此外,动量优化器也被量化,以实现完全量化的框架。在ResNet 18/34/50模型上的实验表明,WAGEUBN可以在ImageNet数据集上实现具有竞争力的准确性。这是第一次,大规模DNN中的量化研究被推进到全8位INT级别。通过这种方式,训练和推理中的所有操作都可以是逐位操作,从而推动更快的处理速度,降低内存成本和更高的能源效率。我们的整个量化框架具有很大的潜力,未来高效的便携式设备与在线学习能力。

英文摘要:

Deep neural network (DNN) quantization converting floating-point (FP) data in the network to integers (INT) is an effective way to shrink the model size for memory saving and simplify the operations for compute acceleration. Recently, researches on DNN quantization develop from inference to training, laying a foundation for the online training on accelerators. However, existing schemes leaving batch normalization (BN) untouched during training are mostly incomplete quantization that still adopts high precision FP in some parts of the data paths. Currently, there is no solution that can use only low bit-width INT data during the whole training process of large-scale DNNs with acceptable accuracy. In this work, through decomposing all the computation steps in DNNs and fusing three special quantization functions to satisfy the different precision requirements, we propose a unified complete quantization framework termed as ``WAGEUBN'' to quantize DNNs involving all data paths including W (Weights), A (Activation), G (Gradient), E (Error), U (Update), and BN. Moreover, the Momentum optimizer is also quantized to realize a completely quantized framework. Experiments on ResNet18/34/50 models demonstrate that WAGEUBN can achieve competitive accuracy on the ImageNet dataset. For the first time, the study of quantization in large-scale DNNs is advanced to the full 8-bit INT level. In this way, all the operations in the training and inference can be bit-wise operations, pushing towards faster processing speed, decreased memory cost, and higher energy efficiency. Our throughout quantization framework has great potential for future efficient portable devices with online learning ability.

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

↑