We study and quantify the problem of forgetting when fine-tuning pre-trained large language models (LLMs) on a downstream task. We find that parameter-efficient fine-tuning (PEFT) strategies, such as Low-Rank Adapters (LoRA), still suffer from catastrophic forgetting. In particular, we identify a strong inverse linear relationship between the fine-tuning performance and the amount of forgetting when fine-tuning LLMs with LoRA. We further obtain precise scaling laws that show forgetting increases as a shifted power law in the number of parameters fine-tuned and the number of update steps. We also examine the impact of forgetting on knowledge, reasoning, and the safety guardrails trained into Llama 2 7B chat. Our study suggests that forgetting cannot be avoided through early stopping or by varying the number of parameters fine-tuned. We believe this opens up an important safety-critical direction for future research to evaluate and develop fine-tuning schemes which mitigate forgetting
翻译:我们研究并量化了在下游任务上微调预训练大型语言模型(LLM)时出现的遗忘问题。研究发现,参数高效微调(PEFT)策略(如低秩适配器LoRA)仍会遭受灾难性遗忘。具体而言,我们揭示了在使用LoRA微调LLM时,微调性能与遗忘程度之间存在显著的逆线性关系。进一步地,我们获得了精确的缩放定律,表明遗忘量随微调参数数量和更新步数呈移位幂律增长。我们还考察了遗忘对Llama 2 7B聊天模型中已训练的知识、推理能力及安全护栏的影响。研究表明,通过早停或改变微调参数数量无法避免遗忘。我们认为这为未来研究开辟了评估与开发缓解遗忘的微调方案这一重要的安全关键方向。