LoRA微调可注入新知识,但数据设计不当会损害模型原有能力。
How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?
- 用混合已知与新事实的数据进行LoRA微调效果最佳
- 数据偏倚导致模型过度依赖少数实体,问答准确率下降
- 模型变得过于自信,部分情况下拒绝回答问题
大型语言模型(LLMs)在众多任务上的表现受限于预训练阶段学到的知识。低秩适应(LoRA)是一种高效更新或领域适配LLM的流行方法。本研究探究如何通过LoRA将新知识融入Llama-3.1-8B-instruct而不损害已有知识。实验表明,使用包含已知与新事实混合的数据微调效果最佳。然而,这种策略仍存在风险:模型在外部问答基准上的表现下降;当训练数据偏向特定实体时,模型倾向于回归少数高频答案;此外,模型变得更为自信,仅在少数情况下拒绝作答。这些发现揭示了基于LoRA的LLM更新潜在陷阱,强调训练数据构成与调参对新知识融合与通用能力平衡的重要性。
原文摘要 · Abstract (English)
The performance of Large Language Models (LLMs) on many tasks is greatly limited by the knowledge learned during pre-training and stored in the model's parameters. Low-rank adaptation (LoRA) is a popular and efficient training technique for updating or domain-specific adaptation of LLMs. In this study, we investigate how new facts can be incorporated into the LLM using LoRA without compromising the previously learned knowledge. We fine-tuned Llama-3.1-8B-instruct using LoRA with varying amounts of new knowledge. Our experiments have shown that the best results are obtained when the training data contains a mixture of known and new facts. However, this approach is still potentially harmful because the model's performance on external question-answering benchmarks declines after such fine-tuning. When the training data is biased towards certain entities, the model tends to regress to few overrepresented answers. In addition, we found that the model becomes more confident and refuses to provide an answer in only few cases. These findings highlight the potential pitfalls of LoRA-based LLM updates and underscore the importance of training data composition and tuning parameters to balance new knowledge integration and general model capabilities.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。