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

AGoQ:激活与梯度量化用于低内存分布式训练大语言模型

AGoQ: Activation and Gradient Quantization for Memory-Efficient Distributed Training of LLMs

School of Computer Science(计算机科学学院);Technology, Harbin Institute of Technology, Shenzhen(技术学院,哈尔滨工业大学,深圳);Huawei Technologies Ltd(华为技术有限公司)

Wenxiang Lin, Juntao Huang, Luhan Zhang, Laili Li, Xiang Bao, Mengyang Zhang, Bing Wang, Shaohuai Shi

AI总结:

AGoQ通过层感知激活量化和梯度量化技术,实现近4位激活存储和8位梯度存储,降低内存使用并提升训练速度,实验表明在不同规模LLM上内存减少达52%,训练速度提升1.34倍。

摘要:

量化是减少训练大语言模型(LLMs)GPU内存需求的关键方法。然而,当前方法在4位激活和8位梯度上效果不佳,容易导致收敛缓慢或精度损失。为此,我们引入AGoQ,包含两种新方法:1)层感知激活量化算法,根据层类型和流水线阶段分配适当的位宽,实现近4位激活存储;2)梯度量化算法,通过8位梯度存储和精度保持的8位All-Reduce通信减少内存使用并缩短通信时间。我们在两个GPU集群(最多64个GPU)上对不同规模的LLM进行广泛实验,实验结果表明,我们的AGoQ在8B至32B LLaMA模型上,内存减少达52%,训练速度提升达1.34倍,同时在预训练中实现收敛损失,下游任务的准确性与LLaMA架构相媲美。

英文摘要:

Quantization is a key method for reducing the GPU memory requirement of training large language models (LLMs). Yet, current approaches are ineffective for 4-bit activations and 8-bit gradients, which would easily cause slow convergence or accuracy loss. To address this, we introduce AGoQ, incorporating two new techniques: 1) a layer-aware activation quantization algorithm that allocates appropriate bit-widths for activations of various layers based on their types and pipeline stages to achieve near 4-bit activation storage, and 2) a gradient quantization algorithm that reduces memory usage and shortens communication time by employing 8-bit gradient storage and precision-preserving 8-bit All-Reduce communication. We conduct extensive experiments using different sizes of LLMs on two GPU clusters (up to 64 GPUs), and the experimental results show that our AGoQ reduces the memory by up to 52\% and achieves up to 1.34$\times$ improvement of training speed compared to state-of-the-art training systems Megatron-LM (w/ or w/o ZeRO), COAT and DeepSpeed with 8B to 32B LLaMA models, while achieving convergence loss on pretraining and comparable accuracy on downstream tasks with LLaMA architectures.

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

↑