A lot of recent progress has been made in ultra low-bit quantization, promising significant improvements in latency, memory footprint and energy consumption on edge devices. Quantization methods such as Learned Step Size Quantization can achieve model accuracy that is comparable to full-precision floating-point baselines even with sub-byte quantization. However, it is extremely challenging to deploy these ultra low-bit quantized models on mainstream CPU devices because commodity SIMD (Single Instruction, Multiple Data) hardware typically supports no less than 8-bit precision. To overcome this limitation, we propose DeepGEMM, a lookup table based approach for the execution of ultra low-precision convolutional neural networks on SIMD hardware. The proposed method precomputes all possible products of weights and activations, stores them in a lookup table, and efficiently accesses them at inference time to avoid costly multiply-accumulate operations. Our 2-bit implementation outperforms corresponding 8-bit integer kernels in the QNNPACK framework by up to 1.74x on x86 platforms.
翻译:近年来,超低位量化取得了很多进展,在边缘设备上承诺显著改善延迟、内存占用和能源消耗。像 Learned Step Size Quantization 这样的量化方法可以在子字节量化下实现可与完全精度浮点基线相当的模型准确性。然而,在主流CPU设备上部署这些超低位量化模型非常具有挑战性,因为通用的单指令多数据( SIMD )硬件通常支持至少8位精度。为了克服这个限制,我们提出了 DeepGEMM,一种基于查找表的方法,用于在 SIMD 硬件上执行超低精度卷积神经网络。所提出的方法预先计算所有可能的权重和激活的乘积,将它们存储在一个查找表中,并在推断时高效地访问它们,以避免昂贵的乘积累加运算。我们的2位实现在x86平台上比相应的 QNNPACK 框架中的8位整数内核性能提高了高达1.74倍。