arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2104.14129cs.LGcs.CVstat.ML
收藏

ActNN:通过2位激活压缩训练减少训练内存占用

ActNN: Reducing Training Memory Footprint via 2-Bit Activation Compressed Training

University of California, Berkeley(加州大学伯克利分校)

Jianfei Chen, Lianmin Zheng, Zhewei Yao, Dequan Wang, Ion Stoica, Michael W. Mahoney, Joseph E. Gonzalez

摘要:

神经网络模型的大小不断增加,对于提高其准确性至关重要,但设备内存却没有以相同的速度增长。这给在有限的内存环境中训练神经网络带来了根本性的挑战。在这项工作中,我们提出了ActNN,这是一个记忆效率高的训练框架,可以存储随机量化的激活以进行反向传播。我们证明了一般网络架构的ActNN的收敛性,并通过梯度方差的精确表达式来表征量化对收敛性的影响。使用我们的理论,我们提出了新的混合精度的量化策略,利用激活的异质性跨特征维度,样本和层。这些技术可以很容易地应用于现有的动态图框架,如PyTorch,只需替换层。我们评估ActNN的主流计算机视觉模型的分类,检测和分割任务。在所有这些任务中,ActNN平均将激活压缩到2位,精度损失可以忽略不计。ActNN将激活的内存占用减少了12倍,并且可以使用6.6倍到14倍的批量大小进行训练。

英文摘要:

The increasing size of neural network models has been critical for improvements in their accuracy, but device memory is not growing at the same rate. This creates fundamental challenges for training neural networks within limited memory environments. In this work, we propose ActNN, a memory-efficient training framework that stores randomly quantized activations for back propagation. We prove the convergence of ActNN for general network architectures, and we characterize the impact of quantization on the convergence via an exact expression for the gradient variance. Using our theory, we propose novel mixed-precision quantization strategies that exploit the activation's heterogeneity across feature dimensions, samples, and layers. These techniques can be readily applied to existing dynamic graph frameworks, such as PyTorch, simply by substituting the layers. We evaluate ActNN on mainstream computer vision models for classification, detection, and segmentation tasks. On all these tasks, ActNN compresses the activation to 2 bits on average, with negligible accuracy loss. ActNN reduces the memory footprint of the activation by 12x, and it enables training with a 6.6x to 14x larger batch size.

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

↑