1-Bit FQT:将全量化训练推向1-bit极限
1-Bit FQT: Pushing the Limit of Fully Quantized Training to 1-bit
AI总结:
本文首次探索1-bit全量化训练极限,基于Adam和SGD理论分析提出激活梯度剪枝与样本通道联合量化策略,在保持硬件友好性的同时显著提升准确率并实现最高5.13倍训练加速。
摘要:
全量化训练(FQT)通过将激活值、权重和梯度量化为低精度来加速深度神经网络的训练。为了探索FQT的终极极限(可达到的最低精度),我们首次尝试了1-bit FQT。我们基于Adam和SGD对FQT进行了理论分析,揭示了梯度方差会影响FQT的收敛性。基于这些理论结果,我们引入了激活梯度剪枝(AGP)策略。该策略通过剪枝信息量较少的梯度并提高剩余梯度的数值精度来缓解梯度方差,从而利用梯度的异质性。此外,我们提出了样本通道联合量化(SCQ),在权重梯度和激活梯度的计算中采用不同的量化策略,以确保该方法对低位宽硬件友好。最后,我们提出了一个框架来部署我们的算法。在多个数据集上对VGGNet-16和ResNet-18进行微调时,与逐样本量化相比,我们的算法实现了约6%的平均准确率提升。此外,与全精度训练相比,我们的训练加速最高可达5.13倍。
英文摘要:
Fully quantized training (FQT) accelerates the training of deep neural networks by quantizing the activations, weights, and gradients into lower precision. To explore the ultimate limit of FQT (the lowest achievable precision), we make a first attempt to 1-bit FQT. We provide a theoretical analysis of FQT based on Adam and SGD, revealing that the gradient variance influences the convergence of FQT. Building on these theoretical results, we introduce an Activation Gradient Pruning (AGP) strategy. The strategy leverages the heterogeneity of gradients by pruning less informative gradients and enhancing the numerical precision of remaining gradients to mitigate gradient variance. Additionally, we propose Sample Channel joint Quantization (SCQ), which utilizes different quantization strategies in the computation of weight gradients and activation gradients to ensure that the method is friendly to low-bitwidth hardware. Finally, we present a framework to deploy our algorithm. For fine-tuning VGGNet-16 and ResNet-18 on multiple datasets, our algorithm achieves an average accuracy improvement of approximately 6%, compared to per-sample quantization. Moreover, our training speedup can reach a maximum of 5.13x compared to full precision training.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。