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

通过指令向量优化大语言模型微调

Refine Large Language Model Fine-tuning via Instruction Vector

University of Science and Technology of China(中国科学技术大学);Nanyang Technological University(南洋理工大学)

Gangwei Jiang, Zhaoyi Li, Defu Lian, Ying Wei

AI总结:

本文针对微调大语言模型导致通用能力遗忘的问题,提出指令向量框架分析遗忘机制,发现微调多添加推理模式而非抹去技能,进而开发IV引导训练缓解遗忘,实证测试验证了有效性。

摘要:

微调大语言模型(LLMs)可能导致其丧失通用能力,但这种遗忘背后的内在机制尚未被探索。本文首先通过聚焦知识理解和指令遵循来研究这一现象,其中指令遵循被确定为微调期间遗忘的主要原因。因此,我们提出指令向量(IV)框架,以捕捉与特定指令遵循能力高度相关的模型表示,从而能够理解模型内在的遗忘。通过分析训练前后的IV动态,我们发现微调主要添加了专门的推理模式,而非抹去先前的技能,这种情况可能表现为遗忘。基于这一见解,我们开发了IV引导训练,旨在保留原始计算图,从而缓解灾难性遗忘。在三个基准上的实证测试证实了这种新方法的有效性,支持了IV与遗忘之间的关系。我们的代码将很快公开。

英文摘要:

Fine-tuning large language models (LLMs) can cause them to lose their general capabilities. However, the intrinsic mechanisms behind such forgetting remain unexplored. In this paper, we begin by examining this phenomenon by focusing on knowledge understanding and instruction following, with the latter identified as the main contributor to forgetting during fine-tuning. Consequently, we propose the Instruction Vector (IV) framework to capture model representations highly related to specific instruction-following capabilities, thereby making it possible to understand model-intrinsic forgetting. Through the analysis of IV dynamics pre and post-training, we suggest that fine-tuning mostly adds specialized reasoning patterns instead of erasing previous skills, which may appear as forgetting. Building on this insight, we develop IV-guided training, which aims to preserve original computation graph, thereby mitigating catastrophic forgetting. Empirical tests on three benchmarks confirm the efficacy of this new approach, supporting the relationship between IVs and forgetting. Our code will be made available soon.

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

↑