让大模型学新知识不丢指令理解能力,只需轻量合并权重。
DKL: Decoupled Knowledge Learning for Instruction-Tuned Language Models

- 在基础模型上做扩展预训练,再合并到指令微调模型中
- 检索失败时准确率从54.17提升至79.26,用更少数据达更好效果
- 适合无指令微调数据的场景,避免昂贵训练开销
RAG已成为将新语料知识注入指令遵循型大模型(Instruct LLM)的标准方法。尽管基于RAG的提示能提升事实准确性,但当检索错误或不全时仍会引发幻觉。现有微调方法如RAFT和PA-RAG通过生成大量合成QA将知识注入模型参数,但需海量合成数据。在语料上进行扩展预训练(EPT)可避免合成数据生成,却损害了Instruct LLM的指令遵循能力,需后续指令微调(IFT),而后者成本高且可能因缺乏指令微调语料无法实现。本文提出DKL——解耦知识学习方法,不直接在Instruct LLM上做EPT,而是对对应的基础模型进行EPT以注入新知识,再将知识权重合并至Instruct LLM,实现知识迁移而不影响其指令遵循能力。DKL为轻量级方法,无需昂贵的指令微调,仅靠模型合并即可注入知识且保持原有指令理解能力。实验证明,该方法在检索失败情况下将RAG准确率从54.17提升至79.26,优于先前方法,且所需训练数据显著更少。
原文摘要 · Abstract (English)
RAG has become the de facto method for incorporating new, corpus-specific knowledge into an instruction following LLM (Instruct LLM). Although RAG-based prompting improves factual grounding, it fails when retrieval is incorrect or incomplete, leading to hallucinations. Finetuning methods such as RAFT and PA-RAG enhance RAG by injecting new knowledge into the model's parameters, but require generating a massive amount of synthetic QA that covers the entire corpus. Extended Pre-Training (EPT) on the text corpus avoids the need for comprehensive synthetic data generation but compromises an Instruct LLM's instruction-following capabilities, necessitating instruction fine-tuning (IFT) after pre-training. However, IFT is costly and may be infeasible due to the unavailability of an instruction-tuning corpus. In this work, we propose DKL-Decoupled Knowledge Learning for Instruction-Tuned Language Models. Instead of doing EPT on the Instruct LLM, DKL performs EPT on its corresponding base LLM to infuse new knowledge. These knowledge infused weights are then merged with the Instruct LLM, imparting new knowledge without affecting their instruction-following capabilities. DKL is a lightweight method that avoids expensive instruction fine-tuning and relies on model merging to infuse the new knowledge into the Instruct LLM without destroying its instruction following capabilities. Empirical results show that DKL improves RAG accuracy from 54.17 to 79.26 on retrieval failure cases, while outperforming prior approaches with substantially less training data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。