arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.15102cs.CVcs.LG
收藏

HLQ:通过哈达玛低秩量化实现快速高效的反向传播

HLQ: Fast and Efficient Backpropagation via Hadamard Low-rank Quantization

POSTECH(浦项科技大学)

Seonggon Kim, Eunhyeok Park

AI总结:

针对反向传播优化易影响收敛的难题,提出HLQ策略,对激活梯度做4位哈达玛量化、权重梯度做哈达玛低秩近似,在训练与微调中实现显著内存节省和加速,且精度损失极小。

摘要:

随着模型规模快速增长以及各类微调应用的重要性日益提升,轻量化训练已变得至关重要。由于反向传播的计算开销是前向传播的两倍,优化反向传播过程尤为重要。然而,对该过程的修改可能导致收敛效果不佳,因此训练优化需尽可能减小扰动,这是一项极具挑战性的任务。本研究提出了一种名为Hadamard Low-rank Quantization(哈达玛低秩量化,HLQ)的新型优化策略,聚焦于降低卷积层和线性层的反向传播开销。我们首先分析了梯度计算对激活值和权重的敏感性,精心设计了HLQ流程:对激活梯度应用4位哈达玛量化,对权重梯度应用哈达玛低秩近似。研究发现这种组合是实现收益最大化的最优方案,大量实验证明HLQ在从零训练和微调场景下均表现出色,在真实GPU上实现了显著的内存节省与加速,且质量下降可忽略不计。

英文摘要:

With the rapid increase in model size and the growing importance of various fine-tuning applications, lightweight training has become crucial. Since the backward pass is twice as expensive as the forward pass, optimizing backpropagation is particularly important. However, modifications to this process can lead to suboptimal convergence, so training optimization should minimize perturbations, which is a highly challenging task. In this study, we introduce a novel optimization strategy called Hadamard Low-rank Quantization (HLQ), focusing on reducing the cost of backpropagation in convolutional and linear layers. We first analyze the sensitivity of gradient computation with respect to activation and weight, and judiciously design the HLQ pipeline to apply 4-bit Hadamard quantization to the activation gradient and Hadamard low-rank approximation to the weight gradient. This combination was found to be the best for maximizing benefits, and our extensive experiments demonstrate the outstanding performance of HLQ in both training from scratch and fine-tuning, achieving significant memory savings and acceleration on real GPUs with negligible quality degradation.

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

↑