Low-Rank Adaptation (LoRA) is the leading parameter-efficient fine-tuning method for Large Language Models (LLMs), but it still suffers from catastrophic forgetting. Recent work has shown that specialized LoRA initialization can alleviate catastrophic forgetting. There are currently two approaches to LoRA initialization aimed at preventing knowledge forgetting during fine-tuning: (1) making residual weights close to pre-trained weights, and (2) ensuring the space of LoRA initialization is orthogonal to pre-trained knowledge. The former is what current methods strive to achieve, while the importance of the latter is not sufficiently recognized. We find that the space of LoRA initialization is the key to preserving pre-trained knowledge rather than the residual weights. Existing methods like MiLoRA propose making the LoRA initialization space orthogonal to pre-trained weights. However, MiLoRA utilizes the null space of pre-trained weights. Compared to pre-trained weights, the input activations of pre-trained knowledge take into account the parameters of all previous layers as well as the input data, while pre-trained weights only contain information from the current layer. Moreover, we find that the effective ranks of input activations are much smaller than those of pre-trained weights. Thus, the null space of activations is more accurate and contains less pre-trained knowledge information compared to that of weights. Based on these, we introduce LoRA-Null, our proposed method that initializes LoRA in the null space of activations. Experimental results show that LoRA-Null effectively preserves the pre-trained world knowledge of LLMs while achieving good fine-tuning performance, as evidenced by extensive experiments. Code is available at {https://github.com/HungerPWAY/LoRA-Null}.


翻译:低秩适应(LoRA)是大语言模型(LLMs)主流的参数高效微调方法,但仍存在灾难性遗忘问题。近期研究表明,专门的LoRA初始化可以缓解灾难性遗忘。目前存在两种旨在防止微调过程中知识遗忘的LoRA初始化方法:(1)使残差权重接近预训练权重;(2)确保LoRA初始化空间与预训练知识正交。现有方法致力于实现前者,而后者的重要性尚未得到充分认识。我们发现,LoRA初始化空间才是保留预训练知识的关键,而非残差权重。现有方法如MiLoRA提出使LoRA初始化空间与预训练权重正交,但MiLoRA利用的是预训练权重的零空间。相较于预训练权重,预训练知识的输入激活不仅包含当前层参数,还考虑了所有前序层的参数及输入数据,而预训练权重仅包含当前层信息。此外,我们发现输入激活的有效秩远小于预训练权重的有效秩。因此,与权重的零空间相比,激活的零空间更为精确且包含更少的预训练知识信息。基于此,我们提出LoRA-Null方法,将LoRA初始化于激活的零空间中。实验结果表明,LoRA-Null在保持良好微调性能的同时,能有效保留LLMs的预训练世界知识,大量实验数据证实了这一点。代码发布于{https://github.com/HungerPWAY/LoRA-Null}。

0
下载
关闭预览

相关内容

在搭建网络模型时,需要随机初始化参数,然后开始训练网络,不断调整直到网络的损失越来越小。在训练的过程中,一开始初始化的参数会不断变化。当参数训练到比较好的时候就可以将训练模型的参数保存下来,以便训练好的模型可以在下次执行类似任务时获得较好的结果。
【ICLR2025】大型语言模型的动态低秩稀疏适应
专知会员服务
14+阅读 · 2025年2月21日
TransMLA:多头潜在注意力(MLA)即为所需
专知会员服务
23+阅读 · 2025年2月13日
【ICLR2025】RANDLORA: 全秩参数高效微调大规模模型
专知会员服务
15+阅读 · 2025年2月4日
Llama-3-SynE:实现有效且高效的大语言模型持续预训练
专知会员服务
36+阅读 · 2024年7月30日
大语言模型的LoRA研究综述
专知会员服务
54+阅读 · 2024年7月17日
【ACL2024】DoRA:通过动态秩分布增强参数高效微调
专知会员服务
7+阅读 · 2024年5月28日
【ICLR2024】MathVista:视觉背景下基础模型的数学推理评估
专知会员服务
35+阅读 · 2024年1月20日
图机器学习经典算法 louvain 完全解读
图与推荐
11+阅读 · 2020年8月10日
读扩散?写扩散?推拉架构一文搞定!
架构师之路
17+阅读 · 2019年2月1日
【强化学习】强化学习/增强学习/再励学习介绍
产业智能官
10+阅读 · 2018年2月23日
用Rasa NLU构建自己的中文NLU系统
待字闺中
18+阅读 · 2017年9月18日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
39+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
39+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员