在不损害大语言模型性能的前提下,LoRA适配器能承载多少知识?
How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?
February 20, 2025
作者: Sergey Pletenev, Maria Marina, Daniil Moskovskiy, Vasily Konovalov, Pavel Braslavski, Alexander Panchenko, Mikhail Salnikov
cs.AI
摘要
大型语言模型(LLMs)在许多任务上的表现,很大程度上受限于预训练期间学习并存储于模型参数中的知识。低秩适应(LoRA)作为一种流行且高效的训练技术,常用于LLMs的更新或领域特定适应。本研究探讨了如何在不损害已学知识的前提下,利用LoRA将新事实融入LLM。我们采用LoRA对Llama-3.1-8B-instruct进行了微调,并引入了不同量的新知识。实验表明,当训练数据混合已知与新事实时,效果最佳。然而,这种方法仍存在潜在风险,因为微调后模型在外部问答基准上的表现有所下降。当训练数据偏向某些实体时,模型倾向于回归到少数过度代表的答案。此外,我们发现模型在仅少数情况下变得更加自信,并拒绝提供答案。这些发现揭示了基于LoRA的LLM更新可能存在的陷阱,并强调了训练数据构成与调参在平衡新知识整合与模型通用能力方面的重要性。
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.Summary
AI-Generated Summary