arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.08439cs.LGcs.AIcs.CL
收藏

xRouter:通过强化学习实现成本感知的LLM编排系统

xRouter: Training Cost-Aware LLMs Orchestration System via Reinforcement Learning

Salesforce AI Research(Salesforce AI研究院);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)

Cheng Qian, Zuxin Liu, Shirley Kokane, Akshara Prabhakar, Jielin Qiu, Haolin Chen, Zhiwei Liu, Heng Ji, Weiran Yao, Shelby Heinecke, Silvio Savarese, Caiming Xiong, Huan Wang

AI总结:

xRouter提出一种基于强化学习的工具调用路由系统,通过成本感知奖励实现端到端训练,在多个基准上显著降低成本并保持任务完成率,为LLM编排提供实用方案。

摘要:

现代LLM部署面临日益扩大的成本-性能谱系:高端模型推理能力强但成本高昂,而轻量级模型经济实惠但在复杂任务上表现脆弱。静态升级规则和关键词启发式方法未能充分利用这一谱系,且无法适应不同任务类型。我们提出xRouter,一种基于工具调用的路由系统,其中学习到的路由器可以直接回答或调用一个或多个外部模型。该路由器通过强化学习进行端到端训练,使用显式的、成本感知的奖励函数来编码成本-性能权衡,从而无需手工设计的路由规则。我们的实现涵盖了完整的强化学习框架,包括奖励和成本核算,以及部署和评估流程。在多个基准测试中,xRouter实现了强大的成本-性能权衡(例如,在任务完成率相当的情况下大幅降低成本),并提供了关于哪些因素可靠地有助于学习路由、哪些因素无益的实证见解,涵盖从模型可训练性到在小型开放模型中引发复杂编排行为的难度。我们希望这些发现和我们的开源实现能够作为推进学习型、成本感知的LLM编排的实用基础。

英文摘要:

Modern LLM deployments confront a widening cost-performance spectrum: premium models deliver strong reasoning but are expensive, while lightweight models are economical yet brittle on complex tasks. Static escalation rules and keyword heuristics under-utilize this spectrum and fail to adapt across task types. We present xRouter, a tool-calling-based routing system in which a learned router can either answer directly or invoke one or more external models. The router is trained end-to-end with reinforcement learning using an explicit, cost-aware reward that encodes cost-performance trade-offs, eliminating the need for hand-engineered routing rules. Our implementation encompasses the full reinforcement learning framework, including reward and cost accounting, as well as the deployment and evaluation pipelines. Across diverse benchmarks, xRouter achieves strong cost-performance trade-offs (e.g., substantial cost reductions at comparable task completion rates), and provides empirical insights into what reliably helps learned routing and what does not, ranging from model trainability to the difficulty of eliciting sophisticated orchestration behaviors in small open models. We hope these findings and our open implementation will serve as a practical substrate for advancing learned, cost-aware LLM orchestration.

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

↑