Repository navigation
Add MT-Bench with FastChat's single-answer judging - #476
Merged
Merged
Conversation
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]>
gregorybchris
force-pushed
the
chrisg/mt-bench
branch
from
October 16, 2026 21:07
5a28527 to
56eb3d5
Compare
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]>
This was referenced Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.The branch is rebased onto
mainnow 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.mt_bench.jsonl: FastChat'squestion.jsonlplus the GPT-4 reference answers for math, reasoning and coding, from FastChat commit587d5cfgpt-5.5-2026-04-23at medium reasoning effort, FastChat's four single-answer prompts verbatim, 8,192 max tokensscore: mean 1–10 rating over both turns of every question, as FastChat'sshow_result.pyreports itscore_turn_1,score_turn_2,score_<category>,truncation_rate(any turn hit the token limit, or the conversation outgrew the context)mt_bench:paperuses FastChat's settingsChoices worth reviewing
Data is checked in. No Hugging Face copy has FastChat's GPT-4 reference answers.
HuggingFaceH4/mt_bench_promptsandlighteval/mt-benchcarry only the shortreferencefield fromquestion.jsonl(for example "Area is 3"), and the lighteval copy differs from FastChat in four question turns. The file is 85 KB and follows thefrontierscience_olympiad_mc.jsonlpattern. 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 withsingle-v1-multi-turn, which shows the whole conversation and asks the judge to focus on the second answer. Math, reasoning and coding use thesingle-math-v1prompts with reference answers. A local check confirmed that all four system prompts and templates matchjudge_prompts.jsonlbyte 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_concurrencystill bounds the judge calls in flight, because the limiter now wraps each call (see below).mt_bench:paperuses 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 throughTask.get_sampling_paramsand 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. Thegpt-4oandgpt-4.1snapshots follow on 2027-01-14 (announced 2026-10-14). The default is thereforegpt-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 asgpt-6-lunacan. Scores are therefore not directly comparable with published GPT-4-judged numbers. The results below includegpt-4-0613runs as a parity check while that model is still served.-o judge_model=...orOLMO_EVAL_JUDGEoverrides 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_chatscaffold (Add Multi-IF: multi-turn, multilingual instruction following #473) keeps one generation per turn, sonum_samples > 1does 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 asjudge_score_key. MT-Bench uses it forturn_1andturn_2instead of overridingscore_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_rateand the truncation warning also count a scripted conversation that outgrew the context before its last turn.is_truncatedreads every turn's finish reason when the scaffold recorded them.OLMO_EVAL_JUDGEcould not change a task's default reasoning effort, because the class default always won.OLMO_EVAL_JUDGE=gpt-5-mini:lowjudged MT-Bench atmedium, and a bareOLMO_EVAL_JUDGE=gpt-4-0613recorded and hashedmediumfor 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.scoring_concurrency. Retry backoff now waits outside the slot. HLE and MultiChallenge make one call per output, so their concurrency is unchanged._record_judgementnames a missing score key instead of failing later with aKeyError.JudgedScoreMetrictakes aunit, 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_repliesandmissing_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_chatscaffold: records each turn's finish reason underturn_finish_reasons, a key incommon.typesnext toreplies. The final output's ownfinish_reasondescribes only the last turn.tests/evals/tasks/judge_stubs.py(scripted_judge,use_judge,score_like_the_runner) and ajudge_test_envfixture intests/evals/tasks/conftest.pyreplace 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
mainand moves Arena-Hard onto_judge_togetherand 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
replies.cap_hitandunclosed_thinkcounts see only a conversation's final turn. That affects Multi-IF too.JudgePrompttype (system prompt plus template) for MT-Bench and Arena-Hard.Results
Beaker runs on
ai2/holmes(1× B300, vLLM), commit5a28527b, judgegpt-5.5-2026-04-23at 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.scoretruncation_ratemt_benchmt_benchmt_bench:paperPer-category scores
The ordering is what one would expect, and turn 2 scores below turn 1 for every model, as in the paper. The
gpt-5.5judge 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.scoretruncation_ratescoremt_benchmt_bench:paperGPT-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.scoremt_bench:papermt_benchmt_benchgpt-4-0613may have drifted since 2023.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.gpt-4-0613's context. Anyone judging withgpt-4-0613before its shutdown needs-o judge_max_tokens=2048.gpt-5.5scores 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:papersampling 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), andtests/harness/test_multi_turn_chat_scaffold.py(per-turn finish reasons).ruff check,ruff format --check,ty check src/, andpytest tests/ --ignore=tests/integration(3,876 passed, 35 skipped) all pass.🤖 Generated with Claude Code