arXiv:2412.07448cs.AI2024-12IJCAI被引 17

动态选择多个大模型专家,高效融合优势提升推理效果

Efficient Dynamic Ensembling for Multiple LLM Experts

  • 将多模型集成建模为马尔可夫决策过程,动态选最优推理路径
  • 实验表明在更低计算成本下超越当前最佳基线表现
  • 适合需要高效率与强泛化能力的复杂任务场景

大语言模型在各类语言任务中表现出色,但其性能因架构、规模、训练数据范围等差异而不同。因此,针对不同输入动态整合多个大模型专家的优势,对实现跨任务稳定且满意的性能至关重要。现有集成方法或计算开销过大,或难以有效利用模型间的互补知识。本文提出一种高效动态集成推理范式(DER),根据输入动态选择最优的模型协作路径。具体地,将集成问题建模为马尔可夫决策过程,由智能体逐层请求候选模型并传递输出;设计奖励函数训练代理以最小资源获取最高性能。此外,引入知识迁移提示,使后续模型能有效继承前序模型的互补知识。实验表明,该方法在显著降低计算消耗的同时,优于现有先进基线。代码与附录见https://github.com/Fhujinwu/DER。

原文摘要 · Abstract (English)

LLMs have demonstrated impressive performance across various language tasks. However, the strengths of LLMs can vary due to different architectures, model sizes, areas of training data, etc. Therefore, ensemble reasoning for the strengths of different LLM experts is critical to achieving consistent and satisfactory performance on diverse inputs across a wide range of tasks. However, existing LLM ensemble methods are either computationally intensive or incapable of leveraging complementary knowledge among LLM experts for various inputs. In this paper, we propose an efficient Dynamic Ensemble Reasoning paradigm, called DER to integrate the strengths of multiple LLM experts conditioned on dynamic inputs. Specifically, we model the LLM ensemble reasoning problem as a Markov Decision Process, wherein an agent sequentially takes inputs to request knowledge from an LLM candidate and passes the output to a subsequent LLM candidate. Moreover, we devise a reward function to train a DER-Agent to dynamically select an optimal answering route given the input questions, aiming to achieve the highest performance with as few computational resources as possible. Last, to fully transfer the expert knowledge from the prior LLMs, we develop a Knowledge Transfer Prompt that enables the subsequent LLM candidates to transfer complementary knowledge effectively. Experiments demonstrate that our method uses fewer computational resources to achieve better performance compared to state-of-the-art baselines. Code and appendix are available at https://github.com/Fhujinwu/DER

大模型集成动态路由推理优化

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