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

大语言模型微调中的稀疏矩阵

Sparse Matrix in Large Language Model Fine-tuning

Carnegie Mellon University(卡内基梅隆大学);University of California, Berkeley(加利福尼亚大学伯克利分校)

Haoze He, Juncheng Billy Li, Xuan Jiang, Heather Miller

AI总结:

针对PEFT方法与全量微调存在精度差距的问题,提出稀疏矩阵调优SMT方法,仅更新梯度中关键子矩阵,在多任务上优于LoRA等基准,且GPU内存占用比全量微调低67%。

摘要:

LoRA及其变体因能够避免过高的计算成本,已成为流行的参数高效微调(PEFT)方法。然而,PEFT方法与全量微调(FT)之间往往存在精度差距,且这一差距尚未得到系统研究。在本研究中,我们提出了一种稀疏子矩阵选择方法,旨在缩小PEFT与全量微调(FT)之间的性能差距,同时降低微调的计算成本和内存成本。我们的稀疏矩阵调优(SMT)方法首先识别梯度更新中最重要的子矩阵,在微调过程中仅更新这些块。在实验中,我们证明,在对LLaMA等流行大语言模型进行广泛任务的微调时,SMT的表现始终优于其他PEFT基准(如LoRA和DoRA),同时与全量微调(FT)相比,GPU内存占用减少了67%。我们还研究发现,随着可训练参数数量的增加,LoRA和DoRA的性能往往会趋于平稳甚至下降,相比之下,我们的SMT方法不存在这一问题。

英文摘要:

LoRA and its variants have become popular parameter-efficient fine-tuning (PEFT) methods due to their ability to avoid excessive computational costs. However, an accuracy gap often exists between PEFT methods and full fine-tuning (FT), and this gap has yet to be systematically studied. In this work, we introduce a method for selecting sparse sub-matrices that aim to minimize the performance gap between PEFT vs. full fine-tuning (FT) while also reducing both fine-tuning computational cost and memory cost. Our Sparse Matrix Tuning (SMT) method begins by identifying the most significant sub-matrices in the gradient update, updating only these blocks during the fine-tuning process. In our experiments, we demonstrate that SMT consistently surpasses other PEFT baseline (e.g. LoRA and DoRA) in fine-tuning popular large language models such as LLaMA across a broad spectrum of tasks, while reducing the GPU memory footprint by 67% compared to FT. We also examine how the performance of LoRA and DoRA tends to plateau and decline as the number of trainable parameters increases, in contrast, our SMT method does not suffer from such issue.

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

↑