RouteLLM: Learning to Route LLMs from Preference Data

Abstract

Large language models (LLMs) excel at a wide range of tasks, but choosing the right model often involves balancing performance and cost. Powerful models offer better results but are expensive, while smaller models are more cost-effective but less capable. To address this trade-off, we introduce a training framework for learning efficient router models that dynamically select between a stronger and weaker LLM during inference. Our framework leverages human preference data and employs data augmentation techniques to enhance performance. Evaluations on public benchmarks show that our approach can reduce costs by over 2 times without sacrificing response quality. Moreover, our routers exhibit strong generalization capabilities, maintaining performance even when routing between LLMs not included in training. This highlights the potential of our framework to deliver cost-effective, high-performance LLM solutions.

Cite

Text

Ong et al. "RouteLLM: Learning to Route LLMs from Preference Data." International Conference on Learning Representations, 2025.

Markdown

[Ong et al. "RouteLLM: Learning to Route LLMs from Preference Data." International Conference on Learning Representations, 2025.](https://mlanthology.org/iclr/2025/ong2025iclr-routellm/)

BibTeX

@inproceedings{ong2025iclr-routellm,
  title     = {{RouteLLM: Learning to Route LLMs from Preference Data}},
  author    = {Ong, Isaac and Almahairi, Amjad and Wu, Vincent and Chiang, Wei-Lin and Wu, Tianhao and Gonzalez, Joseph E. and Kadous, M Waleed and Stoica, Ion},
  booktitle = {International Conference on Learning Representations},
  year      = {2025},
  url       = {https://mlanthology.org/iclr/2025/ong2025iclr-routellm/}
}