[论文解读] Training Deep Neural Networks with 8-bit Floating Point Numbers
论文展示了在 FP16 累加和 FP16 权重更新的前提下,使用分块累积和浮点随机舍入实现 8 位浮点数(FP8)对多种 DNN 的成功训练,达到与 FP32 基线相近的准确性,同时降低内存和计算需求。
The state-of-the-art hardware platforms for training Deep Neural Networks (DNNs) are moving from traditional single precision (32-bit) computations towards 16 bits of precision -- in large part due to the high energy efficiency and smaller bit storage associated with using reduced-precision representations. However, unlike inference, training with numbers represented with less than 16 bits has been challenging due to the need to maintain fidelity of the gradient computations during back-propagation. Here we demonstrate, for the first time, the successful training of DNNs using 8-bit floating point numbers while fully maintaining the accuracy on a spectrum of Deep Learning models and datasets. In addition to reducing the data and computation precision to 8 bits, we also successfully reduce the arithmetic precision for additions (used in partial product accumulation and weight updates) from 32 bits to 16 bits through the introduction of a number of key ideas including chunk-based accumulation and floating point stochastic rounding. The use of these novel techniques lays the foundation for a new generation of hardware training platforms with the potential for 2-4x improved throughput over today's systems.
研究动机与目标
- 促使将训练精度降至 8 位而不损失模型精度。
- 介绍 FP8/FP16 格式及技术,以解决累积和更新中的挑战。
- 在标准数据集上对 CNNs 和 DNNs 进行广泛的经验验证。
- 提出硬件高效方法,使吞吐量和能效提升 2-4 倍。
提出的方法
- 为数据和累积定义 FP8 (1,5,2) 和 FP16 (1,6,9) 格式。
- 使用分块累积将长点积分区并减小冲淌误差。
- 对权重更新应用浮点随机舍入,以在舍入过程中保留信息损失。
- 在最后一层 GEMMs 保持 FP16,以稳定 Softmax 计算。
- 采用损失缩放以在反向传播中保留微小梯度。
- 通过对多种网络和数据集的仿真降精度实验进行验证。
实验结果
研究问题
- RQ1在不同模型和数据集上,8 位浮点表示是否可用于训练 DNN 而不损失精度?
- RQ2在训练中使用低精度格式时,如何缓解 swamping 和累积误差?
- RQ3在内存、带宽和能效方面,FP8 训练的实际硬件含义是什么?
- RQ4在 FP8 训练中,首层和末层的精度扮演怎样的角色?
- RQ5舍入模式如何影响 FP8 训练的准确性?
主要发现
- 在 CIFAR-10 CNN、CIFAR-10 ResNet、BN50-DNN、AlexNet、ResNet-18、ResNet-50 上,采用 FP8 训练、FP16 累加和 FP16 权重更新,达到与 FP32 基线相当的测试精度。
- 由于 FP8 权重和 FP16 主副本,权重和主副本的内存减少约 2×。
- 分块累积和浮点随机舍入有效缓解 swamping,促进稳定的 8 位训练。
- 损失缩放以及在最后一层 GEMMs 保留 FP16,稳定了如 ImageNet 这样的庞大数据集上的训练。
- 最近近似舍入会降低精度;随机舍入在 FP16 权重更新时保持基线性能。
- 硬件演示显示 FP8 引擎的能效可能比 FP16 等效实现高出 2-4 倍。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。