arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.06564cs.LGcs.AIcs.CL
收藏

SwitchLoRA:切换式低秩适配能够学习全秩信息

SwitchLoRA: Switched Low-Rank Adaptation Can Learn Full-Rank Information

China Mobile (Suzhou) Software Technology Co. Ltd.(中国移动(苏州)软件技术有限公司)

Kaiye Zhou, Shucheng Wang, Jun Xu

AI总结:

本文提出 SwitchLoRA,一种通过频繁平滑替换 LoRA 适配器可训练参数并增量更新低秩子空间的参数高效预训练方法,在降低通信和内存开销的同时超越全秩训练准确率。

摘要:

在大语言模型训练中,LoRA 等参数高效技术能够在微调阶段优化内存使用并降低通信开销与内存占用。然而,在预训练阶段直接应用此类技术会导致性能不佳,主要原因是过早实施低秩训练会显著降低模型准确率。现有方法如 ReLoRA 和 GaLore 尝试通过更新低秩子空间来应对这一挑战,但它们仍未能达到全秩训练的准确率。具体而言,ReLoRA 限制更新频率以保持优化器状态一致性,这阻碍了其紧密逼近全秩训练行为的能力。与此同时,GaLore 依赖奇异值分解(SVD)来近似全秩空间,这在近似过程中引入了准确率损失。在本文中,我们提出 SwitchLoRA,一种参数高效的训练技术,它频繁且平滑地将 LoRA 适配器的可训练参数替换为替代参数。SwitchLoRA 以增量方式更新低秩子空间,每次仅针对少数几个维度,以最小化对优化器状态的影响。这允许更高的更新频率,从而通过使更新后的参数在预训练阶段更紧密地模仿全秩行为来提高准确率。我们的结果表明,SwitchLoRA 实际上超越了全秩训练,在 LLaMA 1.3B 模型上将困惑度从 15.23 降低到 15.01,同时将通信开销降低了 54%,内存使用降低了 13%。此外,在 GLUE 基准上对 SwitchLoRA 预训练模型和全秩预训练模型进行完整微调后,SwitchLoRA 预训练模型相比全秩预训练模型展现出约 1% 的平均准确率提升。

英文摘要:

In the training of large language models, parameter-efficient techniques such as LoRA optimize memory usage and reduce communication overhead and memory usage during the fine-tuning phase. However, applying such techniques directly during the pre-training phase results in poor performance, primarily because the premature implementation of low-rank training significantly reduces model accuracy. Existing methods like ReLoRA and GaLore have attempted to address this challenge by updating the low-rank subspace. However, they still fall short of achieving the accuracy of full-rank training. Specifically, ReLoRA restricts the frequency of updates to preserve optimizer states consistency, hindering its ability to closely approximate full-rank training behavior. Meanwhile, GaLore relies on Singular Value Decomposition (SVD) to approximate the full-rank space, which introduces accuracy loss during the approximation process. In this paper, we introduce SwitchLoRA, a parameter-efficient training technique that frequently and smoothly replaces the trainable parameters of LoRA adapters with alternative parameters. SwitchLoRA updates the low-rank subspace incrementally, targeting only a few dimensions at a time to minimize the impact on optimizer states. This allows a higher update frequency, thereby enhancing accuracy by enabling the updated parameters to more closely mimic full-rank behavior during the pre-training phase. Our results demonstrate that SwitchLoRA actually surpasses full-rank training, reducing perplexity from 15.23 to 15.01 on the LLaMA 1.3B model, while also cutting communication overhead by 54\% and memory usage by 13\%. Furthermore, after full fine-tuning the SwitchLoRA pre-trained model and the full-rank pre-trained model on the GLUE benchmark, the SwitchLoRA pre-trained model showed an average accuracy gain of about 1\% over the full-rank pre-trained model.

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

↑