LoRA-One:一步全梯度足以高效且可证明地微调大型语言模型
LoRA-One: One-Step Full Gradient Could Suffice for Fine-Tuning Large Language Models, Provably and Efficiently
AI总结:
本文提出理论驱动的LoRA-One算法,利用一步全梯度初始化适配器实现子空间对齐,保证线性收敛,并在多个基准上超越LoRA。
摘要:
本文探讨了理论如何指导并增强实用算法,以大型语言模型中的低秩自适应(LoRA,Hu等人,2022)作为案例研究。我们严格证明了在梯度下降下,LoRA适配器与一步全微调梯度的特定奇异子空间对齐。这一结果表明,通过使用一步全梯度适当初始化适配器,可以立即实现子空间对齐,并且适用于线性和非线性模型。基于我们的理论,我们提出了一种理论驱动的算法LoRA-One,其中线性收敛(以及泛化)被建立,并且纳入预处理器理论上有助于缓解病态条件的影响。此外,我们的理论揭示了LoRA-One与其他基于梯度对齐的方法之间的联系,有助于澄清此类算法设计中的误解。LoRA-One在自然语言理解、数学推理和代码生成的基准测试中,相较于LoRA及其变体取得了显著的实证改进。代码可在https://github.com/YuanheZ/LoRA-One获取。
英文摘要:
This paper explores how theory can guide and enhance practical algorithms, using Low-Rank Adaptation (LoRA, Hu et al. 2022) in large language models as a case study. We rigorously prove that, under gradient descent, LoRA adapters align with specific singular subspaces of the one-step full fine-tuning gradient. This result suggests that, by properly initializing the adapters using the one-step full gradient, subspace alignment can be achieved immediately and applicable to both linear and nonlinear models. Building on our theory, we propose a theory-driven algorithm, LoRA-One, where the linear convergence (as well as generalization) is built and incorporating preconditioners theoretically helps mitigate the effects of ill-conditioning. Besides, our theory reveals connections between LoRA-One and other gradient-alignment-based methods, helping to clarify misconceptions in the design of such algorithms. LoRA-One achieves significant empirical improvements over LoRA and its variants across benchmarks in natural language understanding, mathematical reasoning, and code generation. Code is available at: https://github.com/YuanheZ/LoRA-One.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。