Pretrain Once, Route Anywhere: Towards a Foundation Model for LLM Routing
作者: Guannan Lai, Han-Jia Ye
分类: cs.AI
发布日期: 2026-09-29
🔗 代码/项目: GITHUB
💡 一句话要点
提出RouteFM以解决LLM路由效率与质量的平衡问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 路由优化 基础模型 迁移学习 多任务学习
📋 核心要点
- 现有的LLM路由方法通常依赖于局部拟合,难以适应动态变化的路由环境,导致效率低下。
- 本文提出RouteFM,通过学习候选模型的行为上下文,构建可重用的路由能力,避免固定模型身份的限制。
- 实验结果显示,RouteFM在多种环境下均表现出色,尤其在行为证据有限的情况下,性能提升显著。
📝 摘要(中文)
大语言模型(LLM)路由旨在从异构候选池中为每个查询分配最合适的模型,从而提高LLM推理的质量与效率平衡。现有的路由器通常通过局部拟合进行学习,针对特定的查询工作负载和候选池进行优化,且在路由环境变化时往往需要额外的监督或重新训练。本文提出RouteFM,从基础模型的角度出发,学习可重用的路由能力,能够跨任务、候选模型和部署条件进行泛化。通过在异构路由环境中的情节预训练,该能力可以被冻结的路由器重用,并仅通过上下文适应新环境。实验表明,在领域、模态、候选池和上下文预算变化时均可实现迁移,在MMR-Bench上,RouteFM在仅使用八个观察值的情况下,超越最强基线2.23个质量点。该结果支持将LLM路由从重复的局部拟合转向“预训练一次,随处路由”的范式。
🔬 方法详解
问题定义:本文解决的是LLM路由中的效率与质量平衡问题。现有方法依赖于特定的查询工作负载和候选池,难以适应环境变化,导致需要频繁的重新训练和监督。
核心思路:论文提出的RouteFM从基础模型的视角出发,学习一种可重用的路由能力,使其能够跨任务和环境进行泛化,而不是将路由决策绑定于固定模型身份。
技术框架:RouteFM的整体架构包括情节预训练阶段,学习候选模型的行为特征,并通过上下文推断其特定能力。冻结的路由器能够在新环境中仅通过上下文进行适应。
关键创新:RouteFM的核心创新在于其可重用的路由能力,能够在不同的任务和环境中进行迁移,显著减少了对局部拟合的依赖。
关键设计:在设计上,RouteFM采用了情节预训练方法,结合多种候选模型的行为特征,优化了损失函数以提高模型的泛化能力。
🖼️ 关键图片
📊 实验亮点
在MMR-Bench上,RouteFM在未参与预训练的情况下,使用仅八个观察值超越最强基线2.23个质量点,展现了其在不同环境下的强大迁移能力,尤其在行为证据有限的情况下表现突出。
🎯 应用场景
该研究的潜在应用领域包括智能客服、自动问答系统和多模态信息检索等。通过提高LLM路由的效率与质量,RouteFM能够在资源受限的环境中提供更优质的服务,具有重要的实际价值和未来影响。
📄 摘要(原文)
Large language model (LLM) routing aims to assign each query to the most suitable model from a heterogeneous candidate pool, improving the quality--efficiency trade-off of LLM inference. Existing routers are typically learned through local fitting: a router is optimized for a particular query workload and candidate pool, and often requires additional supervision or retraining as the routing environment changes. We ask whether LLM routing can instead be approached from a foundation-model perspective, learning a reusable routing capability that generalizes across tasks, candidate models, and deployment conditions. To this end, we introduce RouteFM, which learns to characterize anonymous candidate models from behavioral context and infer their target-specific capabilities, rather than binding routing decisions to fixed model identities or a single environment. Through episodic pretraining across heterogeneous routing environments, this capability can be reused by a frozen router and adapted to new environments through context alone. Experiments demonstrate transfer across changes in domains, modalities, candidate pools, and context budgets, with the largest gains when behavioral evidence is limited. On MMR-Bench, which is excluded from pretraining, RouteFM outperforms the strongest baseline by 2.23 quality points with only eight observations per candidate. These results support moving LLM routing from repeated local fitting toward a pretrain once, route anywhere paradigm. Our code is publicly available at https://github.com/LAMDA-Model-Reuse/RouteFM.