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

Abstract

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.

Cite

Text

Ding et al. "Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing." International Conference on Learning Representations, 2024.

Markdown

[Ding et al. "Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing." International Conference on Learning Representations, 2024.](https://mlanthology.org/iclr/2024/ding2024iclr-hybrid/)

BibTeX

@inproceedings{ding2024iclr-hybrid,
  title     = {{Hybrid LLM: Cost-Efficient and Quality-Aware Query Routing}},
  author    = {Ding, Dujian and Mallick, Ankur and Wang, Chi and Sim, Robert and Mukherjee, Subhabrata and Rühle, Victor and Lakshmanan, Laks V. S. and Awadallah, Ahmed Hassan},
  booktitle = {International Conference on Learning Representations},
  year      = {2024},
  url       = {https://mlanthology.org/iclr/2024/ding2024iclr-hybrid/}
}