arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2408.03092cs.CL
收藏

通过权重解耦将模型合并从微调大语言模型扩展到预训练大语言模型

Extend Model Merging from Fine-Tuned to Pre-Trained Large Language Models via Weight Disentanglement

Alibaba Group(阿里巴巴集团)

Le Yu, Bowen Yu, Haiyang Yu, Fei Huang, Yongbin Li

AI总结:

本文提出权重解耦方法 WIDEN,将模型合并从微调 LLM 扩展到参数变化更大的预训练 LLM,通过分离幅值与方向并自适应融合,成功将 Sailor 的多语言能力注入 Qwen1.5-Chat,并在多个 FT LLM 上实现均衡能力融合。

摘要:

大语言模型(LLMs)合并旨在将多个同源 LLM 融合为一个具备全部能力的模型。理想情况下,任何共享相同骨干网络的 LLM 都应当可合并,无论它们是参数变化较小的微调(FT)模型,还是参数偏移较大的预训练(PT)模型。然而,现有方法通常手动指定模型重要性,使其仅适用于参数变化相似的 LLM,例如多个 FT LLM。FT 与 PT LLM 之间不同的参数变化范围给当前解决方案在经验上确定最优组合带来了挑战。在本文中,我们做出了开创性努力,将合并技术的适用范围从 FT LLM 扩展到 PT LLM。我们首先考察了当前方法在合并 FT 与 PT LLM 时的有效性,发现它们难以处理 PT LLM。随后,我们提出了一种基于权重解耦(WIDEN)的方法来有效扩展合并范围,该方法首先将模型权重解耦为幅值和方向两个分量,然后根据它们各自的贡献进行自适应融合。在实验中,我们在 7B 和 14B 模型规模上合并了 Qwen1.5-Chat(具备指令跟随能力的 FT LLM)与 Sailor(具备多语言能力的 PT LLM)。结果表明:(1)现有解决方案在合并 Sailor 时通常会失败,要么同时丧失两种能力,要么仅保留指令跟随能力;(2)WIDEN 成功将 Sailor 的多语言能力注入 Qwen1.5-Chat,使其精通东南亚语言,并在基础能力上取得提升。结合先前研究,我们还合并了多个 13B FT LLM,并观察到 WIDEN 在指令跟随、数学推理和代码生成能力上实现了均衡融合。

英文摘要:

Merging Large Language Models (LLMs) aims to amalgamate multiple homologous LLMs into one with all the capabilities. Ideally, any LLMs sharing the same backbone should be mergeable, irrespective of whether they are Fine-Tuned (FT) with minor parameter changes or Pre-Trained (PT) with substantial parameter shifts. However, existing methods often manually assign the model importance, rendering them feasible only for LLMs with similar parameter alterations, such as multiple FT LLMs. The diverse parameter changed ranges between FT and PT LLMs pose challenges for current solutions in empirically determining the optimal combination. In this paper, we make a pioneering effort to broaden the applicability of merging techniques from FT to PT LLMs. We initially examine the efficacy of current methods in merging FT and PT LLMs, discovering that they struggle to deal with PT LLMs. Subsequently, we introduce an approach based on WeIght DisENtanglement (WIDEN) to effectively extend the merging scope, which first disentangles model weights into magnitude and direction components, and then performs adaptive fusion by considering their respective contributions. In the experiments, we merge Qwen1.5-Chat (an FT LLM with instruction-following skills) with Sailor (a PT LLM with multilingual abilities) across 7B and 14B model scales. Results reveal that: (1) existing solutions usually fail when merging Sailor, either losing both abilities or only retaining instruction-following skills; (2) WIDEN successfully injects the multilingual abilities of Sailor into Qwen1.5-Chat and make it proficient in Southeast Asian languages, achieving enhancements in the fundamental capabilities. In light of previous research, we also merge multiple 13B FT LLMs and observe that WIDEN achieves a balanced amalgamation of instruction following, mathematical reasoning, and code generation skills.

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

↑