Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing
By Dujian Ding, Ankur Mallick, Chi Wang, Robert Sim, Subhabrata Mukherjee, Victor Rühle, Laks V. S. Lakshmanan, Ahmed Hassan Awadallah. International Conference on Learning Representations, 2024
356 citations recorded by the source corpus.
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.
Subfields: Computer Networks and Communications
View Paper: https://www.semanticscholar.org/paper/97b6f4357d1e3ab40a7ee60acb5260a948e3641d
Citations in the corpus
- RouteLLM: Learning to Route LLMs with Preference Data (2024, unknown): “A closely related study, Hybrid-LLM [14], shares similarities with our framework but differs in three key ways: it uses synthetic preference labels derived via BARTScore [26], relies on a single BERT-based router architecture, and limits evaluation to in-domain generalization.”