arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2401.13979cs.CLcs.AIcs.LG
收藏

Routoo:学习有效地路由至大语言模型

Routoo: Learning to Route to Large Language Models Effectively

Leeroo

Alireza Mohammadshahi, Arshad Rafiq Shaikh, Majid Yazdani

AI总结:

本文提出Routoo路由架构,通过轻量性能预测器与成本感知选择器为提示选择合适LLM,在MMLU上以更低成本匹配或超越Mixtral 8x7b及GPT4。

摘要:

具有卓越响应质量的LLM(尤其是较大型或闭源模型)往往伴随更高的推理成本,导致其部署效率低下且代价高昂。与此同时,从头开发基础LLM正变得越来越耗费资源,对许多应用而言并不现实。为应对质量与成本之间的平衡挑战,我们提出Routoo,这是一种旨在根据性能、成本和效率为特定提示优化LLM选择的架构。Routoo提供了对推理成本与质量之间权衡的可控性,能够在给定质量要求下显著降低推理成本。Routoo包含两个关键组件:性能预测器和成本感知选择器。性能预测器是一个轻量级LLM,可在不执行各底层LLM的情况下,估计它们在给定提示上的预期性能。随后,成本感知选择器模块基于这些预测以及成本和延迟等约束选择最合适的模型,从而在相同质量下显著降低推理成本。我们使用MMLU基准在57个领域中采用开源模型评估了Routoo。结果表明,Routoo在达到Mixtral 8x7b模型性能的同时,将推理成本降低了三分之一。此外,通过允许增加成本,Routoo在等效成本下将准确率较Mixtral提高超过5%,达到75.9%的准确率。在将GPT4纳入模型池后,Routoo以一半成本几乎达到GPT4的性能,并能在成本降低25%的情况下超越它。这些结果凸显了Routoo在不损害质量的前提下显著降低推理成本的潜力,甚至能够通过利用多个LLM的集体能力建立新的最先进结果。

英文摘要:

LLMs with superior response quality--particularly larger or closed-source models--often come with higher inference costs, making their deployment inefficient and costly. Meanwhile, developing foundational LLMs from scratch is becoming increasingly resource-intensive and impractical for many applications. To address the challenge of balancing quality and cost, we introduce Routoo, an architecture designed to optimize the selection of LLMs for specific prompts based on performance, cost, and efficiency. Routoo provides controllability over the trade-off between inference cost and quality, enabling significant reductions in inference costs for a given quality requirement. Routoo comprises two key components: a performance predictor and cost-aware selector. The performance predictor is a lightweight LLM that estimates the expected performance of various underlying LLMs on a given prompt without executing them. The cost-aware selector module then selects the most suitable model based on these predictions and constraints such as cost and latency, significantly reducing inference costs for the same quality. We evaluated Routoo using the MMLU benchmark across 57 domains employing open-source models. Our results show that Routoo matches the performance of the Mixtral 8x7b model while reducing inference costs by one-third. Additionally, by allowing increased costs, Routoo surpasses Mixtral's accuracy by over 5% at equivalent costs, achieving an accuracy of 75.9%. When integrating GPT4 into our model pool, Routoo nearly matches GPT4's performance at half the cost and exceeds it with a 25% cost reduction. These outcomes highlight Routoo's potential to significantly reduce inference costs without compromising quality, and even to establish new state-of-the-art results by leveraging the collective capabilities of multiple LLMs.

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

↑