用于微调基础模型的黎曼预条件 LoRA
Riemannian Preconditioned LoRA for Fine-Tuning Foundation Models
AI总结:
本文提出一种基于黎曼度量的预条件子以增强 LoRA 微调,理论证明其能稳定无限宽网络的特征学习,实验表明该方法显著提升了 SGD 和 AdamW 的收敛性与鲁棒性且几乎不增加开销。
摘要:
低秩自适应(LoRA)是一种流行的参数高效微调(PEFT)方法,其提出冻结预训练模型权重并更新一个附加的低秩可训练矩阵。在本研究中,我们通过在每个梯度步中引入一个 $r \ imes r$ 预条件子来研究 LoRA 训练的增强,其中 $r$ 为 LoRA 的秩。我们在无限宽 NN 设定下,从理论上验证了所提出的预条件子能稳定 LoRA 的特征学习。在实验中,实现这一新预条件子仅需对现有优化器代码进行微小修改,且产生的存储和运行开销几乎微乎其微。我们在大语言模型和文本到图像扩散模型上的实验结果表明,使用该新预条件子可以显著增强 SGD 和 AdamW 的收敛性和可靠性。此外,训练过程对学习率等超参数选择的鲁棒性大幅提升。该新预条件子可由低秩矩阵场中的一种新颖黎曼度量导出。代码可在 https://github.com/pilancilab/Riemannian_Preconditioned_LoRA 获取。
英文摘要:
Low-Rank Adaptation (LoRA) emerges as a popular parameter-efficient fine-tuning (PEFT) method, which proposes to freeze pretrained model weights and update an additive low-rank trainable matrix. In this work, we study the enhancement of LoRA training by introducing an $r \times r$ preconditioner in each gradient step where $r$ is the LoRA rank. We theoretically verify that the proposed preconditioner stabilizes feature learning with LoRA under infinite-width NN setting. Empirically, the implementation of this new preconditioner requires a small change to existing optimizer code and creates virtually minuscule storage and runtime overhead. Our experimental results with both large language models and text-to-image diffusion models show that with this new preconditioner, the convergence and reliability of SGD and AdamW can be significantly enhanced. Moreover, the training process becomes much more robust to hyperparameter choices such as learning rate. The new preconditioner can be derived from a novel Riemannian metric in low-rank matrix field. Code can be accessed at https://github.com/pilancilab/Riemannian_Preconditioned_LoRA.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。