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

混合精度浮点分配的训练

Training with Mixed-Precision Floating-Point Assignments

Stanford University(斯坦福大学);Microsoft Research(微软研究院)

Wonyeol Lee, Rahul Sharma, Alex Aiken

AI总结:

提出一种为卷积神经网络生成混合精度浮点分配的技术,在保持训练精度的同时实现超过2倍的内存减少,并避免训练发散,优于先前方法。

摘要:

在训练深度神经网络时,将所有张量保持在高精度(例如,32位甚至16位浮点数)通常是浪费的。然而,将所有张量保持在低精度(例如,8位浮点数)可能导致不可接受的精度损失。因此,使用一种精度分配——即从训练中出现的所有张量到精度级别(高或低)的映射——至关重要,这种分配使大多数张量保持低精度,同时产生足够准确的模型。我们提供了一种技术,通过为卷积神经网络生成精度分配来探索这种内存-精度权衡,与先前低精度浮点训练工作中考虑的精度分配相比,这种分配(i)使用更少的内存,并且(ii)同时产生更准确的卷积网络。我们通过在CIFAR-10、CIFAR-100和ImageNet上训练卷积网络来评估我们的技术在图像分类任务上的表现。我们的方法通常在保持训练精度的同时,相对于基线精度分配提供超过2倍的内存减少,并通过权衡精度提供进一步的减少。与其他有时导致训练发散的基线相比,我们的方法在避免发散的同时提供相似或更好的内存减少。

英文摘要:

When training deep neural networks, keeping all tensors in high precision (e.g., 32-bit or even 16-bit floats) is often wasteful. However, keeping all tensors in low precision (e.g., 8-bit floats) can lead to unacceptable accuracy loss. Hence, it is important to use a precision assignment -- a mapping from all tensors (arising in training) to precision levels (high or low) -- that keeps most of the tensors in low precision and leads to sufficiently accurate models. We provide a technique that explores this memory-accuracy tradeoff by generating precision assignments for convolutional neural networks that (i) use less memory and (ii) lead to more accurate convolutional networks at the same time, compared to the precision assignments considered by prior work in low-precision floating-point training. We evaluate our technique on image classification tasks by training convolutional networks on CIFAR-10, CIFAR-100, and ImageNet. Our method typically provides > 2x memory reduction over a baseline precision assignment while preserving training accuracy, and gives further reductions by trading off accuracy. Compared to other baselines which sometimes cause training to diverge, our method provides similar or better memory reduction while avoiding divergence.

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

↑