通过分组合并相似通道参数,提升大模型融合效率与性能。
Channel Merging: Preserving Specialization for Merged Experts
- 按通道相似性分组合并参数,减少冲突
- 仅用53%参数达到集成模型效果
- 适合需要高效推理的多任务大模型场景
近期,任务特定微调被用于提升大型语言模型(LLM)在后续任务中的表现。通过整合多个LLM,整体能力显著增强。然而,传统集成方法内存开销大,需同时加载所有专用模型。为此,模型融合策略应运而生,将多个模型合并为单一模型以降低推理时的内存占用。尽管如此,随着专家数量增加,模型融合常引发参数冲突和性能下降。现有缓解方法如后剪枝和部分融合,在专家增多时面临性能与存储效率瓶颈。为此,我们提出通道融合(Channel Merging),一种新策略:离线根据通道参数相似性聚类并合并,确保仅高度相似参数被合并,显著减少冲突。推理时可快速查取专家参数,保留专长知识。实验表明,该方法在英语与中文推理、数学推理、代码生成等任务中性能接近未融合模型;使用任务特定路由器时,仅需53%参数即可达到模型集成水平。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。