arXiv:2502.20576cs.DBcs.CL2025-02被引 39

让多个大模型按预算和性能自动分配,省资源还更准。

OmniRouter: Budget and Performance Controllable Multi-LLM Routing

  • 把选模型变成全局优化问题,不只看单个请求
  • 比现有方法少用至少10.15%算力,准确率高6.30%
  • 适合需要控制成本又不想丢质量的部署场景

大语言模型性能强但耗资源,小模型效率高却能力弱。路由机制可动态为不同输入选择最合适的模型,提升资源利用率。现有框架多采用局部最优策略,忽略整体预算限制,导致资源浪费。为此,我们提出OmniRouter,一种可调控的多模型路由框架。它将路由建模为带约束的优化问题,通过混合检索增强预测器预估各模型的能力与开销,再用带自适应乘子的拉格朗日对偶分解优化器求解,实现全局最优分配。该方法能动态平衡延迟与质量要求,满足异构容量约束。实验表明,相比竞争基线,OmniRouter在响应准确率上最高提升6.30%,同时计算成本降低至少10.15%。代码与数据集见https://github.com/dongyuanjushi/OmniRouter。

原文摘要 · Abstract (English)

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.

多模型路由资源优化性能控制

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