2025-02-13 · 专家 · 自然语言处理 · 机器学习

Mediator: Memory-efficient LLM Merging with Less Parameter Conflicts and Uncertainty Based Routing

该论文提出了一种名为Mediator的内存高效LLM合并框架,通过自适应层合并和基于不确定性的路由,减少了参数冲突,同时降低了系统成本,显著提高了性能。

更新于 2025-02-13。作者:Kunfeng Lai、Zhenheng Tang、Xinglin Pan、Peijie Dong、Xiang Liu、Haolan Chen、Li Shen、Bo Li、Xiaowen Chu。

中文摘要

模型合并将不同任务上微调的大型语言模型(LLMs)整合成一个更强的模型。然而,模型间的参数冲突导致了平均性能的下降。虽然模型路由通过在推理期间选择单个模型来解决这个问题,但它带来了过高的存储和计算成本,并且未能利用不同模型中的共同知识。在这项工作中,我们观察到不同的层表现出不同程度的参数冲突。基于这一洞察,我们平均具有最小参数冲突的层,并为具有显著冲突的层使用新颖的任务级专家路由。为了进一步降低存储成本,受任务算术稀疏性的启发,我们将多个微调专家解耦为一个密集专家和几个稀疏专家。考虑到分布外样本,我们根据输入数据的任务不确定性选择和合并适当的专家。我们在LLaMA和Qwen上进行了广泛的实验,参数规模各不相同,并在现实世界的推理任务上进行评估。结果表明,与现有方法相比,我们的方法在降低系统成本的同时,始终实现了显著的性能提升。

英文摘要

Model merging aggregates Large Language Models (LLMs) finetuned on different tasks into a stronger one. However, parameter conflicts between models leads to performance degradation in averaging. While model routing addresses this issue by selecting individual models during inference, it imposes excessive storage and compute costs, and fails to leverage the common knowledge from different models. In this work, we observe that different layers exhibit varying levels of parameter conflicts. Building on this insight, we average layers with minimal parameter conflicts and use a novel task-level expert routing for layers with significant conflicts. To further reduce storage costs, inspired by task arithmetic sparsity, we decouple multiple fine-tuned experts into a dense expert and several sparse experts. Considering the out-of-distribution samples, we select and merge appropriate experts based on the task uncertainty of the input data. We conduct extensive experiments on both LLaMA and Qwen with varying parameter scales, and evaluate on real-world reasoning tasks. Results demonstrate that our method consistently achieves significant performance improvements while requiring less system cost compared to existing methods.

解读

一句话总结

该论文提出了一种名为Mediator的内存高效LLM合并框架,通过自适应层合并和基于不确定性的路由,减少了参数冲突,同时降低了系统成本,显著提高了性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源