Datasets:
|
Download README.md from divy123/sequential-router-v2: direct link, hf CLI and curl.
- Browser
- Download file 15.5 kB
-
https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/README.md
- Command line
-
hf download hf://datasets/divy123/sequential-router-v2/README.md
-
curl -L -o README.md https://huggingface.co/datasets/divy123/sequential-router-v2/resolve/main/README.md
15.5 kB
| license: other | |
| license_name: mixed-see-licenses | |
| pretty_name: Sequential Router v2 (full, 20k, private) | |
| task_categories: | |
| - text-generation | |
| language: | |
| - en | |
| tags: | |
| - llm-routing | |
| - model-selection | |
| - benchmark | |
| size_categories: | |
| - 10M<n<100M | |
| configs: | |
| - config_name: queries | |
| data_files: queries/queries.parquet | |
| default: true | |
| - config_name: responses | |
| data_files: dataset/responses.parquet | |
| - config_name: response_features | |
| data_files: dataset/response_features.parquet | |
| - config_name: states | |
| data_files: dataset/states.parquet | |
| - config_name: candidates | |
| data_files: dataset/candidates.parquet | |
| # Sequential Router v2: a response-aware sequential multi-LLM routing dataset | |
| **14,752 queries · 20 language models · 295,040 responses · 573,495 routing states · 10.56M candidate rows.** | |
| This public release contains only the **14,752 queries whose source datasets have permissive licenses** (MIT, Apache-2.0, CC-BY-4.0, CC-BY-SA-4.0, ODC-By, CC0). The full generation set had 20,000 queries; the other 5,248 come from sources with restricted, unspecified or non-commercial terms and are **not part of this release** | |
| (see [Scope of this release](#scope-of-this-release)). Source and response text is complete for every row that is included. | |
| Sequential Router v2 records, for these queries and 20 language models, every model's independent answer, a task-specific quality score, and the measured inference cost. | |
| On top of that matrix it provides routing *states* (query only, one, two or three models already called) with the offline outcome of every remaining candidate model: | |
| `delta_Q(M_j | S_t) = Q(R_j) - Q_best(S_t)`, `positive_gain = max(0, delta_Q)` (signed `delta_Q` is kept). | |
| It is built for training and evaluating routers that decide, given the query and the responses observed so far, which model to call next or whether to STOP. | |
| Router-visible columns (`feat_*`) are computed only from the already-called models' responses; candidate responses and every quality value are `label_*` outcomes. | |
| ## Contents | |
| | file | description | | |
| |---|---| | |
| | `queries/queries.parquet` | the 14,752 queries (prompt, task family, source, split, gold payload, license) | | |
| | `dataset/responses.parquet` | 295,040 rows, one per (query, model): raw text, reasoning trace if separated, token counts, latency, GPU-seconds, log-prob statistics, quality `Q`, scorer provenance, label confidence | | |
| | `dataset/states.parquet` | 573,495 routing states with `feat_*` (router-visible) and `label_*` columns, oracle actions for lambda in [0.0, 0.1, 0.25, 0.5, 1.0, 2.0] | | |
| | `dataset/candidates.parquet` | 10,558,967 (state, candidate model) rows with `label_Q`, `label_delta_Q`, `label_positive_gain`, cost | | |
| | `dataset/response_features.parquet` | per-response router-visible features | | |
| | `responses/`, `responses_truncated/`, `scores/` | raw per-model generations (JSONL), superseded truncated generations, and per-source objective, judge and auxiliary scores | | |
| | `manifests/` | models, raw-source commits and hashes, splits, nested scaling subsets, waves, cost calibration, judge reliability | | |
| | `reports/dataset_report.md` | audit gates and descriptive statistics (computed on the full 20,000-query build) | | |
| | `code/` | all construction scripts | | |
| ## Splits | |
| Query-level 70/15/15 (train/val/test), stratified by task family and source dataset and grouped so related items (same passage, table, sentence pair, MBPP task, ...) never straddle splits. | |
| Splits were defined on the original 30,000-query pool and inherited by the generation subset; this release keeps the permissive queries of each split (train 10,305 / val 2,248 / test 2,199 queries). Nested train subsets (`manifests/scaling_train_N_ids.json`) were stratified on the full build and are filtered here, so the number in a file name is the original size, not the number of ids it now holds; validation and test are fixed. | |
| ## Task families | |
| 16 task families (the full build had 20; classification, information extraction, translation and abstractive summarization came entirely from restricted sources and are not included): | |
| math_competition (1,141), science (1,141), knowledge (1,140), logic_reasoning (1,139), multilingual (1,009), summ_news (1,007), simplification (1,007), table_reasoning (1,007), math_word (1,006), reading_comprehension (1,005), planning (940), code_repair (872), json_generation (806), code_generation (625), long_context_qa (546), instruction_following (361). | |
| ## States | |
| | k | states per query | candidates | | |
| |---|---|---| | |
| | 0 | 1 (query only, `Q_best = 0`) | all 20 models | | |
| | 1 | 20 (complete) | the other 19 (full one-model candidate matrix) | | |
| | 2 | 12 sampled ordered pairs (`sample_stratum` in random / weak / contains_best) | remaining 18 | | |
| | 3 | 6 sampled ordered triples | remaining 17 | | |
| Use `sample_stratum == 'random'` for analyses that need an unbiased state distribution. | |
| ## Cost | |
| `gpu_seconds` is a token-based allocation of measured wave GPU-time (8 x A100-80GB, vLLM continuous batching): rate = measured GPU-seconds per (completion + 0.1 x prompt) token for each model; | |
| `latency_s` is the measured per-request latency under saturated batching. `cost_norm` divides by the median training cost of the task family. See DATA_CARD for caveats. | |
| ## Status | |
| Audit verdict at build time: **DATASET READY FOR ROUTER TRAINING: YES** (see `reports/dataset_report.md`). | |
| ## Usage | |
| Each table has its own schema, so each is a separate config: `queries`, `responses`, `response_features`, `states`, `candidates`. Nothing is split by train/val/test at the file level; use the `split` column. | |
| ### Load with `datasets` | |
| ```python | |
| from datasets import load_dataset | |
| repo = "divy123/sequential-router-v2" | |
| queries = load_dataset(repo, "queries", split="train") # 14,752 rows | |
| responses = load_dataset(repo, "responses", split="train") # 295,040 rows (14,752 queries x 20 models) | |
| states = load_dataset(repo, "states", split="train") # 573,495 rows | |
| # candidates is large (10.6M rows); stream it | |
| candidates = load_dataset(repo, "candidates", split="train", streaming=True) | |
| ``` | |
| The single `train` split name is just the Hub default for a file; the real splits are in the `split` column (`train` / `val` / `test`). | |
| ### Load with pandas | |
| ```python | |
| import pandas as pd | |
| base = "hf://datasets/divy123/sequential-router-v2/" | |
| q = pd.read_parquet(base + "queries/queries.parquet") | |
| r = pd.read_parquet(base + "dataset/responses.parquet") | |
| st = pd.read_parquet(base + "dataset/states.parquet") | |
| c = pd.read_parquet(base + "dataset/candidates.parquet", columns=["state_id", "candidate_model", "label_Q", "label_delta_Q", "label_positive_gain", "cost_norm"]) | |
| ``` | |
| Or download everything (about 2 GB) with `huggingface_hub.snapshot_download("divy123/sequential-router-v2", repo_type="dataset")`. | |
| ### Tables and keys | |
| | table | key | notes | | |
| |---|---|---| | |
| | `queries` | `query_id` | prompt, `task_family`, `source_dataset`, `split`, `license_tier`, gold `payload` / `reference` | | |
| | `responses` | (`query_id`, `model_id`) | `text`, `reasoning`, token counts, log-prob statistics, `Q` (0-10), `gpu_seconds`, `cost_norm`, `label_confidence` | | |
| | `response_features` | (`query_id`, `model_id`) | router-visible per-response `feat_*` | | |
| | `states` | `state_id` | `called_models` (the ordered models already called), `k` (0-3), `feat_*` inputs, `label_*` outcomes and oracle actions per lambda | | |
| | `candidates` | (`state_id`, `candidate_model`) | outcome of calling each remaining model: `label_Q`, `label_delta_Q`, `label_positive_gain`, cost | | |
| Join `states` to `candidates` on `state_id`, and either to `queries` on `query_id`. Only `feat_*` columns are valid router inputs; everything named `label_*` is an outcome and must not be fed to a router. | |
| ### Example: build a training set for a next-model router | |
| ```python | |
| import pandas as pd | |
| base = "hf://datasets/divy123/sequential-router-v2/" | |
| st = pd.read_parquet(base + "dataset/states.parquet") | |
| c = pd.read_parquet(base + "dataset/candidates.parquet", columns=["state_id", "candidate_model", "label_positive_gain", "cost_norm"]) # 14.3M rows: select columns | |
| st = st[st.sample_stratum.isin(["all", "random"])] # unbiased state distribution | |
| feat_cols = [col for col in st.columns if col.startswith("feat_")] | |
| train = st[st.split == "train"] | |
| rows = c.merge(train[["state_id", "task_family"] + feat_cols], on="state_id") | |
| X = rows[feat_cols + ["candidate_model", "task_family"]] # router-visible inputs | |
| y = rows["label_positive_gain"] # target; subtract lambda * cost_norm for a cost-aware utility | |
| ``` | |
| Oracle actions for a cost trade-off `lambda` in {0.0, 0.1, 0.25, 0.5, 1.0, 2.0} are in `label_oracle_action_l<lambda>` (a model id or `STOP`) on `states`. | |
| ### Notes | |
| - Normalise features and fit any encoders on the train split only. | |
| - `sample_stratum` is `all` for the complete k=0 and k=1 states, and `random` / `weak` / `contains_best` for sampled k=2 and k=3 states. Use `all` + `random` for unbiased evaluation; `weak` and `contains_best` were chosen using quality outcomes. | |
| - Raw model outputs are also provided per model in `responses/*.jsonl` and `responses_truncated/*.jsonl`, with per-source scores under `scores/`. | |
| - `manifests/` holds the splits (`gen20k_*_ids.json`), nested training subsets for scaling studies (`scaling_train_N_ids.json`), model and source license tables, cost calibration and judge reliability. | |
| - Responses can be filtered by `license_tier` through `queries` (see Licenses below) if you need only permissively licensed source text. | |
| ## Licenses | |
| Annotations produced for this release (quality scores, states, costs) are released under CC-BY-4.0. Query text, gold payloads and model responses derive from third-party datasets and models with their own terms (some source datasets are CC-BY-SA; Gemma and Llama outputs carry those models' terms), so the dataset as a whole is labelled `other`: | |
| every query carries `source_repo`, `source_license` and `license_tier`, so subsets can be filtered. See `LICENSES.md` and `DATA_CARD.md` before any redistribution or commercial use. | |
| ## Acknowledgements | |
| This dataset is built on the work of many others. Please cite the original sources when you use the corresponding data. | |
| **Source datasets** (Hub repo ids; license per hub metadata, see `LICENSES.md` and the per-query `source_repo` / `source_license`): | |
| - Math and reasoning: GSM8K (`openai/gsm8k`), MATH (`EleutherAI/hendrycks_math`), MGSM (`juletxara/mgsm`), BIG-Bench Hard (`lukaemon/bbh`), CommonsenseQA (`tau/commonsense_qa`) | |
| - Knowledge and science: MMLU-Pro (`TIGER-Lab/MMLU-Pro`), SuperGPQA (`m-a-p/SuperGPQA`), ARC (`allenai/ai2_arc`), Global-MMLU-Lite (`CohereLabs/Global-MMLU-Lite`) | |
| - Code: HumanEval (`openai/openai_humaneval`), MBPP (`Muennighoff/mbpp`, including programmatically mutated MBPP solutions), HumanEvalPack (`bigcode/humanevalpack`) | |
| - Summarization, simplification and generation: CNN/DailyMail (`abisee/cnn_dailymail`), ASSET (`facebook/asset`), E2E NLG (`tuetschek/e2e_nlg`) | |
| - Instruction following: IFEval (`google/IFEval`) | |
| - Reading comprehension, long context and tables: DROP (`ucinlp/drop`), SQuAD 2.0 (`rajpurkar/squad_v2`), LongBench (`zai-org/LongBench`), TabFact (`wenhu/tab_fact`) | |
| - Planning: generated Blocksworld, Tower of Hanoi and Sudoku instances (CC0, created for this dataset) | |
| Sources whose terms are restricted, unspecified or non-commercial (XSum, APPS-verified, CoNLL-2003, ADE Corpus v2, WMT14, AG News, Emotion, SST-5, TREC, No Robots) are not part of this release; see Scope of this release. | |
| **Models** whose outputs are included: Qwen3 (0.6B to 32B), DeepSeek-R1-Distill-Qwen (7B, 14B), Ministral-3-8B, Magistral-Small-2509, Gemma 3 (4B, 12B), Phi-4 and Phi-4-mini-reasoning, Granite 3.3 (2B, 8B), Llama 3.1 8B and Llama 3.2 3B, gpt-oss-20b, OLMo 3 7B. | |
| Gemma outputs are subject to the Gemma Terms of Use; Llama outputs are subject to the Llama 3.1 / 3.2 Community Licenses (Built with Llama). | |
| **Judges and metrics:** Qwen3-30B-A3B-Instruct-2507 and gemma-3-27b-it (judges), COMET-22, BERTScore, SARI (`evaluate`), and the IFEval instruction checkers. | |
| Thanks to the authors and maintainers of all of the above. | |
| ## Scope of this release | |
| Only queries with `license_tier == "permissive_open"` are included, with complete text. The original build had 20,000 generation queries; the 5,248 excluded ones are all rows from these sources, whose terms are restricted, unspecified or non-commercial: | |
| | excluded source | queries | reason | | |
| |---|---|---| | |
| | XSum | 1,007 | BBC articles, no license stated | | |
| | APPS (verified subset) | 513 | no license tag on the hub dataset | | |
| | CoNLL-2003 | 503 | Reuters RCV1 text, research agreement | | |
| | ADE Corpus v2 | 502 | no license stated | | |
| | WMT14 (4 directions) | 1,005 | shared-task data, research use | | |
| | AG News, Emotion, SST-5, TREC | 1,005 | academic / non-commercial or unspecified | | |
| | No Robots-based prompts | 713 | CC-BY-NC-4.0 (non-commercial) | | |
| For these rows everything was removed from the release (text, scores, states and candidates), not just the text. Consequently, `reports/dataset_report.md`, `DATA_CARD.md` and `LICENSES.md` describe the original 20,000-query build, and their counts are larger than the ones in this README. | |
| The scripts in `code/` (`fetch_raw.py`, `build_queries.py`) show how the original queries were built from the upstream sources, which anyone can obtain under their own terms. | |
| ## Citation | |
| ### How to cite this dataset | |
| If you use Sequential Router v2, please cite it: | |
| ```bibtex | |
| @misc{sequential_router_v2_2026, | |
| title = {Sequential Router v2: a response-aware sequential multi-LLM routing dataset}, | |
| author = {Bajpai, Divya}, | |
| year = {2026}, | |
| howpublished = {Hugging Face Datasets}, | |
| url = {https://huggingface.co/datasets/divy123/sequential-router-v2} | |
| } | |
| ``` | |
| Plain text: Bajpai, D. (2026). *Sequential Router v2: a response-aware sequential multi-LLM routing dataset*. Hugging Face Datasets. https://huggingface.co/datasets/divy123/sequential-router-v2 | |
| ### Cite the sources this dataset is built on | |
| The queries, model responses and quality scores come from other people's work, and using this dataset means using theirs too. Please cite what is relevant to your use. All the entries below are in [`CITATIONS.bib`](CITATIONS.bib) (42 BibTeX entries, including the one above). | |
| | You use | Please also cite | | |
| |---|---| | |
| | Queries or gold answers from a task family | the source dataset: GSM8K, MATH, MGSM, BIG-Bench Hard, CommonsenseQA, MMLU-Pro, SuperGPQA, ARC, Global-MMLU, HumanEval, MBPP, HumanEvalPack, CNN/DailyMail, ASSET, E2E NLG, IFEval, LongBench (plus HotpotQA, 2WikiMultihopQA, MuSiQue, NarrativeQA and Qasper, which it contains), DROP, SQuAD 2.0, TabFact. The `source_dataset` column of `queries` tells you which. | | |
| | Responses from a model | the model's report: Qwen3, DeepSeek-R1 (for the R1-Distill models), Ministral 3, Magistral, Gemma 3, Phi-4, Phi-4-mini-reasoning, Llama 3, gpt-oss, OLMo 3, and the Granite 3.3 model card. The `model_id` column tells you which. | | |
| | Quality scores (`Q`) | the evaluators behind them: IFEval checkers, COMET-22 and BERTScore, SARI, and the judge models (Qwen3 and Gemma 3). Responses were generated with vLLM. | | |
| | The synthetic planning tasks (Blocksworld, Hanoi, Sudoku) | this dataset only; they were generated for it (CC0). | | |
| Licenses are separate from citations: each source's license applies to its text (see `LICENSES.md` and the `source_license` column), and Gemma and Llama outputs are subject to their model licenses. | |