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 the 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. We then propose the use of localized balancing constraints to coordinate parts of experts for task utilization, meanwhile enabling other experts to fully leverage the world knowledge stored in the models. Experimental results demonstrate that LoRAMoE can reasonably 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对下游任务性能提供了额外增益,表明该方法在多任务学习中的潜力。