Supervised fine-tuning (SFT) is a crucial step for large language models (LLMs), enabling them to align with human instructions and enhance their capabilities in downstream tasks. When the models are required to align with a broader range of downstream tasks, or there is a desire to notably improve the performance on a specific task, a substantial increase in fine-tuning data often emerges as the solution. However, we find that large-scale increases in instruction data can disrupt the world knowledge previously stored in the LLMs, i.e., world knowledge forgetting. In this paper, we introduce LoRAMoE to address above challenge. The LoRAMoE is a plugin version of Mixture of Experts (MoE). The plugin-form ensures the integrity of world knowledge by freezing the backbone model during the training phase. And we propose the use of localized balancing constraints to coordinate parts of experts for task utilization, meanwhile enables other experts to to fully leverage the world knowledge stored in the models. Experimental results demonstrate that LoRAMoE can reasonly coordinate experts based on data type during inference, and even dramatically increasing instruction data does not result in knowledge forgetting. Moreover, LoRAMoE provides additional benefits for the performance of downstream tasks, indicating the potential of our approach for multi-task learning.
翻译:监督微调(SFT)是大语言模型(LLMs)的关键步骤,能够使其与人类指令对齐,并增强在各类下游任务中的能力。当模型需要与更广泛的下游任务对齐,或希望显著提升特定任务的性能时,大幅增加微调数据往往成为解决方案。然而,我们发现指令数据的大规模扩展会破坏LLMs中先前存储的世界知识,即引发世界知识遗忘问题。本文提出LoRAMoE以应对上述挑战。LoRAMoE是混合专家模型(MoE)的插件式实现。其插件形式通过在训练阶段冻结骨干模型来确保世界知识的完整性。我们提出使用局部平衡约束来协调部分专家执行任务分配,同时使其他专家能够充分利用模型中存储的世界知识。实验结果表明,LoRAMoE能够在推理过程中根据数据类型合理协调专家,即使大幅增加指令数据也不会导致知识遗忘。此外,LoRAMoE为下游任务性能带来额外收益,展现了该方法在多任务学习中的潜力。