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

通道合并:为合并后的专家保留专业化特性

Channel Merging: Preserving Specialization for Merged Experts

Zhejiang University(浙江大学);Monash University(莫纳什大学);Zhejiang University of Technology(浙江工业大学)

Mingyang Zhang, Jing Liu, Ganggui Ding, Xinyi Yu, Linlin Ou, Bohan Zhuang

AI总结:

针对多专家模型合并时的参数冲突与内存低效问题,提出Channel Merging策略,通过离线聚类合并相似通道参数并支持推理时即时查找,在保留专业化知识的同时显著降低参数量和存储开销。

摘要:

近来,利用特定任务微调的做法已被实施,以提升大型语言模型(LLM)在后续任务中的性能。通过整合多样化的LLM,LLM的整体能力得到了显著增强。然而,传统的集成方法在内存上消耗巨大,需要将所有专业化模型同时加载到GPU内存中。为了解决这种低效问题,模型合并策略应运而生,将所有LLM合并为一个模型,以减少推理时的内存占用。尽管取得了这些进展,但随着专家数量的增加,模型合并通常会导致参数冲突和性能下降。以往缓解这些冲突的方法包括后剪枝和部分合并。然而,这两种方法都有局限性,特别是在合并专家数量增加时的性能和存储效率方面。为了应对这些挑战,我们引入了Channel Merging,这是一种新颖的策略,旨在最小化参数冲突的同时提升存储效率。该方法基于相似性对通道参数进行聚类和合并,在离线状态下形成若干组。通过确保在每个组内仅合并高度相似的参数,它显著减少了参数冲突。在推理期间,我们可以从合并后的组中即时查找专家参数,从而保留专业化知识。我们的实验表明,Channel Merging持续提供高性能,在英文和中文推理、数学推理以及代码生成等任务中与未合并模型的表现相当。此外,当与特定任务路由器结合使用时,它仅用53%的参数即可获得与模型集成相当的结果。

英文摘要:

Lately, the practice of utilizing task-specific fine-tuning has been implemented to improve the performance of large language models (LLM) in subsequent tasks. Through the integration of diverse LLMs, the overall competency of LLMs is significantly boosted. Nevertheless, traditional ensemble methods are notably memory-intensive, necessitating the simultaneous loading of all specialized models into GPU memory. To address the inefficiency, model merging strategies have emerged, merging all LLMs into one model to reduce the memory footprint during inference. Despite these advances, model merging often leads to parameter conflicts and performance decline as the number of experts increases. Previous methods to mitigate these conflicts include post-pruning and partial merging. However, both approaches have limitations, particularly in terms of performance and storage efficiency when merged experts increase. To address these challenges, we introduce Channel Merging, a novel strategy designed to minimize parameter conflicts while enhancing storage efficiency. This method clusters and merges channel parameters based on their similarity to form several groups offline. By ensuring that only highly similar parameters are merged within each group, it significantly reduces parameter conflicts. During inference, we can instantly look up the expert parameters from the merged groups, preserving specialized knowledge. Our experiments demonstrate that Channel Merging consistently delivers high performance, matching unmerged models in tasks like English and Chinese reasoning, mathematical reasoning, and code generation. Moreover, it obtains results comparable to model ensemble with just 53% parameters when used with a task-specific router.

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

↑