Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

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.

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

Related benchmarks

TaskDatasetResultRank
Question Answering2Wiki
EM54.67
241
Mathematical ReasoningAMC'23 (test)
Accuracy77.5
152
Mathematical ReasoningOmni-MATH
Accuracy45.8
123
Mathematical ReasoningAMC 23
Accuracy77.5
113
Mathematical ReasoningAGIEval MATH
Accuracy72.9
99
Mathematical ReasoningMinervaMath
Accuracy41.7
61
Question AnsweringNewsQA
F154.19
49
Mathematical ReasoningMATH-500 (test)
Accuracy75
46
Visual Question AnsweringChest X-ray VQA (test)
Overall Accuracy42.69
43
Disease DiagnosisOpen-i
Accuracy66.13
41
Showing 10 of 40 rows

Other info

Follow for update