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

移动设备中4位卷积神经网络的快速实现

Fast Implementation of 4-bit Convolutional Neural Networks for Mobile Devices

Moscow Institute of Physics and Technology(莫斯科物理技术学院);FRC CSC RAS(俄罗斯科学院联邦研究中心计算机科学研究所);Smart Engines Service LLC(智能引擎服务有限责任公司);Institute for Information Transmission Problems RAS(俄罗斯科学院信息传输问题研究所)

Anton Trusov, Elena Limonova, Dmitry Slugin, Dmitry Nikolaev, Vladimir V. Arlazarov

摘要:

量化的低精度神经网络由于其推理所需的计算资源少、性能高而备受青睐,这对于实时嵌入式识别系统至关重要。然而,它们的优势对于FPGA和ASIC设备是显而易见的,而通用处理器架构并不总是能够有效地执行低位整数计算。移动中央处理器最常用的低精度神经网络模型是8位量化网络。然而,在许多情况下,可以使用更少的位用于权重和激活,唯一的问题是难以有效实现。我们介绍了一种有效的实现量化神经网络的4位矩阵乘法,并在移动ARM处理器上进行时间测量。它显示了2.9倍的加速比标准的浮点乘法,是1.5倍的速度比8位量化的。我们还展示了一个4位量化的神经网络的OCR识别的MIDV-500数据集。4-位量化提供95.0%的准确度和48%的总体推理加速,而8位量化网络提供95.4%的准确度和39%的加速。结果表明,4位量化非常适合移动设备,产生足够好的精度和较低的推理时间。

英文摘要:

Quantized low-precision neural networks are very popular because they require less computational resources for inference and can provide high performance, which is vital for real-time and embedded recognition systems. However, their advantages are apparent for FPGA and ASIC devices, while general-purpose processor architectures are not always able to perform low-bit integer computations efficiently. The most frequently used low-precision neural network model for mobile central processors is an 8-bit quantized network. However, in a number of cases, it is possible to use fewer bits for weights and activations, and the only problem is the difficulty of efficient implementation. We introduce an efficient implementation of 4-bit matrix multiplication for quantized neural networks and perform time measurements on a mobile ARM processor. It shows 2.9 times speedup compared to standard floating-point multiplication and is 1.5 times faster than 8-bit quantized one. We also demonstrate a 4-bit quantized neural network for OCR recognition on the MIDV-500 dataset. 4-bit quantization gives 95.0% accuracy and 48% overall inference speedup, while an 8-bit quantized network gives 95.4% accuracy and 39% speedup. The results show that 4-bit quantization perfectly suits mobile devices, yielding good enough accuracy and low inference time.

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

↑