Skip to content

[Submission] Liner Router v2 - #288

Open
jacob-liner wants to merge 1 commit into
RouteWorks:mainfrom
jacob-liner:submission/liner-router-v2
Open

jacob-liner wants to merge 1 commit into
RouteWorks:mainfrom
jacob-liner:submission/liner-router-v2

Conversation

@jacob-liner

Copy link
Copy Markdown
Contributor

What

  • Router: liner-router-v2, a new router from the team behind liner-router ([Submission] Liner Router #274). It is added as a separate row and does not replace liner-router. Leaderboard display name: "Liner Router v2" (link https://platform.liner.com, affiliation Liner, closed-source).
  • Routing reads only the query text. A rule-based labeler assigns a task type from the question and option lines, and for multiple-choice questions counts the options. A fixed table maps each cell to either one model or an agreement cascade.
  • Cascades (two cells):
    • 3 options: deepseek/deepseek-v4-flash and google/gemma-4-31b-it answer. If they agree, gemma's answer is returned. If not, google/gemini-3-flash-preview@minimal answers: if it agrees with gemma, gemma's answer is returned; if it agrees with deepseek, its own answer is returned; if all three differ, the query goes to google/gemini-3.8-flash@low.
    • 10 or more options: google/gemma-4-31b-it and deepseek/deepseek-v4-flash@high answer. If they agree, the deepseek answer is returned; otherwise the query goes to google/gemini-3.8-flash@low.
    • On full: 5,847 single-model rows, 2,272 rows answered from an agreeing pair or triple, 281 escalated to gemini-3.8-flash.
  • Every call made before the returned answer is in the row's router_usage (2,911 calls on 2,555 rows, including 4 retries after an empty content_filter answer from deepseek-v4-flash@high) and charged at table prices. deepseek/deepseek-v4-flash is in the config because it is a probe; it never returns the final answer.
  • Inference settings (also in each row's generated_result.inference_settings): gemini-3.8-flash reasoning low, with the system prompt "Output only the final answer, in exactly the format the question asks for (for example \boxed{C}). Do not write any explanation or steps."; deepseek-v4-flash@high reasoning high; gemini-3-flash-preview@minimal reasoning minimal; gemma-4-31b-it default. The user prompt is RouterArena's official prompt, unchanged. All calls went through Liner's gateway.
  • Pricing: no new prices. The three effort-suffixed names are added as aliases of existing profiles (model_profiles.yaml, regenerated model_cost.json, universal_model_names.py).
  • Files: router_inference/config/liner-router-v2.json, router_inference/predictions/liner-router-v2.json (8,400 rows with generations), router_inference/predictions/liner-router-v2-robustness.json (420 routing-only rows, no usage), and the alias entries above.

Option-count cells

  • The rule counts the lettered option lines in the query body (lines starting A., B., ...). It does not read the instruction sentence the harness prepends, dataset names, or config/eval_config/.
  • Cells: 2 options → deepseek-v4-flash@high; 3 options → cascade; 4–5 → gemini-3.8-flash@low; 6–9 → gemini-3-flash-preview@minimal; 10 or more → cascade (both cascades described above). Cascades run on 3-option rows (PubMedQA, SocialiQA, ChessInstruct and others) as well as on 10+-option rows.
  • The task-type step comes before the option count, so 25 multiple-choice rows skip these cells: code questions (e.g. JavaScript, FORTRAN, BASIC) go to gemma-4-31b-it, questions the labeler reads as translation or long-passage go to gemini-3.8-flash@low, and options written inline (Options : A. ...) are not counted as option lines.
  • Why these boundaries: on our external calibration data, single cheap models were least reliable on 3-option and on 10+-option questions, so only those cells get a second opinion before escalating. We know almost all 10+-option questions in RouterArena come from MMLU-Pro; the rule keys on the option count itself, not on the dataset.
  • On the robustness split, picks are unchanged on 286 of 294 non-cascade rows although every instruction line was paraphrased.

How the table was chosen

  • Calibration: we used external calibration data to estimate each model's capabilities per task type and option count, and set the table and cascade cells from it. We checked this data for overlap with RouterArena questions and found none. No RouterArena questions, labels, prompt templates, configs, cached results, other submissions or leaderboard scores were used to build, tune or select the table.
  • Configurations scored on RouterArena before this one: none besides liner-router ([Submission] Liner Router #274). This version was scored locally once, after the files were final.

Answer provenance

  • 652 gemma-4-31b-it rows reuse our own v1 ([Submission] Liner Router #274) answers unchanged, because v1 routed the same query to the same model with the same settings. Every other answer is a new call made for this submission. No answer is taken from another submission or from cached_results/.
  • Robustness rows: for cascade cells, the probe models were run on the perturbed prompt and the pick follows their agreement, so 19 of 126 cascade-cell rows pick a different model than on full. The robustness file is routing-only and carries no router_usage, as in liner-router-robustness.json.

Local evaluation (main 00cb25a, llm_evaluation/run.py; scripts/pricing/compute_cost.py agrees)

Metric Value
Arena 77.99
Accuracy 81.10
Cost / 1K queries $0.474 (answers $3.429661, router calls $0.554154)
Robustness 93.57

Notes

  • LiveCodeBench answers were graded locally with the official grader; 0 abnormal entries.

Try it

This router is available in Liner's product at https://platform.liner.com. If you'd like to try it, please let us know and we'll be happy to help you get started.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017PQP5GvytxacX1xzkj1w1K
@jacob-liner

Copy link
Copy Markdown
Contributor Author

/evaluate

@github-actions

Copy link
Copy Markdown

Router Evaluation Results

Router: liner-router-v2
Dataset Split: full
Evaluator: main @ 00cb25a

RouterArena Metrics

Metric Value
RouterArena Score 0.7798
Accuracy 81.09%
Total Cost $3.983815
Avg Cost per Query $0.000474
Avg Cost per 1K Queries $0.4743
Number of Queries 8400
Abnormal Entries 0
Robustness Score 0.9357

Evaluation completed by RouterArena automated workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant