Repository navigation
Add MMLU-Pro tasks (5-shot MC, 5-shot cloze, 0-shot CoT) - #383
Conversation
gregorybchris
left a comment
There was a problem hiding this comment.
This review was generated by an agent following
REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.
Looks good overall! Nothing blocking. Five non-blocking items, two of which change the task hash if done after results are stored, so they are worth deciding before merge.
What I verified (no need to re-check):
ruff check,ruff format --checkclean;tyshows only the pre-existing swerex diagnostic in an untouched file;pytest tests/ --ignore=tests/integration: 2318 passed, 8 skipped. CI is green.- Parity: I re-ran
diff_prompts.pyon your dumps and also regenerated the olmo-eval dump from this branch's HEAD (your dumps predate the final commit by about 90 minutes): 36,096 prompt comparisons, 0 mismatches; 40 extractor cases, 0 mismatches; 12,032 uniquequestion_ids. - Beaker: recomputed from
metrics.json: 7B micro 30.77 / macro 33.02, 13B micro 34.66 / macro 37.18, 0 failed instances, category sizes 381 to 1351. CoT: 700 rows, 699 with an extracted letter, 37.57%. - Task identity:
mmlu_pro_math,:mc, and:olmo3baseshare hashae38cf9e7f6fae6d(intended alias);:rc,:rc:bpb,:cot, and the other categories all differ. The CoT prompt text lives inChatFormatter.user_template, so it is in the hash. - Registration: task and suite auto-discovery pick up both new modules;
task inspectandsuite inspectwork on real data.limitis applied after category filtering (runners/asynq/preparation.py:57), which is why the 50-per-category CoT run worked. - Extractor: I read
extract_answer_with_formatand agree it cannot reproduce this cascade (first-match "answer is", the.*[aA]nswer:per-line rule, and 0.0 rather than 0.2/0.1 for the bare-letter fallback).<think>traces are dropped before matching. - Sampling: 2048 tokens, temperature 0. vLLM maps
do_sample=True, temperature=0.0to greedy (providers/vllm.py:223), matching oe-eval'sdo_sample: False;stop_sequences=Nonematches oe-eval's[]. - No Ai2 paths in source; no open PRs overlap; the registries reject task/suite name collisions and the tests exercise them.
Non-blocking
-
src/olmo_eval/evals/tasks/mmlu_pro.py:249(framework:src/olmo_eval/runners/io/builders.py:96)
The scorer writesanswer_format_correcttooutput.metadata, butbuild_predictionscopies only a fixed set of keys, so it never reaches the predictions file. I confirmed 0 of 700 CoT prediction rows contain it. oe-eval reports it as an extra metric, so after a run here a parse failure cannot be told apart from a wrong answer. This is a deficiency inbuild_predictions, not in this PR, and GPQA CoT has the same gap. The fix is small; could we either include it here or file an issue and link it from the PR before merge?# builders.py, beside the judge_result block if "answer_format_correct" in meta: out_data["answer_format_correct"] = meta["answer_format_correct"]
plus a
tests/runners/io/test_builders.pycase asserting the key survives. -
src/olmo_eval/evals/tasks/mmlu_pro.py:279
The CoT instance carriesgold_idxin metadata, andbuild_predictions(builders.py:102) prefersgold_idxovergold_answerforlabel. Result: every CoT prediction row has an intlabel(for example2) next to a letterextracted_answer("C"). oe-eval's label for this task is the letter.gold_idxis only consumed for multi-output logprob responses, so the CoT instance does not need it. Please drop it from the CoT metadata. The framework alternative is forbuild_predictionsto prefergold_answerwhen a response has a single output, which would also fix GPQA CoT; an issue for that is fine. -
src/olmo_eval/evals/tasks/mmlu_pro.py:295
TheDataSourcehas norevision. The Hub dataset was last modified 2026-05-02 (shab189ec765aa7ed75c8acfea42df31fdae71f97be) and MMLU-Pro has been edited in place before.revisionis part ofDataSource.to_dict(), so pinning later changes every task hash once results exist. Could we pin now, asfrontierscience.pyandastabench_sqa.pydo? Your parity run used the current revision, so pinning to that sha keeps the numbers. -
src/olmo_eval/evals/tasks/mmlu_pro.py:260
mmlu_cot.pyandgpqa.pysetstrip_thinking = Trueon their CoT classes; this one strips inside the extractor instead. Scores agree either way, but withstrip_thinkingthe runner recordsoriginal_textand stores the stripped answer astext, so predictions from the three CoT task families would differ in shape.strip_thinkingenters the hash only when True, so this is another decide-before-merge item. Should this task set it too? -
src/olmo_eval/evals/suites/mmlu_pro.py:6
oe-eval'smmlu_pro:mc::noneis a micro (instance-weighted) average; this suite is macro, and on OLMo-2-7B that is 33.02 vs 30.77. The PR names the divergence. Please file the weighted-aggregation follow-up as an issue (AggregationStrategyhas no weighted option) and link it here before merge, and consider noting the divergence in themmlu_prosuite description so a reader comparing against the model card is not surprised.
Nits
- Nit:
src/olmo_eval/evals/tasks/mmlu_pro.py:312(also 331, 351):register()alreadysetattrs dynamically created classes onto their module for pickling, so theglobals()[...]lines are redundant. Thetype(...)registration loop followsmmlu.pyandgpqa.py, so I am not asking to change it here. - Nit:
src/olmo_eval/evals/tasks/mmlu_pro.py:49: this is the second module importing_format_rcand_make_mcq_promptfrommmlu.py; dropping the underscore or moving them to a shared helper would make the dependency explicit. - Nit:
src/olmo_eval/evals/tasks/mmlu_pro.py:295:split="test"on theDataSourceis overwritten byget_data_source(split=config.split), so it is inert (same inmmlu.py). - Nit:
src/olmo_eval/evals/tasks/mmlu_pro.py:1andsrc/olmo_eval/evals/suites/mmlu_pro.py:10,17,24: the exact count ("14 categories") in the docstring and suite descriptions will go stale;MMLU_PRO_CATEGORIESand the test already pin it.
Before merge
Nothing blocks. Please decide items 3 and 4 (both change the hash if done after results are stored), address item 2, and link follow-up issues for items 1 and 5 (or fix 1 inline). After that, merge once CI is green.
|
Thanks for the review. Addressed in 038c574:
Full suite: 2,319 passed, 8 skipped. The revision, 🤖 Generated with Claude Code |
Registers mmlu_pro_{category} for the 14 MMLU-Pro categories, mirroring
oe-eval's mmlu_pro_{cat}:mc::none (5-shot letter log-probability, acc_raw),
plus :rc (5-shot cloze, acc_per_char, with :rc:bpb) matching :rc::none and
:cot matching :0shot_cot::tulu3 (single user message, greedy, 2048 tokens,
MMLU-Pro answer cascade). Few-shot exemplars come from the dataset's
validation split, filtered per category, in dataset order. Suites mmlu_pro,
mmlu_pro:bpb, and mmlu_pro:cot average over the 14 category tasks.
Prompts, continuations, and gold labels verified byte-identical to oe-eval's
own request builder on all 12,032 test questions for all three recipes
(36,096 comparisons); extractor answers and format scores identical on 40
synthetic responses.
oe-eval's suites use instance-weighted micro averages, which the suite
registry does not support, so the 14-way roll-up is an unweighted average.
Per-category scores are directly comparable.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…core - Pin TIGER-Lab/MMLU-Pro to revision b189ec765aa7ed75c8acfea42df31fdae71f97be so the task hash is stable against upstream dataset edits. - Set strip_thinking on the CoT task, matching mmlu_cot and gpqa CoT, so prediction text and original_text have the same shape across CoT tasks. - Drop gold_idx from CoT instance metadata so the predictions label is the gold letter that scoring compares against, not an index. - Export answer_format_correct from output metadata in build_predictions so the scorer's format score reaches the predictions file (also fixes GPQA CoT). - Suite descriptions state the unweighted roll-up and the reference harness's micro average; the weighted strategy is tracked in #384. - Remove redundant globals() assignments (register() binds the class into the module) and the inert split argument on the data source. Co-Authored-By: Claude Fable 5.1 <[email protected]>
038c574 to
68186f1
Compare
|
While I think we probably don't want to give up the ability to run a single MMLU-Pro category at a time, one possible additional solution to the weighting problem would be to run the eval as a single task and use |
Description
Ports MMLU-Pro (
TIGER-Lab/MMLU-Pro, 12,032 test questions, up to 10 options, 14 categories) from oe-eval. Three recipes are registered per category, following the naming used by the existingmmluandgpqaports:mmlu_pro_{cat}:mc::nonemmlu_pro_{cat}(aliases:mc,:olmo3base)mmlu_pro_{cat}:rc::nonemmlu_pro_{cat}:rc(alias:olmo3base, variant:bpb)mmlu_pro_{cat}:0shot_cot::tulu3mmlu_pro_{cat}:cotSuites:
mmlu_pro,mmlu_pro:bpb,mmlu_pro:cot, each averaging over the 14 category tasks.The dataset is a single HF config with a
categorycolumn, so each task loads the split and filters inprocess_doc. Few-shot exemplars are the dataset'svalidationrows for the category, in dataset order, as in oe-eval. The dataset category"computer science"maps to the task slugcomputer_science.Files:
src/olmo_eval/evals/tasks/mmlu_pro.py: MC, RC, and CoT task classes, the CoT extractor and scorer, and the registration loop.src/olmo_eval/evals/suites/mmlu_pro.py: the three suites.tests/evals/tasks/test_mmlu_pro.py: registration, prompt shapes, category filtering, few-shot slicing, extraction cascade, suite sizes.Parity with oe-eval
format_requestoutput here.mmlu_{subject}:cotandgpqa:cotports rather than oe-eval's MMLU-Pro config, per review: sampling is temperature 0.6 / top_p 0.95 with nomax_tokenscap (oe-eval uses greedy decoding with 2048 tokens, which degrades reasoning models), and the answer is extracted with the sharedOLMO_3_ANSWER_REGEX_TEMPLATEScascade using an A–J answer regex, so it accepts the same phrasings MMLU CoT does. The exact "Therefore, the answer is (X)" phrasing still scores 1.0 first.extract_think_answeris applied first, as inmmlu_cot.py.Beaker runs against OLMo 2
Full
mmlu_prosuite (5-shot MC), all 12,032 questions, 1×H100 each (groupchrisg-mmlu-pro-olmo2, workspaceai2/olmo-eval-debug):The 13B model leads the 7B model in 13 of 14 categories.
mmlu_pro:coton OLMo-2-1124-7B-Instruct with 50 questions per category, 1×H100 (same group):Known divergences
mmlu_prosuites report instance-weighted micro averages (categories range from 381 to 1,351 questions). The suite registry only supports unweighted per-task averages, so the suite roll-up differs while per-category scores match. A weighted aggregation strategy is left for a separate PR.mmlu_{subject}:rcport.:cotsampling parameters and answer cascade match the MMLU and GPQA CoT ports instead of oe-eval's MMLU-Pro config (see Parity above), so CoT scores are not directly comparable to oe-eval'smmlu_pro:0shot_cot::tulu3.:cot::none,:cot::llama3.1) are not ported.build_predictionsnow exports theanswer_format_correctvalue the scorer records in output metadata (this also covers GPQA CoT), and CoT instances no longer carrygold_idx, so the predictionlabelis the gold letter.Type of Change
Testing
pytest tests/ --ignore=tests/integration/): 2,380 passed, 23 skippedtests/evals/tasks/test_mmlu_pro.py, plus ananswer_format_correctexport test intests/runners/io/test_builders.pyAlso:
ruff check,ruff format --check, andty checkclean (one pre-existing ty diagnostic in an unrelated sandbox file);olmo-eval suite inspectandtask inspecton real data; the oe-eval parity scripts and Beaker runs described above.Checklist
🤖 Generated with Claude Code