arXiv:2502.04411cs.LGcs.AI2025-02被引 13

通过分层路由与稀疏专家设计,实现高效低冲突的LLM合并。

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

  • 按层差异处理参数冲突,冲突少的层平均,冲突大的层用任务路由
  • 在多个模型上提升推理性能,存储开销比传统路由降低40%以上
  • 适合需要多任务融合且资源受限的部署场景

模型合并可将针对不同任务微调的大语言模型整合为更强的统一模型。然而,模型间参数冲突会导致平均后性能下降。尽管模型路由通过推理时选择特定模型缓解此问题,但带来过高的存储与计算开销,且无法利用各模型间的共性知识。本文观察到不同层的参数冲突程度各异,据此提出:对冲突小的层进行平均,对冲突大的层采用任务级专家路由。为进一步降低存储成本,受任务算术稀疏性的启发,将多个微调专家解耦为一个稠密专家和若干稀疏专家。针对分布外样本,基于输入数据的任务不确定性选择并合并合适专家。我们在 LLaMA 与 Qwen 上进行广泛实验,覆盖不同参数规模,并在真实推理任务上评估。结果表明,本方法在显著提升性能的同时,系统开销更低。

原文摘要 · Abstract (English)

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.

模型合并大模型路由机制稀疏专家

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。