arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2301.13376cs.LGcs.AIcs.ARcs.CV
收藏

用于保证溢出避免的低精度积累的量化神经网络

Quantized Neural Networks for Low-Precision Accumulation with Guaranteed Overflow Avoidance

AMD(超威半导体)

Ian Colbert, Alessandro Pappalardo, Jakoba Petri-Koenig

摘要:

我们引入了一个量化感知的训练算法,保证避免数值溢出时,减少推理过程中的精度的迭代。我们利用权重归一化作为在训练过程中使用我们推导出的累加器位宽界限来约束参数的一种手段。我们评估我们的算法在多个量化的模型,我们训练不同的任务,表明我们的方法可以降低精度的预测,同时保持模型的精度相对于浮点基线。然后,我们表明,这种减少转化为定制的基于FPGA的加速器的设计效率提高。最后,我们表明,我们的算法不仅限制权重,以适应用户定义的位宽的累加器,但也增加了稀疏性和压缩性的权重。在我们所有使用8位权重和激活训练的基准模型中,我们观察到,将量化神经网络的隐藏层限制为适合16位卷积,平均稀疏度为98.2%,估计压缩率为46.5倍,同时保持99.2%的浮点性能。

英文摘要:

We introduce a quantization-aware training algorithm that guarantees avoiding numerical overflow when reducing the precision of accumulators during inference. We leverage weight normalization as a means of constraining parameters during training using accumulator bit width bounds that we derive. We evaluate our algorithm across multiple quantized models that we train for different tasks, showing that our approach can reduce the precision of accumulators while maintaining model accuracy with respect to a floating-point baseline. We then show that this reduction translates to increased design efficiency for custom FPGA-based accelerators. Finally, we show that our algorithm not only constrains weights to fit into an accumulator of user-defined bit width, but also increases the sparsity and compressibility of the resulting weights. Across all of our benchmark models trained with 8-bit weights and activations, we observe that constraining the hidden layers of quantized neural networks to fit into 16-bit accumulators yields an average 98.2% sparsity with an estimated compression rate of 46.5x all while maintaining 99.2% of the floating-point performance.

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

↑