LLMRouter:開發、評估與部署 LLM 路由器的統一基礎設施
LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers
August 7, 2026
作者: Tao Feng, Fangxu Yu, Haozhen Zhang, Zhongjie Dai, Liangqi Yuan, Zijie Lei, Weizhi Zhang, Kunlun Zhu, Haodong Yue, Keyang Xuan, Ge Liu, Jiaxuan You
cs.AI
摘要
沒有任何單一大型語言模型(LLM)能在所有查詢和預算限制下維持最優表現,這使得模型路由成為實現具成本效益部署的關鍵。現有的路由器採用多樣化的公式化表述與實作方式,使得公平比較與擴展變得困難。我們提出了一個統一的LLM路由公式化表述,將其視為一個序列決策過程,由五個組成部分刻畫:上下文編碼器、模型編碼器、評分函數、決策規則與學習信號,涵蓋單輪、多輪及個人化路由。基於此公式化表述,我們開發了一條自動化管線,用以建構路由監督訊號,並同時評估路由器在回應品質與推論成本上的表現。由此產生的基準測試xRouteBench涵蓋通用LLM、記憶增強、視覺、時間序列及個人化路由任務。我們進一步引入了LLMRouter,一個開源的模組化基礎設施,內含超過16個具代表性的路由器。我們的實證研究顯示,學習型路由器相對於最強的固定模型基準線有14.6%的相對提升;輕量級路由器在嚴格成本限制下更具競爭力;而使用者條件化路由則持續改善個人化效果。
English
No single large language model (LLM) is optimal across all queries and budget constraints, making model routing essential for cost-effective deployment. Existing routers adopt diverse formulations and implementations, making fair comparison and extension difficult. We present a unified formulation of LLM routing as a sequential decision process characterized by five components: context encoders, model encoders, scoring functions, decision rules, and learning signals, covering single-turn, multi-turn, and personalized routing. Based on this formulation, we develop an automated pipeline for constructing routing supervision and evaluating routers jointly on response quality and inference cost. The resulting benchmark, xRouteBench, spans generic LLM, memory-augmented, vision, time-series, and personalized routing tasks. We further introduce LLMRouter, an open-source modular infrastructure with more than 16 representative routers. Our empirical study shows that learned routers outperform the strongest fixed-model baseline by 14.6% relatively, lightweight routers become more competitive under tight cost constraints, and user-conditioned routing consistently improves personalization.