SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.12031 · 2024

RouterBench: A Benchmark for Multi-LLM Routing System

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 13 functions out of this paper's own repositories and ran 9 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
withmartian/routerbench canonical 9 of 13
FunctionStatusWhere it lives
convert_to_wide_format Ran withmartian/routerbench/convertors/common.py
code served (permissive licence) · get_code("b35a977d197d148b")
extract_prompt_and_response Ran withmartian/routerbench/convertors/martian_evals_convertor.py
code served (permissive licence) · get_code("896695dc98b3fd4b")
generate_datetime_str Ran withmartian/routerbench/utils.py
code served (permissive licence) · get_code("b813cf6af3749d3b")
get_highest_accuracy_lowest_cost Ran withmartian/routerbench/convertors/common.py
code served (permissive licence) · get_code("00e7700fc4378a52")
get_models_to_route Ran withmartian/routerbench/utils.py
code served (permissive licence) · get_code("0d896d266dd0a8ac")
get_non_descreasing_convex_hull_of Ran withmartian/routerbench/evaluation/AIQ.py
code served (permissive licence) · get_code("b37ae418bd1de8e1")
parse_model_parameters Ran withmartian/routerbench/utils.py
code served (permissive licence) · get_code("6b8f114f358fc83e")
parse_params_from_model_name Ran withmartian/routerbench/evaluate_utils.py
code served (permissive licence) · get_code("40d13812d7dd1e9b")
select_prompts Ran withmartian/routerbench/convertors/martian_evals_convertor.py
code served (permissive licence) · get_code("acf2e9aa1fa7e76b")
calc_AIQ Not yet run withmartian/routerbench/evaluation/AIQ.py
code served (permissive licence) · get_code("90cd93f85d0260b9")
calculate_area_under_curve Not yet run withmartian/routerbench/evaluation/AIQ.py
code served (permissive licence) · get_code("7b3c8ab1435797c3")
save_cache_to_disk Not yet run withmartian/routerbench/embedding/cache.py
code served (permissive licence) · get_code("9854f43d010dc0f8")
save_results Not yet run withmartian/routerbench/evaluate_utils.py
code served (permissive licence) · get_code("8b7465494e9692ff")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

As the range of applications for Large Language Models (LLMs) continues to grow, the demand for effective serving solutions becomes increasingly critical. Despite the versatility of LLMs, no single model can optimally address all tasks and applications, particularly when balancing performance with cost. This limitation has led to the development of LLM routing systems, which combine the strengths of various models to overcome the constraints of individual LLMs. Yet, the absence of a standardized benchmark for evaluating the performance of LLM routers hinders progress in this area. To bridge this gap, we present RouterBench, a novel evaluation framework designed to systematically assess the efficacy of LLM routing systems, along with a comprehensive dataset comprising over 405k inference outcomes from representative LLMs to support the development of routing strategies. We further propose a theoretical framework for LLM routing, and deliver a comparative analysis of various routing approaches through RouterBench, highlighting their potentials and limitations within our evaluation framework. This work not only formalizes and advances the development of LLM routing systems but also sets a standard for their assessment, paving the way for more accessible and economically viable LLM deployments. The code and data are available at https://github.com/withmartian/routerbench.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.12031")
get_code_for_paper("2403.12031")
have("2403.12031")

Connect an agent — have() is free.