arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.11601cs.LGcs.AIcs.CLcs.MA
收藏

Tryage:将用户提示实时智能路由至大语言模型

Tryage: Real-time, intelligent Routing of User Prompts to Large Language Models

California Institute of Technology(加州理工学院)

Surya Narayanan Hari, Matt Thomson

AI总结:

针对大语言模型数量庞大导致用户选择困难的问题,提出上下文感知路由系统Tryage,通过感知路由器结合用户约束选择最优模型,在多数据集上的模型选择准确率显著优于Gorilla与GPT-3.5 Turbo,为多模型LLM系统的高效利用提供了方案。

摘要:

Transformer架构与自注意力机制的问世,催生了大量针对特定下游任务和数据领域训练的语言模型。Hugging Face生态系统中已有超过20万个模型,用户既要应对计算、安全和时效性问题,又要费心选择和优化模型以适配多方面的工作流与数据领域。目前迫切需要机器学习框架,为用户免除模型选择和定制的负担,让海量新兴模型库的强大能力能为终端用户所用。\n本文提出一种上下文感知的路由系统Tryage,它借助语言模型路由器,通过对单条输入提示的分析,从模型库中最优选择专家模型。受大脑丘脑路由器的启发,Tryage采用感知路由器预测下游模型在提示上的表现,随后通过目标函数做出路由决策——该目标函数将性能预测与通过标记(如模型大小、模型时效性)纳入的用户目标和约束相结合。Tryage支持用户探索帕累托前沿,在任务准确率与次要目标(包括最小化模型大小、提升时效性、增强安全性、控制输出冗长度和可读性)之间自动权衡。\n在涵盖代码、文本、临床数据和专利的异构数据集上,Tryage框架的动态模型选择表现优于Gorilla和GPT-3.5 turbo:它识别最优模型的准确率达50.9%,而GPT-3.5 Turbo为23.6%,Gorilla为10.8%。从概念层面看,Tryage展示了如何应用路由模型来规划和控制多模型大语言模型系统的行为,以高效利用不断扩张和演进的语言模型生态系统。

英文摘要:

The introduction of the transformer architecture and the self-attention mechanism has led to an explosive production of language models trained on specific downstream tasks and data domains. With over 200, 000 models in the Hugging Face ecosystem, users grapple with selecting and optimizing models to suit multifaceted workflows and data domains while addressing computational, security, and recency concerns. There is an urgent need for machine learning frameworks that can eliminate the burden of model selection and customization and unleash the incredible power of the vast emerging model library for end users. Here, we propose a context-aware routing system, Tryage, that leverages a language model router for optimal selection of expert models from a model library based on analysis of individual input prompts. Inspired by the thalamic router in the brain, Tryage employs a perceptive router to predict down-stream model performance on prompts and, then, makes a routing decision using an objective function that integrates performance predictions with user goals and constraints that are incorporated through flags (e.g., model size, model recency). Tryage allows users to explore a Pareto front and automatically trade-off between task accuracy and secondary goals including minimization of model size, recency, security, verbosity, and readability. Across heterogeneous data sets that include code, text, clinical data, and patents, the Tryage framework surpasses Gorilla and GPT3.5 turbo in dynamic model selection identifying the optimal model with an accuracy of 50.9% , compared to 23.6% by GPT 3.5 Turbo and 10.8% by Gorilla. Conceptually, Tryage demonstrates how routing models can be applied to program and control the behavior of multi-model LLM systems to maximize efficient use of the expanding and evolving language model ecosystem.

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

↑