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

一种支持随机舍入的低精度浮点MAC用于DNN训练

A Stochastic Rounding-Enabled Low-Precision Floating-Point MAC for DNN Training

Sami Ben Ali, Silviu-Ioan Filip, Olivier Sentieys

AI总结:

本文提出了一种支持随机舍入的FP8乘法器和FP12累加的MAC单元,通过优化SR实现和移除次正规值支持来减少面积和功耗,在保持模型精度的同时显著降低延迟和能耗。

摘要:

训练深度神经网络(DNNs)在计算上可能要求很高,尤其是在处理大型模型时。最近的工作旨在通过引入8位浮点(FP8)格式进行乘法运算来缓解这一计算挑战。然而,累加仍然使用半精度(16位)或单精度(32位)算术运算。在本文中,我们研究了在保持相同模型精度的同时降低累加器字长。我们提出了一种乘加(MAC)单元,具有FP8乘法器输入和FP12累加,它利用优化的随机舍入(SR)实现来减轻低精度累加期间常见的淹没误差。我们研究了与改变用于舍入操作的随机位数相关的硬件影响和精度影响。我们还尝试通过提出一种在浮点MAC中支持SR的新方案并移除对次正规值的支持来减少MAC的面积和功耗。与经典的惰性SR设计相比,我们优化的急切SR单元显著减少了延迟和面积。此外,与使用单精度或半精度加法器的MAC相比,我们的设计在所有指标上都显示出显著的节省。此外,我们的方法在各种计算机视觉任务中始终保持着接近基线的精度,使其成为低精度DNN训练的有前途的替代方案。

英文摘要:

Training Deep Neural Networks (DNNs) can be computationally demanding, particularly when dealing with large models. Recent work has aimed to mitigate this computational challenge by introducing 8-bit floating-point (FP8) formats for multiplication. However, accumulations are still done in either half (16-bit) or single (32-bit) precision arithmetic. In this paper, we investigate lowering accumulator word length while maintaining the same model accuracy. We present a multiply-accumulate (MAC) unit with FP8 multiplier inputs and FP12 accumulations, which leverages an optimized stochastic rounding (SR) implementation to mitigate swamping errors that commonly arise during low precision accumulations. We investigate the hardware implications and accuracy impact associated with varying the number of random bits used for rounding operations. We additionally attempt to reduce MAC area and power by proposing a new scheme to support SR in floating-point MAC and by removing support for subnormal values. Our optimized eager SR unit significantly reduces delay and area when compared to a classic lazy SR design. Moreover, when compared to MACs utilizing single-or half-precision adders, our design showcases notable savings in all metrics. Furthermore, our approach consistently maintains near baseline accuracy across a diverse range of computer vision tasks, making it a promising alternative for low-precision DNN training.

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

↑