MGS:用于精确低比特浮点累加的马尔可夫贪心和
MGS: Markov Greedy Sums for Accurate Low-Bitwidth Floating-Point Accumulation
AI总结:
针对低比特浮点累加的数值误差问题,提出MGS算法,通过指数排序与尾数无溢出求和减少淹没误差,在8位浮点推理中实现与高精度基线相当的分类精度,其dMAC硬件单元功耗降低达34.1%。
摘要:
我们提出一种名为MGS(马尔可夫贪心和)的新方法,以提高神经网络计算中低比特浮点点积的精度。在传统32位浮点求和中,添加具有不同指数的值可能导致较小项的尾数精度损失,因为较小项会右移以与较大项的指数对齐。这种移位(也称为“淹没”)是实现低比特点积(例如8位浮点)时累加数值误差的重要来源,因为尾数的比特数很少。我们通过基于指数排列点积求和中的项,并在不溢出低比特累加器的情况下对尾数求和,避免了大多数淹没误差。我们设计、分析并实现了该算法,以最小化多个神经网络推理时的8位浮点误差。与传统顺序求和相比,我们的方法显著降低了数值误差,在多个图像分类任务中实现了与高精度浮点基线相当的分类精度。我们的dMAC硬件单元相对于传统MAC单元可降低高达34.1%的功耗。
英文摘要:
We offer a novel approach, MGS (Markov Greedy Sums), to improve the accuracy of low-bitwidth floating-point dot products in neural network computations. In conventional 32-bit floating-point summation, adding values with different exponents may lead to loss of precision in the mantissa of the smaller term, which is right-shifted to align with the larger term's exponent. Such shifting (a.k.a. 'swamping') is a significant source of numerical errors in accumulation when implementing low-bitwidth dot products (e.g., 8-bit floating point) as the mantissa has a small number of bits. We avoid most swamping errors by arranging the terms in dot product summation based on their exponents and summing the mantissas without overflowing the low-bitwidth accumulator. We design, analyze, and implement the algorithm to minimize 8-bit floating point error at inference time for several neural networks. In contrast to traditional sequential summation, our method has significantly lowered numerical errors, achieving classification accuracy on par with high-precision floating-point baselines for multiple image classification tasks. Our dMAC hardware units can reduce power consumption by up to 34.1\% relative to conventional MAC units.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。