MetaLLM:一种高性能、成本高效的动态框架,用于封装大型语言模型
MetaLLM: A High-performant and Cost-efficient Dynamic Framework for Wrapping LLMs
AI总结:
MetaLLM是一个动态路由框架,通过多臂老虎机策略在多个LLM中选择最优模型,以提升分类和多选问答任务的准确性与成本效益。
摘要:
机器学习(ML)的快速发展催生了众多大型语言模型(LLMs),这些模型在各种任务和领域中表现出色。这些LLMs在计算能力或定价方面具有不同的能力和成本。由于每个查询的需求可能不同,例如,由于查询的领域或其复杂性,在应用程序中默认使用一个LLM通常不是最佳选择,无论它是最大的、最昂贵的,还是平均测试性能最好的。因此,为应用程序选择既准确又成本高效的合适LLM是必要的,但仍然是一个挑战。在本文中,我们介绍了MetaLLM,一个动态且智能地将每个查询路由到最优LLM(在多个可用LLM中)的框架,用于分类和多选问答任务,实现了显著提高的准确性和成本效益。通过将选择问题构建为多臂老虎机问题,MetaLLM在不确定性下平衡了预测准确性和成本效率。我们在OpenAI和Together AI等流行LLM平台以及开源LLM上进行的实验,展示了MetaLLM在真实世界场景中的有效性,为未来的扩展奠定了基础。
英文摘要:
The rapid progress in machine learning (ML) has brought forth many large language models (LLMs) that excel in various tasks and areas. These LLMs come with different abilities and costs in terms of computation or pricing. Since the demand for each query can vary, e.g., because of the queried domain or its complexity, defaulting to one LLM in an application is not usually the best choice, whether it is the biggest, priciest, or even the one with the best average test performance. Consequently, picking the right LLM that is both accurate and cost-effective for an application is necessary yet remains a challenge. In this paper, we introduce MetaLLM, a framework that dynamically and intelligently routes each query to the optimal LLM (among several available LLMs) for classification and multi-choice question-answering tasks, achieving significantly improved accuracy and cost-effectiveness. By framing the selection problem as a multi-armed bandit, MetaLLM balances prediction accuracy and cost efficiency under uncertainty. Our experiments, conducted on popular LLM platforms such as OpenAI and Together AI, as well as open-source LLM, showcase MetaLLM's efficacy in real-world scenarios, laying the groundwork for future extensions.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。