MixLLM: Dynamic Routing in Mixed Large Language Models

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Wang, Xinyuan, Liu, Yanchi, Cheng, Wei, Zhao, Xujiang, Chen, Zhengzhang, Yu, Wenchao, Fu, Yanjie, Chen, Haifeng
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866916630278176768
author Wang, Xinyuan
Liu, Yanchi
Cheng, Wei
Zhao, Xujiang
Chen, Zhengzhang
Yu, Wenchao
Fu, Yanjie
Chen, Haifeng
author_facet Wang, Xinyuan
Liu, Yanchi
Cheng, Wei
Zhao, Xujiang
Chen, Zhengzhang
Yu, Wenchao
Fu, Yanjie
Chen, Haifeng
contents Large Language Models (LLMs) exhibit potential artificial generic intelligence recently, however, their usage is costly with high response latency. Given mixed LLMs with their own strengths and weaknesses, LLM routing aims to identify the most suitable model for each query in the stream to maximize response quality and minimize cost and latency. However, the challenges involve: (1) dynamic trade-offs among quality, cost, and latency; (2) enabling continual learning in deployed systems; and (3) navigating a varying (e.g., new LLM addition or old LLM removal) set of LLM candidates over time. To bridge these gaps, we develop MixLLM, a dynamic contextual-bandit-based routing system for query-LLM assignment. Specifically, we first leverage query tags to enhance query embeddings for the routing task. Next, we design lightweight prediction models to estimate the response qualities and costs of queries over LLMs. We then devise a meta-decision maker to choose the query-LLM assignments to best tradeoff response quality, cost, and latency. Finally, the system benefits from continual training, allowing it to adapt to evolving queries and user feedback over time. Our extensive experiments show that MixLLM achieves the best trade-offs in response quality, cost, and latency (97.25% of GPT-4's quality at 24.18% of the cost under the time constraint).
format Preprint
id arxiv_https___arxiv_org_abs_2502_18482
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MixLLM: Dynamic Routing in Mixed Large Language Models
Wang, Xinyuan
Liu, Yanchi
Cheng, Wei
Zhao, Xujiang
Chen, Zhengzhang
Yu, Wenchao
Fu, Yanjie
Chen, Haifeng
Computation and Language
Artificial Intelligence
Databases
Information Retrieval
N/A
Large Language Models (LLMs) exhibit potential artificial generic intelligence recently, however, their usage is costly with high response latency. Given mixed LLMs with their own strengths and weaknesses, LLM routing aims to identify the most suitable model for each query in the stream to maximize response quality and minimize cost and latency. However, the challenges involve: (1) dynamic trade-offs among quality, cost, and latency; (2) enabling continual learning in deployed systems; and (3) navigating a varying (e.g., new LLM addition or old LLM removal) set of LLM candidates over time. To bridge these gaps, we develop MixLLM, a dynamic contextual-bandit-based routing system for query-LLM assignment. Specifically, we first leverage query tags to enhance query embeddings for the routing task. Next, we design lightweight prediction models to estimate the response qualities and costs of queries over LLMs. We then devise a meta-decision maker to choose the query-LLM assignments to best tradeoff response quality, cost, and latency. Finally, the system benefits from continual training, allowing it to adapt to evolving queries and user feedback over time. Our extensive experiments show that MixLLM achieves the best trade-offs in response quality, cost, and latency (97.25% of GPT-4's quality at 24.18% of the cost under the time constraint).
title MixLLM: Dynamic Routing in Mixed Large Language Models
topic Computation and Language
Artificial Intelligence
Databases
Information Retrieval
N/A
url https://arxiv.org/abs/2502.18482