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

RMSMP:一种新的具有行混合模式和多精度的深度神经网络Quantization框架

RMSMP: A Novel Deep Neural Network Quantization Framework with Row-wise Mixed Schemes and Multiple Precisions

George Mason University(乔治梅森大学);Michigan State University(密歇根州立大学);Northeastern University(东北大学)

Sung-En Chang, Yanyu Li, Mengshu Sun, Weiwen Jiang, Sijia Liu, Yanzhi Wang, Xue Lin

摘要:

本文提出了一种新的深度神经网络(DNN)量化框架,即RMSMP,采用了行混合方案和多精度方法。具体来说,这是第一次在层内分配混合量化方案和多个精度-在DNN权重矩阵的行之间,以简化硬件推理中的操作,同时保持准确性。此外,本文提出了一个不同的观察,从以前的工作,量化误差不一定表现出逐层的敏感性,实际上可以减轻,只要在每一层的权重的某一部分是在较高的精度。这种观察使硬件实现中的逐层均匀性能够保证推理加速,同时仍然享受混合方案的逐行灵活性和多个精度以提高准确性。该方法采用高度硬件信息化的策略,有效地减少了问题的搜索空间,从而得到了实用有效的方案和精度候选。通过离线确定所有层的不同量化方案和精度的比率,RMSMP量化算法使用Hessian和基于方差的方法来有效地为每行分配方案和精度。建议RMSMP测试的图像分类和自然语言处理(BERT)的应用程序,并达到最佳的准确性性能之间的国家的最先进的同等精度下。RMSMP在FPGA设备上实现,与4位固定点基线相比,在ImageNet上实现了ResNet-18端到端推理时间的3.65倍加速。

英文摘要:

This work proposes a novel Deep Neural Network (DNN) quantization framework, namely RMSMP, with a Row-wise Mixed-Scheme and Multi-Precision approach. Specifically, this is the first effort to assign mixed quantization schemes and multiple precisions within layers -- among rows of the DNN weight matrix, for simplified operations in hardware inference, while preserving accuracy. Furthermore, this paper makes a different observation from the prior work that the quantization error does not necessarily exhibit the layer-wise sensitivity, and actually can be mitigated as long as a certain portion of the weights in every layer are in higher precisions. This observation enables layer-wise uniformality in the hardware implementation towards guaranteed inference acceleration, while still enjoying row-wise flexibility of mixed schemes and multiple precisions to boost accuracy. The candidates of schemes and precisions are derived practically and effectively with a highly hardware-informative strategy to reduce the problem search space. With the offline determined ratio of different quantization schemes and precisions for all the layers, the RMSMP quantization algorithm uses the Hessian and variance-based method to effectively assign schemes and precisions for each row. The proposed RMSMP is tested for the image classification and natural language processing (BERT) applications and achieves the best accuracy performance among state-of-the-arts under the same equivalent precisions. The RMSMP is implemented on FPGA devices, achieving 3.65x speedup in the end-to-end inference time for ResNet-18 on ImageNet, compared with the 4-bit Fixed-point baseline.

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

↑