arXiv:2601.17551cs.PFcs.LG2026-01被引 2

根据查询特点动态选模型,让大模型推理更省电又准确

GreenServ: Energy-Efficient Context-Aware Dynamic Routing for Multi-Model LLM Inference

  • 用轻量特征分析查询类型和复杂度,智能匹配最优模型
  • 相比随机分配,准确率提升22%,能耗降低31%
  • 无需离线调参,可快速接入新模型,适合实际部署

大型语言模型(LLMs)虽能力强大,但广泛部署受限于推理时的高能耗。静态的单一模型策略效率低下,无法适配不同查询需求。本文提出GreenServ,一种动态、上下文感知的路由框架,平衡推理准确率与能效。它从每个查询中提取任务类型、语义聚类和文本复杂度等轻量特征,基于已观测的准确率与能耗,将请求路由至异构模型池中最合适的模型。采用多臂赌博机方法在线学习自适应路由策略,支持部分反馈,无需大量离线校准,简化新模型集成。在五个基准任务和16个开源LLM组成的模型池上评估,结果表明GreenServ持续优于静态和随机基线。相比随机路由,准确率提升22%,累计能耗降低31%。在RouterBench测试中,平均准确率达71.7%,峰值达75.7%。所有代码已开源。

原文摘要 · Abstract (English)

Large language models (LLMs) demonstrate remarkable capabilities, but their broad deployment is limited by significant computational resource demands, particularly energy consumption during inference. Static, one-model-fits-all inference strategies are often inefficient, as they do not exploit the diverse range of available models or adapt to varying query requirements. This paper presents GreenServ, a dynamic, context-aware routing framework that optimizes the trade-off between inference accuracy and energy efficiency. GreenServ extracts lightweight contextual features from each query, including task type, semantic cluster, and text complexity, and routes queries to the most suitable model from a heterogeneous pool, based on observed accuracy and energy usage. We employ a multi-armed bandit approach to learn adaptive routing policies online. This approach operates under partial feedback, eliminates the need for extensive offline calibration, and streamlines the integration of new models into the inference pipeline. We evaluated GreenServ across five benchmark tasks and a pool of 16 contemporary open-access LLMs. Experimental results show that GreenServ consistently outperforms static (single-model) and random baselines. In particular, compared to random routing, GreenServ achieved a 22% increase in accuracy while reducing cumulative energy consumption by 31%. Finally, we evaluated GreenServ with RouterBench, achieving an average accuracy of 71.7% with a peak accuracy of 75.7%. All artifacts are open-source and available here: \href{https://github.com/TZData1/llm-inference-router}{GitHub}

大模型推理节能优化动态路由

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