arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.18466cs.CL
收藏

HFT:大型语言模型的半微调

HFT: Half Fine-Tuning for Large Language Models

Baidu Inc.(百度公司);School of Artificial Intelligence, Beijing University of Posts and Telecommunications(北京邮电大学人工智能学院)

Tingfeng Hui, Zhenyu Zhang, Shuohuan Wang, Weiran Xu, Yu Sun, Hua Wu

AI总结:

本文提出大型语言模型的半微调(HFT)方法,通过冻结一半参数保留旧知识、训练另一半学习新任务,有效缓解灾难性遗忘,在下游基准中取得最佳性能且训练时间减少约30%。

摘要:

具有一个或多个微调阶段的大型语言模型(LLMs)已成为解锁各种能力的必要步骤,使LLMs能够遵循自然语言指令或与人类偏好对齐。然而,这在顺序训练中会带来灾难性遗忘的风险,前一阶段学习到的参数化知识或能力可能会被传入的训练数据所淹没。在本文中,我们发现通过定期重置部分参数,LLMs可以恢复一些原始知识。受此启发,我们为LLMs引入了半微调(HFT),作为全微调(FFT)的替代方案,以缓解遗忘问题,其中一半参数被选择用于学习新任务,而另一半被冻结以保留先前的知识。我们从优化的角度提供了可行性分析,并将参数选择操作解释为正则化项。在不改变模型架构的情况下,HFT可以无缝集成到现有的微调框架中。在监督微调、直接偏好优化和持续学习上的广泛实验和分析一致证明了HFT的有效性、鲁棒性和效率。与FFT相比,HFT不仅显著缓解了遗忘问题,而且在一系列下游基准测试中取得了最佳性能,同时训练时间减少了约30%。

英文摘要:

Large language models (LLMs) with one or more fine-tuning phases have become a necessary step to unlock various capabilities, enabling LLMs to follow natural language instructions or align with human preferences. However, it carries the risk of catastrophic forgetting during sequential training, the parametric knowledge or the ability learned in previous stages may be overwhelmed by incoming training data. In this paper, we find that by regularly resetting partial parameters, LLMs can restore some of the original knowledge. Inspired by this, we introduce Half Fine-Tuning (HFT) for LLMs, as a substitute for full fine-tuning (FFT), to mitigate the forgetting issues, where half of the parameters are selected to learn new tasks while the other half are frozen to remain previous knowledge. We provide a feasibility analysis from the perspective of optimization and interpret the parameter selection operation as a regularization term. Without changing the model architecture, HFT could be seamlessly integrated into existing fine-tuning frameworks. Extensive experiments and analysis on supervised fine-tuning, direct preference optimization, and continual learning consistently demonstrate the effectiveness, robustness, and efficiency of HFT. Compared with FFT, HFT not only significantly alleviates the forgetting problem, but also achieves the best performance in a series of downstream benchmarks, with an approximately 30% reduction in training time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑