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

Hybrid LLM:成本高效且质量感知的查询路由

Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing

University of British Columbia(不列颠哥伦比亚大学);Microsoft(微软公司);Hippocratic AI(希波克拉底人工智能公司)

Dujian Ding, Ankur Mallick, Chi Wang, Robert Sim, Subhabrata Mukherjee, Victor Ruhle, Laks V. S. Lakshmanan, Ahmed Hassan Awadallah

AI总结:

提出一种混合推理方法,通过路由器根据查询难度和质量需求将查询分配给大或小模型,在保持响应质量的同时减少高达40%的大模型调用,实现成本与质量的动态权衡。

摘要:

大型语言模型(LLMs)在大多数NLP任务中表现出色,但由于其规模庞大,需要昂贵的云服务器进行部署,而能够部署在较低成本(如边缘)设备上的较小模型在响应质量上往往落后。因此,在这项工作中,我们提出了一种混合推理方法,结合它们各自的优势以节省成本并保持质量。我们的方法使用一个路由器,根据预测的查询难度和期望的质量水平,将查询分配给小模型或大模型。期望的质量水平可以在测试时动态调整,以便根据场景需求在质量与成本之间进行无缝权衡。在实验中,我们的方法使大模型的调用次数减少了高达40%,且响应质量没有下降。

英文摘要:

Large language models (LLMs) excel in most NLP tasks but also require expensive cloud servers for deployment due to their size, while smaller models that can be deployed on lower cost (e.g., edge) devices, tend to lag behind in terms of response quality. Therefore in this work we propose a hybrid inference approach which combines their respective strengths to save cost and maintain quality. Our approach uses a router that assigns queries to the small or large model based on the predicted query difficulty and the desired quality level. The desired quality level can be tuned dynamically at test time to seamlessly trade quality for cost as per the scenario requirements. In experiments our approach allows us to make up to 40% fewer calls to the large model, with no drop in response quality.

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

↑