CodeRouterBench
收藏资源简介:
CodeRouterBench是一个基准数据集,与Agent-as-a-Router方法一同发布,专门用于代码相关任务的模型路由评估。其核心数据单元是一个完整的任务-模型结果矩阵,每个基准任务记录了八个典型后端模型的性能结果。数据集包含分布内(ID)和分布外(OOD)两种任务类型,主要文件包括长格式的CSV结果文件(如id_results_long.csv、ood176_results_long.csv)和JSONL格式的任务元数据文件(如id_tasks.jsonl、ood176_tasks.jsonl)。数据规模方面,ID任务包含9,999个任务(分为7,080个探测任务和2,919个ID测试任务),OOD任务包含176个任务,每个任务对应8个模型,总计产生超过80,000行模型执行结果记录。每条结果记录包含任务ID、数据分割、任务维度、模型名称、性能分数、计算成本(美元)、输入/输出令牌数、总令牌数、延迟(毫秒)以及成本来源等详细字段。该数据集旨在为代码生成领域的模型选择与路由策略研究提供标准化的评估基准,支持对模型性能、效率和经济成本进行多维度分析。
CodeRouterBench is a benchmark dataset released alongside the Agent-as-a-Router method, specifically designed for model routing evaluation in code-related tasks. Its core data unit is a complete task-model result matrix, where each benchmark task records the performance results of eight typical backend models. The dataset includes both in-distribution (ID) and out-of-distribution (OOD) task types, with main files comprising long-format CSV result files (e.g., id_results_long.csv, ood176_results_long.csv) and JSONL-format task metadata files (e.g., id_tasks.jsonl, ood176_tasks.jsonl). In terms of data scale, ID tasks consist of 9,999 tasks (divided into 7,080 probing tasks and 2,919 ID test tasks), OOD tasks consist of 176 tasks, each corresponding to 8 models, resulting in over 80,000 rows of model execution result records. Each result record includes detailed fields such as task ID, data split, task dimension, model name, performance score, computational cost (USD), input/output token counts, total token count, latency (milliseconds), and cost source. This dataset aims to provide a standardized evaluation benchmark for model selection and routing strategy research in the code generation field, supporting multi-dimensional analysis of model performance, efficiency, and economic cost.
数据集名称
CodeRouterBench
任务类型
- 文本生成(text-generation)
语言
- 英语(en)
许可证
- MIT
标签
- code、benchmark、model-routing、tabular、arxiv:2606.22902
数据集简介
CodeRouterBench 是与论文 Agent-as-a-Router 一同发布的基准测试数据。其核心是一个完整的任务×模型结果矩阵:每个基准任务都记录了在八个标准后端模型上的结果。
相关资源
- 仓库:https://github.com/LanceZPF/agent-as-a-router
- 可选的训练路由器适配器:Lance1573/acrouter-qwen35-08b-router-lora
- 关联论文(Hugging Face Daily Papers):Agent-as-a-Router: Agentic Model Routing for Coding Tasks
- 关联论文(arXiv):2606.22902
数据集文件与配置
配置:default
- probing 分割:
id_probing_results_long.csv(7,080 个探测任务 × 8 个模型 = 56,640 行结果) - id_test 分割:
id_test_results_long.csv(2,919 个 ID 测试任务 × 8 个模型 = 23,352 行结果) - ood176 分割:
ood176_results_long.csv(176 个 OOD 任务 × 8 个模型 = 1,408 行结果)
配置:id_full
- all 分割:
id_results_long.csv(9,999 个分布内任务 × 8 个模型 = 79,992 行结果)
配置:task_metadata
- id_all 分割:
id_tasks.jsonl(ID 任务元数据,包含分割和维度信息) - probing 分割:
id_probing_tasks.jsonl - id_test 分割:
id_test_tasks.jsonl - ood176 分割:
ood176_tasks.jsonl(OOD176 任务提示与元数据)
其他关键文件
models.json:标准模型列表及美元定价元数据summary.json:计数、源路径及完整性检查
数据集模式(Schema)
id_results_long.csv 列
task_idsplit:probing或id_testsource_split:原始内部分割,值为train、val或testdimensionmodelscore:路由 oracle 使用的任务得分/性能cost_usdinput_tokensoutput_tokenstotal_tokenslatency_mscost_source:token_log_pricing、missing_token_record或missing_token_record_zero_total
ood176_results_long.csv 列
task_idsource_split:old112或new64benchoriginal_task_iddimensionmodelresolvedapply_okgradedin_tokout_tokcallscost_usdcost_sourcesource_status
数据分割(Splits)
- probing:7,080 个任务
- id_test:2,919 个任务
- ood176:176 个任务(当前公开的 OOD 基准)
- 较旧的 OOD112/SWE-MiniSandbox 数据仅作为遗留补充保留在仓库中。
成本计算说明
- 对于 ID 行,
cost_usd根据data/id/tokens.jsonl和data/matrices/phase1_id/model_pricing.json计算。当前导出中有 148 行遗留数据,计算出的 ID 成本总计为 408.082583 USD。 - 对于 OOD176 行,
cost_usd根据in_tok、out_tok和相同的定价表重新计算。当前导出中 OOD176 成本总计为 422.147494 USD。
源矩阵
长格式表格是从 GitHub 仓库中保存的嵌套矩阵导出的:
data/matrices/phase1_acrouter_v2/obs_matrix_clean.jsondata/matrices/phase2_ood/unified/matrix_acrouter_ood176.json




