Skip to content

Add MT-Bench with FastChat's single-answer judging - #476

Merged
gregorybchris merged 3 commits into
mainfrom
chrisg/mt-bench
Oct 17, 2026
Merged

gregorybchris merged 3 commits into
mainfrom
chrisg/mt-bench

Conversation

@gregorybchris

@gregorybchris gregorybchris commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds MT-Bench as mt_bench. It has 80 questions in eight categories (writing, roleplay, reasoning, math, coding, extraction, STEM, humanities), and each question has two user turns. The model answers both turns itself, so the second turn follows up on its own first answer. A model judge rates each turn from 1 to 10.

uv run olmo-eval run -m my-model --harness multi_turn_chat -t mt_bench

The branch is rebased onto main now that #473 (Multi-IF) and #475 (MultiChallenge) have merged. It is planned to merge before #474 (Arena-Hard v2), which merges cleanly on top of it; see Arena-Hard below.

Setting Value
Data mt_bench.jsonl: FastChat's question.jsonl plus the GPT-4 reference answers for math, reasoning and coding, from FastChat commit 587d5cf
Judge gpt-5.5-2026-04-23 at medium reasoning effort, FastChat's four single-answer prompts verbatim, 8,192 max tokens
Primary metric score: mean 1–10 rating over both turns of every question, as FastChat's show_result.py reports it
Other metrics score_turn_1, score_turn_2, score_<category>, truncation_rate (any turn hit the token limit, or the conversation outgrew the context)
Generation temperature 0.6, top_p 0.95, up to the context limit; mt_bench:paper uses FastChat's settings

Choices worth reviewing

  • Data is checked in. No Hugging Face copy has FastChat's GPT-4 reference answers. HuggingFaceH4/mt_bench_prompts and lighteval/mt-bench carry only the short reference field from question.jsonl (for example "Area is 3"), and the lighteval copy differs from FastChat in four question turns. The file is 85 KB and follows the frontierscience_olympiad_mc.jsonl pattern. Loading checks the question count and that exactly the math, reasoning and coding questions have references.

  • Judging follows FastChat. Turn 1 is judged with single-v1. Turn 2 is judged with single-v1-multi-turn, which shows the whole conversation and asks the judge to focus on the second answer. Math, reasoning and coding use the single-math-v1 prompts with reference answers. A local check confirmed that all four system prompts and templates match judge_prompts.jsonl byte for byte. The rating is read with FastChat's two regexes ([[x]], then [x]). Unlike FastChat, a rating outside 1–10 counts as unparseable and is retried.

  • Missing answers get the lowest rating. A turn with no visible answer gets 1 without calling the judge. That covers an empty reply, an unclosed <think> block, and a second turn the conversation never reached because the context overflowed. A closed reasoning block is removed before judging. When turn 1 has no visible answer, turn 2 is still judged, and the judge sees an empty first answer.

  • Judge failures leave the question unscored. If either turn's judge call fails, or gives no rating after every retry, the question is recorded as an incomplete score and left out of the metrics. FastChat keeps an out-of-range rating and drops only the turn it could not rate (rating −1), so the two give the same scores whenever every turn gets a rating from 1 to 10.

  • The two turns are judged concurrently. scoring_concurrency still bounds the judge calls in flight, because the limiter now wraps each call (see below).

  • mt_bench:paper uses FastChat's generation settings: up to 1,024 new tokens, at FastChat's per-category temperature (0.7 for writing and roleplay, 0.1 for STEM and humanities, greedy otherwise). It sets them through Task.get_sampling_params and rejects a temperature override, which would otherwise be recorded in the config but not used.

  • Judge model. FastChat judges with gpt-4 (gpt-4-0613), which OpenAI shuts down on 2026-10-23. The gpt-4o and gpt-4.1 snapshots follow on 2027-01-14 (announced 2026-10-14). The default is therefore gpt-5.5-2026-04-23, the dated snapshot FrontierScience also pins. A dated snapshot cannot change under an unchanged task hash, which an alias such as gpt-6-luna can. Scores are therefore not directly comparable with published GPT-4-judged numbers. The results below include gpt-4-0613 runs as a parity check while that model is still served. -o judge_model=... or OLMO_EVAL_JUDGE overrides the judge as for HLE and MultiChallenge. The judge settings are part of the task hash.

  • MultiChallenge's default judge is affected too. Add MultiChallenge and share judge orchestration with HLE #475 defaults to gpt-4o-2024-08-06, which is in the 2027-01-14 shutdown.

  • One sample per question. The multi_turn_chat scaffold (Add Multi-IF: multi-turn, multilingual instruction following #473) keeps one generation per turn, so num_samples > 1 does not give several conversations. Scoring averages over outputs if there are several, but runs today produce one.

Changes to shared code

The two review passes found that MT-Bench was re-implementing parts of the judge base and the multi-turn plumbing. Those parts now live in shared code, and the existing tasks use them.

  • JudgedTask (evals/tasks/common/judge.py)
    • judge_extra_score_keys: further per-output scores the base aggregates per instance, the same way as judge_score_key. MT-Bench uses it for turn_1 and turn_2 instead of overriding score_responses.
    • unanswered_score: the score of an instance with no model output. It defaults to 0; MT-Bench sets it to 1, the lowest rating.
    • _judge_together(*calls): runs one output's judge calls concurrently, and raises the first failure only after every call has settled. MT-Bench uses it now, and Arena-Hard can replace its own copy of this logic (see below).
    • truncation_rate and the truncation warning also count a scripted conversation that outgrew the context before its last turn. is_truncated reads every turn's finish reason when the scaffold recorded them.
    • Bug fix: OLMO_EVAL_JUDGE could not change a task's default reasoning effort, because the class default always won. OLMO_EVAL_JUDGE=gpt-5-mini:low judged MT-Bench at medium, and a bare OLMO_EVAL_JUDGE=gpt-4-0613 recorded and hashed medium for a model that has no reasoning effort. The override's effort now replaces the task default unless the effort itself was overridden. HLE and MultiChallenge have no default effort, so they are unchanged.
    • The judge limiter wraps each judge call rather than each output. Before, an output that made several concurrent calls held one slot, so MT-Bench's two turns or Arena-Hard's two games could exceed scoring_concurrency. Retry backoff now waits outside the slot. HLE and MultiChallenge make one call per output, so their concurrency is unchanged.
    • _record_judgement names a missing score key instead of failing later with a KeyError.
    • JudgedScoreMetric takes a unit, so the rating metrics need no subclass. Metric serialization is unchanged, so other task hashes don't move.
  • common/multi_turn.py (new): scripted_chat_request, turn_count, turn_replies and missing_replies_error. Multi-IF, its scorer and MT-Bench all use them in place of their own copies.
  • Task._load_packaged_instances: reads a JSONL file checked in with the task. MT-Bench and FrontierScience MC use it.
  • multi_turn_chat scaffold: records each turn's finish reason under turn_finish_reasons, a key in common.types next to replies. The final output's own finish_reason describes only the last turn.
  • Tests: tests/evals/tasks/judge_stubs.py (scripted_judge, use_judge, score_like_the_runner) and a judge_test_env fixture in tests/evals/tasks/conftest.py replace helpers copied across the HLE, MultiChallenge, judge-base and MT-Bench tests.

Arena-Hard (#474)

#474 touches none of these files and merges cleanly onto this branch. Its 85 tests pass on the combination. None of the shared changes alter Arena-Hard's behavior or task hashes: it has no default reasoning effort, it is single-turn, and metric serialization is unchanged. Its Beaker results stay valid.

After this PR merges, #474 rebases onto main and moves Arena-Hard onto _judge_together and the shared test stubs in its own diff. That change is checked on a trial merge: it removes 37 lines and its tests pass.

Follow-ups, not in this PR

  • Check the scaffold a task requires before generation. Today Multi-IF and MT-Bench only fail at scoring time.
  • Store one record per turn (text, finish reason, and so on) rather than parallel lists next to replies.
  • The run-level cap_hit and unclosed_think counts see only a conversation's final turn. That affects Multi-IF too.
  • A shared JudgePrompt type (system prompt plus template) for MT-Bench and Arena-Hard.

Results

Beaker runs on ai2/holmes (1× B300, vLLM), commit 5a28527b, judge gpt-5.5-2026-04-23 at medium effort. Each run took about 1–3 minutes of generation and judging. All 80 questions and all 160 turns were judged, with no parse failures and no judge-free fallback ratings.

Model Task score Turn 1 Turn 2 truncation_rate Beaker
Qwen3-8B (thinking) mt_bench 7.88 8.43 7.34 0.00 01M4YD7X
OLMo 3 7B Instruct mt_bench 6.90 7.60 6.20 0.00 01M4YD78
zephyr-7b-beta mt_bench:paper 4.92 5.60 4.24 0.09 01M4YD6M
Per-category scores
Model writing roleplay reasoning math coding extraction stem humanities
Qwen3-8B 7.50 7.15 7.90 9.80 8.20 8.30 7.10 7.10
OLMo 3 7B Instruct 7.30 6.50 6.65 9.40 6.50 6.35 6.05 6.45
zephyr-7b-beta 5.65 4.80 5.50 3.65 3.60 4.70 5.50 5.95

The ordering is what one would expect, and turn 2 scores below turn 1 for every model, as in the paper. The gpt-5.5 judge is much stricter than GPT-4: zephyr-7b-beta scores 4.92 here, against 7.34 on FastChat's GPT-4-judged leaderboard.

Rerun after the refactor

The same setup at commit 56eb3d59, after the rebase and the shared-code changes. The later limiter commit changes only how many judge calls run at once. All 160 turns of each run were judged, with no parse failures and no judge-free fallback ratings. The differences from the runs above are within sampling noise: both tasks sample, at temperature 0.6, or at 0.7 for writing and roleplay in :paper.

Model Task score Turn 1 Turn 2 truncation_rate Earlier score Beaker
Qwen3-8B (thinking) mt_bench 7.95 8.45 7.45 0.00 7.88 01M538SY
zephyr-7b-beta mt_bench:paper 4.91 5.73 4.09 0.075 4.92 01M538T8

GPT-4 parity check

The same models judged with -o judge_model=gpt-4-0613 -o judge_max_tokens=2048, FastChat's judge and judge budget.

Model Task score Turn 1 Turn 2 Published (GPT-4 judge) Beaker
zephyr-7b-beta mt_bench:paper 7.14 7.51 6.77 7.34 01M4YEKS
Qwen3-8B (thinking) mt_bench 9.12 9.28 8.97 n/a 01M4YEMY
OLMo 3 7B Instruct mt_bench 8.87* 9.05* 8.70* n/a 01M4YEMN
  • zephyr-7b-beta reproduces its published score within 0.2 (7.14 against 7.34 from the Zephyr paper and FastChat leaderboard). Some gap is expected: generation here runs on vLLM rather than FastChat's Hugging Face loop, writing and roleplay sample at temperature 0.7, and gpt-4-0613 may have drifted since 2023.
  • *OLMo 3 is incomplete. One of 80 questions (128, coding) could not be judged. Its turn-2 judge prompt holds 7,120 tokens of conversation, which leaves less than the 2,048-token budget inside gpt-4-0613's 8,192-token context. FastChat would drop the same judgment. The runner flags the task incomplete and withholds its metrics by design, so the starred numbers are computed from the 79 judged questions in the predictions file.
  • The first attempt failed on every judge call, because the 8,192-token default judge budget does not fit gpt-4-0613's context. Anyone judging with gpt-4-0613 before its shutdown needs -o judge_max_tokens=2048.
  • The two judges rank the models the same way. gpt-5.5 scores 2.2 points lower for zephyr and about 1.2 points lower for Qwen3-8B, so it is a much stricter judge.

Testing

  • tests/evals/tasks/test_mt_bench.py (50 tests): data loading, judge prompts, rating parsing and retries, per-turn and per-category scoring, missing answers, a blank first turn followed by a judged second turn, truncation from the token limit and from context overflow, a failed sample among several, judge API and parse failures, the judge override's reasoning effort, the scaffold requirement, the incomplete-score path through the runner, and the :paper sampling through the runner.
  • tests/evals/tasks/test_judge.py: the extra score keys, the unanswered score, concurrent judge calls (including an API failure among them), the limiter bounding calls across outputs, the retry of a transient API error, conversations cut short, per-turn truncation, the reasoning-effort fix, and the metric unit.
  • tests/common/test_multi_turn.py, tests/evals/tasks/test_base.py (packaged loader), and tests/harness/test_multi_turn_chat_scaffold.py (per-turn finish reasons).
  • ruff check, ruff format --check, ty check src/, and pytest tests/ --ignore=tests/integration (3,876 passed, 35 skipped) all pass.

🤖 Generated with Claude Code

@gregorybchris
gregorybchris requested a review from a team as a code owner October 14, 2026 20:40
gregorybchris and others added 2 commits October 16, 2026 13:49
MT-Bench's 80 two-turn questions, run through the multi_turn_chat scaffold
and rated 1-10 per turn by a judge with FastChat's prompts. The default judge
is a dated snapshot that outlives gpt-4-0613; the :paper variant uses
FastChat's per-category temperatures and 1,024-token replies. The scaffold
now records each turn's finish reason so truncation is counted per turn.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- JudgedTask aggregates extra per-output scores (judge_extra_score_keys),
  gives unanswered instances a task-chosen score, runs an output's judge
  calls together (_judge_together), and counts a conversation cut short by
  the context as truncated. is_truncated reads every turn's finish reason.
- OLMO_EVAL_JUDGE now replaces a task's default reasoning effort; before,
  the class default always won, and a bare model kept an effort it was
  never asked to use.
- JudgedScoreMetric takes a unit, so rating metrics need no subclass.
- common.multi_turn holds the scripted-request, reply and missing-scaffold
  helpers; Multi-IF and its scorer use them.
- Task._load_packaged_instances reads checked-in JSONL; FrontierScience MC
  uses it.
- Judged-task tests share their judge stubs and environment fixture.

MT-Bench drops its score_responses aggregation, hand-rolled parse-error
path and metric subclass, judges both turns through _judge_output, and
validates its data file at load.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The run-wide judge limiter was held for a whole output, so a task that
judges an output with several concurrent calls (MT-Bench's two turns,
Arena-Hard's two games) could exceed scoring_concurrency. The limiter now
wraps each judge call, and retry backoff waits outside it.

Also from review: _record_judgement names a missing score key instead of
failing later with a KeyError, the module docstring states that an effort
override equal to the task default counts as unset, and new tests cover
the limiter, an API failure among concurrent calls, and the retry wiring.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@gregorybchris
gregorybchris merged commit f886f53 into main Oct 17, 2026
8 checks passed
@gregorybchris
gregorybchris deleted the chrisg/mt-bench branch October 17, 2026 01:49
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