arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.02743cs.LG
收藏

LLM Bandit:通过偏好条件动态路由实现高成本效益的大语言模型生成

LLM Bandit: Cost-Efficient LLM Generation via Preference-Conditioned Dynamic Routing

Yang Li

AI总结:

本文将LLM选择建模为多臂老虎机问题,提出偏好条件动态路由机制,在推理时按用户偏好平衡准确性与成本,并能泛化到未见过的模型,实验证明其在不同平台上显著提升准确性和成本效益。

摘要:

大语言模型(LLMs)的快速发展催生了多种能力各异的模型,它们在不同任务和领域中各有所长。然而,为用户查询选择最优的LLM往往需要在准确性与成本之间进行艰难的权衡,而不同查询的多样化需求进一步加剧了这一问题。在本工作中,我们提出了一个新的框架,将LLM选择过程建模为多臂老虎机(multi-armed bandit)问题,从而实现对查询的动态、智能路由,将其分配给最合适的模型。我们的方法引入了一种偏好条件动态路由机制,允许用户在推理时指定偏好,从而在性能与成本之间提供可定制的平衡。此外,我们的选择策略被设计为能够泛化到未见过的LLM,确保在新型模型出现时具有适应性。实验结果表明,我们的方法在多个LLM平台上均显著提升了准确性和成本效益,展示了该框架在现实场景中自适应优化LLM选择的潜力。

英文摘要:

The rapid advancement in large language models (LLMs) has brought forth a diverse range of models with varying capabilities that excel in different tasks and domains. However, selecting the optimal LLM for user queries often involves a challenging trade-off between accuracy and cost, a problem exacerbated by the diverse demands of individual queries. In this work, we present a novel framework that formulates the LLM selection process as a multi-armed bandit problem, enabling dynamic and intelligent routing of queries to the most appropriate model. Our approach incorporates a preference-conditioned dynamic routing mechanism, allowing users to specify their preferences at inference time, thereby offering a customizable balance between performance and cost. Additionally, our selection policy is designed to generalize to unseen LLMs, ensuring adaptability to new models as they emerge. Experimental results demonstrate that our method achieves significant improvements in both accuracy and cost-effectiveness across various LLM platforms, showcasing the potential of our framework to adaptively optimize LLM selection in real-world scenarios.

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

↑