arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.20576cs.DBcs.CL
收藏

OmniRouter: 可预算和性能控制的多LLM路由

OmniRouter: Budget and Performance Controllable Multi-LLM Routing

Department of Computer Science(计算机科学系)

Kai Mei, Wujiang Xu, Minghao Guo, Shuhang Lin, Yongfeng Zhang

AI总结:

OmniRouter通过受约束优化方法实现多LLM路由,平衡成本与性能,提升响应准确率并降低计算成本。

摘要:

大型语言模型(LLMs)在性能上表现优异,但需要大量的计算资源且运行效率相对较低,而较小的模型则能更高效地处理简单任务并消耗更少的资源。LLM路由是一种关键范式,它从候选池中动态选择最适合的大型语言模型来处理多样化的输入,以确保最优的资源利用同时保持响应质量。现有的路由框架通常将此建模为局部最优决策问题,为每个查询单独选择预设的最佳匹配LLM,这忽略了全局预算约束,导致资源分配无效。为了解决这个问题,我们引入了OmniRouter,一种用于多LLM服务的根本可控路由框架。不同于为每个查询做出贪婪选择,OmniRouter将路由任务建模为一个受约束的优化问题,分配模型以最小化总成本同时确保所需性能水平。具体来说,设计了一种混合检索增强预测器来预测LLM的能力和成本。在获得预测成本和性能后,我们利用一个受约束的优化器进行成本最优分配,该优化器采用拉格朗日对偶分解与自适应乘数。它通过迭代收敛于全局最优的查询-模型分配,动态平衡延迟最小化与质量阈值的同时遵守异构容量约束。实验表明,OmniRouter在响应准确率上比竞争路由基线提高了最多6.30%,同时将计算成本减少了至少10.15%。代码和数据集可在https://github.com/dongyuanjushi/OmniRouter上获取。

英文摘要:

Large language models (LLMs) deliver superior performance but require substantial computational resources and operate with relatively low efficiency, while smaller models can efficiently handle simpler tasks with fewer resources. LLM routing is a crucial paradigm that dynamically selects the most suitable large language models from a pool of candidates to process diverse inputs, ensuring optimal resource utilization while maintaining response quality. Existing routing frameworks typically model this as a locally optimal decision-making problem, selecting the presumed best-fit LLM for each query individually, which overlooks global budget constraints, resulting in ineffective resource allocation. To tackle this problem, we introduce OmniRouter, a fundamentally controllable routing framework for multi-LLM serving. Instead of making per-query greedy choices, OmniRouter models the routing task as a constrained optimization problem, assigning models that minimize total cost while ensuring the required performance level. Specifically, a hybrid retrieval-augmented predictor is designed to predict the capabilities and costs of LLMs. After obtaining the predicted cost and performance, we utilize a constrained optimizer for cost-optimal assignments that employs Lagrangian dual decomposition with adaptive multipliers. It iteratively converges toward the globally optimal query-model allocation, dynamically balancing latency minimization against quality thresholds while adhering to heterogeneous capacity constraints. Experiments show that OmniRouter achieves up to 6.30% improvement in response accuracy while simultaneously reducing computational costs by at least 10.15% compared to competitive router baselines. The code and the dataset are available at https://github.com/dongyuanjushi/OmniRouter.

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

↑