arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.19616cs.LGcs.AI
收藏

用于高效LLM训练的梯度权重归一化低秩投影

Gradient Weight-normalized Low-rank Projection for Efficient LLM Training

University of Amsterdam(阿姆斯特丹大学)

Jia-Hong Huang, Yixian Shen, Hongyi Zhu, Stevan Rudinac, Evangelos Kanoulas

AI总结:

本文提出GradNormLoRP,通过权重归一化与权重、梯度低秩近似降低LLM训练内存,在保持性能的同时支持消费级GPU预训练并优于LoRA。

摘要:

大语言模型(LLM)已在各类任务中展现出卓越性能,但计算资源需求不断攀升带来了重大挑战,尤其是在下游任务中大规模使用全量微调时。为解决这一问题,参数高效微调(PEFT)方法已被提出,但它们的性能通常不及全量微调,并且在内存效率方面存在困难。本文提出梯度权重归一化低秩投影(GradNormLoRP),这是一种同时提升参数效率和内存效率、并保持与全量微调相当性能的新方法。GradNormLoRP对权重矩阵进行归一化以改善梯度条件,从而在优化过程中促进更好的收敛。此外,它对权重矩阵和梯度矩阵应用低秩近似,显著降低训练期间的内存占用。大量实验表明,8-bit GradNormLoRP将优化器内存使用量最多降低89.5%,并使LLaMA 7B等大型LLM能够在NVIDIA RTX 4090等消费级GPU上进行预训练,且不会产生额外推理成本。此外,GradNormLoRP在微调任务中优于现有低秩方法。例如,在所有GLUE任务上以秩8微调RoBERTa模型时,GradNormLoRP取得80.65的平均分数,超过LoRA的79.23分。这些结果表明,GradNormLoRP是高效LLM预训练和微调的一种有前景的替代方案。源代码:https://github.com/Jhhuangkay/Gradient-Weight-normalized-Low-rank-Projection-for-Efficient-LLM-Training

英文摘要:

Large Language Models (LLMs) have shown remarkable performance across various tasks, but the escalating demands on computational resources pose significant challenges, particularly in the extensive utilization of full fine-tuning for downstream tasks. To address this, parameter-efficient fine-tuning (PEFT) methods have been developed, but they often underperform compared to full fine-tuning and struggle with memory efficiency. In this work, we introduce Gradient Weight-Normalized Low-Rank Projection (GradNormLoRP), a novel approach that enhances both parameter and memory efficiency while maintaining comparable performance to full fine-tuning. GradNormLoRP normalizes the weight matrix to improve gradient conditioning, facilitating better convergence during optimization. Additionally, it applies low-rank approximations to the weight and gradient matrices, significantly reducing memory usage during training. Extensive experiments demonstrate that our 8-bit GradNormLoRP reduces optimizer memory usage by up to 89.5% and enables the pre-training of large LLMs, such as LLaMA 7B, on consumer-level GPUs like the NVIDIA RTX 4090, without additional inference costs. Moreover, GradNormLoRP outperforms existing low-rank methods in fine-tuning tasks. For instance, when fine-tuning the RoBERTa model on all GLUE tasks with a rank of 8, GradNormLoRP achieves an average score of 80.65, surpassing LoRA's score of 79.23. These results underscore GradNormLoRP as a promising alternative for efficient LLM pre-training and fine-tuning. Source code: https://github.com/Jhhuangkay/Gradient-Weight-normalized-Low-rank-Projection-for-Efficient-LLM-Training

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

↑