Datasets:
|
Download README.md from Samyol/xRouteBench: direct link, hf CLI and curl.
- Browser
- Download file 8.05 kB
-
https://huggingface.co/datasets/Samyol/xRouteBench/resolve/main/README.md
- Command line
-
hf download hf://datasets/Samyol/xRouteBench/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Samyol/xRouteBench/resolve/main/README.md
8.05 kB
| configs: | |
| - config_name: llmrouter_generic | |
| data_files: | |
| - split: train | |
| path: llmrouter_generic/train.parquet | |
| - split: test | |
| path: llmrouter_generic/test.parquet | |
| - config_name: memory_locomo | |
| data_files: | |
| - split: train | |
| path: memory_locomo/train.parquet | |
| - split: test | |
| path: memory_locomo/test.parquet | |
| - config_name: memory_longmemeval | |
| data_files: | |
| - split: train | |
| path: memory_longmemeval/train.parquet | |
| - split: test | |
| path: memory_longmemeval/test.parquet | |
| - config_name: timeseries | |
| data_files: | |
| - split: train | |
| path: timeseries/train.parquet | |
| - split: test | |
| path: timeseries/test.parquet | |
| - config_name: video | |
| data_files: | |
| - split: train | |
| path: video/train.parquet | |
| - split: test | |
| path: video/test.parquet | |
| - config_name: multimodal_geometry3k | |
| data_files: | |
| - split: train | |
| path: multimodal_geometry3k/train.parquet | |
| - split: test | |
| path: multimodal_geometry3k/test.parquet | |
| - config_name: multimodal_mathvista | |
| data_files: | |
| - split: train | |
| path: multimodal_mathvista/train.parquet | |
| - split: test | |
| path: multimodal_mathvista/test.parquet | |
| - config_name: personalized | |
| data_files: | |
| - split: train | |
| path: personalized/train.parquet | |
| - split: test | |
| path: personalized/test.parquet | |
| - config_name: llm_candidates | |
| data_files: | |
| - split: train | |
| path: llm_candidates/train.parquet | |
| - config_name: llmrouter_generic_queries | |
| data_files: | |
| - split: train | |
| path: llmrouter_generic_queries/train.parquet | |
| - split: valid | |
| path: llmrouter_generic_queries/valid.parquet | |
| - split: test | |
| path: llmrouter_generic_queries/test.parquet | |
| - config_name: memory_locomo_queries | |
| data_files: | |
| - split: train | |
| path: memory_locomo_queries/train.parquet | |
| - split: valid | |
| path: memory_locomo_queries/valid.parquet | |
| - split: test | |
| path: memory_locomo_queries/test.parquet | |
| - config_name: memory_longmemeval_queries | |
| data_files: | |
| - split: train | |
| path: memory_longmemeval_queries/train.parquet | |
| - split: valid | |
| path: memory_longmemeval_queries/valid.parquet | |
| - split: test | |
| path: memory_longmemeval_queries/test.parquet | |
| - config_name: timeseries_queries | |
| data_files: | |
| - split: train | |
| path: timeseries_queries/train.parquet | |
| - split: valid | |
| path: timeseries_queries/valid.parquet | |
| - split: test | |
| path: timeseries_queries/test.parquet | |
| - config_name: video_queries | |
| data_files: | |
| - split: train | |
| path: video_queries/train.parquet | |
| - split: valid | |
| path: video_queries/valid.parquet | |
| - split: test | |
| path: video_queries/test.parquet | |
| - config_name: multimodal_geometry3k_queries | |
| data_files: | |
| - split: train | |
| path: multimodal_geometry3k_queries/train.parquet | |
| - split: valid | |
| path: multimodal_geometry3k_queries/valid.parquet | |
| - split: test | |
| path: multimodal_geometry3k_queries/test.parquet | |
| - config_name: multimodal_mathvista_queries | |
| data_files: | |
| - split: train | |
| path: multimodal_mathvista_queries/train.parquet | |
| - split: valid | |
| path: multimodal_mathvista_queries/valid.parquet | |
| - split: test | |
| path: multimodal_mathvista_queries/test.parquet | |
| - config_name: personalized_queries | |
| data_files: | |
| - split: train | |
| path: personalized_queries/train.parquet | |
| - split: valid | |
| path: personalized_queries/valid.parquet | |
| - split: test | |
| path: personalized_queries/test.parquet | |
| language: | |
| - en | |
| task_categories: | |
| - text-generation | |
| tags: | |
| - llm-routing | |
| - model-selection | |
| - benchmark | |
| pretty_name: xRouteBench | |
| # xRouteBench — LLM Routing Benchmark | |
| **xRouteBench** is a benchmark for training and evaluating **LLM routers** — systems that pick the best LLM from a candidate pool for each incoming query, trading off **performance vs. price cost**. | |
| Every query in each scenario was executed against **all 18 candidate LLMs**, recording each model's response, task performance, token usage, and latency. A router learns from the `train` split which model to pick, and is evaluated on `test`. | |
| ## Scenarios (configs) | |
| | Config | Domain | Train rows / queries | Test rows / queries | Metric | | |
| |---|---|---|---|---| | |
| | `llmrouter_generic` | 13 classic NLP benchmarks (MMLU, GSM8K, MATH, MBPP, ARC, …) | 80,802 / 4,487 | 67,122 / 3,729 | em_mc, GSM8K, MATH, code_eval, f1 | | |
| | `memory_locomo` | Long-conversation memory QA (RAG top-k=5) | 15,930 / 885 | 5,652 / 314 | f1 | | |
| | `memory_longmemeval` | Long-term memory eval (RAG top-k=5) | 4,986 / 277 | 1,818 / 101 | f1 | | |
| | `timeseries` | Time-series understanding (7 sub-tasks) | 17,568 / 976 | 2,286 / 127 | mc | | |
| | `video` | Egocentric video QA (Charades-Ego) | 3,618 / 201 | 486 / 27 | em | | |
| | `multimodal_geometry3k` | Geometry math (multimodal) | 8,640 / 480 | 1,098 / 61 | em | | |
| | `multimodal_mathvista` | Visual math reasoning | 14,400 / 800 | 1,800 / 100 | em, em_mc | | |
| | `personalized` | Personalized preference (LLM-judge; chat-format queries) | 2,464 / 2,235 | 308 / 303 | llm_judge | | |
| | `llm_candidates` | The 18-model candidate pool with pricing | 18 models | — | — | | |
| ## Schema (routing data) | |
| Each row = one (query, candidate model) pair: | |
| | Field | Type | Description | | |
| |---|---|---| | |
| | `task_name` | str | Sub-task the query belongs to (e.g. `gsm8k`, `mbpp`) | | |
| | `query` | str | Full input prompt (personalized: JSON-encoded chat messages) | | |
| | `ground_truth` | list/str | Reference answer(s) | | |
| | `metric` | str | Scoring metric for this row | | |
| | `choices` | str | Options for multiple-choice items (JSON-encoded) | | |
| | `task_id` | str | ID within the sub-task | | |
| | `model_name` | str | Candidate LLM this row was executed with | | |
| | `response` | str | The model's actual response | | |
| | `token_num` | int | Total tokens | | |
| | `input_tokens` / `output_tokens` | int | Token breakdown (for price computation) | | |
| | `response_time` | float | Latency in seconds | | |
| | `performance` | float | Task score of this model on this query (0–1) | | |
| | `embedding_id` | int | Index into precomputed query-embedding files (not included here) | | |
| ## Raw query configs (`*_queries`) | |
| Each scenario also ships its **raw query set** (no model executions) as a | |
| `<scenario>_queries` config with **train / valid / test** splits — use these to | |
| run your own candidate models from scratch. Fields: `task_name`, `query`, | |
| `ground_truth`, `metric`, `choices`, `task_id` (+ `conversation_id`/`category` | |
| for the memory scenarios). The memory queries are the RAG top-k=5 turn-pair | |
| variant used in the published experiments. Note: the `valid` split exists only | |
| here; the routing-data configs have train/test. | |
| ## Candidate pool & pricing (`llm_candidates` config) | |
| 18 models spanning **$0.05–$1.25 per 1M input tokens** (25× spread) served via Together AI / NVIDIA NIM. | |
| Row cost = `input_tokens × input_price/1e6 + output_tokens × output_price/1e6`. | |
| ## Usage | |
| ```python | |
| from datasets import load_dataset | |
| ds = load_dataset("ulab-ai/xRouteBench", "llmrouter_generic") # any config name above | |
| train, test = ds["train"], ds["test"] | |
| pricing = load_dataset("ulab-ai/xRouteBench", "llm_candidates")["train"] | |
| ``` | |
| Composite reward for cost-aware routing (GraphRouter-style): | |
| ``` | |
| reward = α · norm(performance) − β · norm(price_cost) | |
| ``` | |
| ## 💻 Code | |
| The official implementation of **LLMRouter**, including router implementations, training and evaluation pipelines, and utilities for working with **xRouteBench**, is available on GitHub: | |
| 👉 **[ulab-uiuc/LLMRouter](https://github.com/ulab-uiuc/LLMRouter)** | |
| ## Notes | |
| - Query embeddings (`.pt`) are not included; they can be regenerated from the `query` field with any sentence encoder. | |
| - The memory scenarios use the RAG top-k=5 turn-pair context variant. | |
| ## 📚 Citation | |
| If you find xRouteBench useful for your research or projects, please cite it as: | |
| ```bibtex | |
| @article{feng2026llmrouter, | |
| title={LLMRouter: Unified Infrastructure for Developing, Evaluating, and Deploying LLM Routers}, | |
| author={Feng, Tao and Yu, Fangxu and Zhang, Haozhen and Dai, Zhongjie and Yuan, Liangqi and Lei, Zijie and Zhang, Weizhi and Zhu, Kunlun and Yue, Haodong and Xuan, Keyang and others}, | |
| journal={arXiv preprint arXiv:2608.06867}, | |
| year={2026} | |
| } | |