Skip to content

Add MMLU chain-of-thought tasks (post-training regime) - #339

Merged
abhishekraok merged 8 commits into
mainfrom
task/add-mmlu-cot
Sep 3, 2026
Merged

abhishekraok merged 8 commits into
mainfrom
task/add-mmlu-cot

Conversation

@abhishekraok

@abhishekraok abhishekraok commented Aug 31, 2026 •

Copy link
Copy Markdown
Collaborator

Registers mmlu_{subject}:cot for all 57 subjects plus an mmlu:cot suite, mirroring oe-eval's mmlu_{sub}:cot::hamish_zs_reasoning_deepseek (the OLMO_3 suite entry): 0-shot chat, per-subject description requesting concise reasoning then Therefore, the answer is: X, temp 0.6 / top-p 0.95, extraction via the shared OLMO 3 regex-template cascade.

Why a separate module rather than a variant: the base mmlu_{subject} tasks score by continuation log-probability, which measures MCQ ranking rather than reasoning, so the CoT regime needs different doc processing entirely — same split as gpqa:cot.

Verification (CPU, against oe-eval's own code):

  • Prompts and gold letters byte-identical on 3,207 real docs across 7 subjects (abstract_algebra, anatomy, high_school_mathematics, professional_law, world_religions, moral_scenarios, college_physics), re-run against the current head after the extraction module moved to evals/extract/
  • Scorer verdicts identical on 56 synthetic responses run through oe-eval's ExactMatch metric
  • 17 tests (pytest-style); ruff/ty clean

Parity: scored the paper's Olmo-3-7B-Think oe-eval generations (14,042 instances, 57 subjects) through this task: prompts identical to the logged requests, 14,042/14,042 verdicts agree, macro suite score 0.764283 reproduced. Reasoning inside <think> is stripped before extraction, matching oe-eval's model-level r1_style processing (#348).

Replaces #321, which GitHub closed automatically when its base branch (task/add-gpqa-cot, #309) was deleted on merge. Same commits, rebased onto main.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

abhishekraok and others added 2 commits August 31, 2026 18:18
Registers mmlu_{subject}:cot for all 57 subjects plus an mmlu:cot suite,
mirroring oe-eval's mmlu_{sub}:cot::hamish_zs_reasoning_deepseek: 0-shot
chat, per-subject description asking for concise reasoning then
"Therefore, the answer is: X", temp 0.6 / top-p 0.95, and answer
extraction through the shared OLMO 3 regex-template cascade.

The base mmlu_{subject} tasks score by continuation log-probability,
which measures multiple-choice ranking rather than reasoning, so the CoT
regime needs its own doc processing and lives in a separate module.

Prompts and gold letters verified byte-identical to oe-eval's own code on
3,207 real docs across 7 subjects (abstract_algebra, anatomy,
high_school_mathematics, professional_law, world_religions,
moral_scenarios, college_physics); scorer verdicts identical on 56
synthetic responses run through oe-eval's ExactMatch metric.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B9VUctQuzfAtrdpk4wDjEx
Follows the answer-extraction module's move to evals/extract in the base
branch.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-31T18:33:22.369584Z 4e5a712 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment thread tests/evals/tasks/test_mmlu_cot.py Resolved
Comment thread src/olmo_eval/evals/tasks/mmlu_cot.py Resolved

_ANSWER_REGEXES = (r"\(?([A-D])\)?",)

_COT_SAMPLING = SamplingParams(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe in oe-eval all post-training evals were actually run with an override of 32768 max_tokens – Saumya would know for sure (not blocking, we can always run with an override)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code · https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

You're right about the number: the Olmo 3 release scripts pass --oe_eval_max_length 32768 (open-instruct scripts/train/olmo3/7b_instruct_rl.sh, olmo-hybrid/7b_release_evals.sh), and oe-eval.sh feeds that one value to both the model max_length and max_gen_toks with truncate_context: false — so the effective budget was "until the context is full". max_tokens=None is olmo-eval's expression of exactly that (vLLM natively; OlmoCoreProvider._resolve_max_tokens), so serving with max_model_len=32768 reproduces the published budget with no per-task override. Same convention as gpqa:cot, popqa, omega_500.

)


def _mcq_query(question: str, choices: list[str]) -> str:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think MCQAChatFormatter from the formatters has the same functionality if we want to stay centralized

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code · https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

Close but not byte-identical: MCQAChatFormatter renders (A) text blocks separated by blank lines, while oe-eval's hamish_zs_reasoning MMLU CoT (make_mcq_prompt) renders Question: …\n A. text\n B. text\n under the per-subject description — which is what this task reproduces; prompts were verified byte-identical to oe-eval on 3,207 docs across 7 subjects. Switching would break that, so kept the task-local builder. A centralized option for oe-eval's letter style would be a reasonable follow-up.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! We probably should discuss unified task formatting as a follow up at some point

Comment thread src/olmo_eval/evals/tasks/mmlu_cot.py Resolved
Comment thread src/olmo_eval/evals/tasks/mmlu_cot.py Resolved
@mgmorgan23

Copy link
Copy Markdown
Contributor

I left a few comments but this overall looks good to me! I think running a couple of full parity tests is definitely worth it – we could make it cheaper by running some of the baselines (both for reasoning and non-reasoning models) from the Olmo3 paper and just comparing against those numbers – I can help find exact beaker jobs and their metrics if useful!

abhishekraok and others added 2 commits September 2, 2026 21:54
Set the task's answer_extractor to the shared cascade and score with
MultipleChoiceScorer, replacing the task-specific scorer and
extract_answer override (review: mgmorgan23). Convert the tests to plain
pytest functions to match the rest of the suite (review: gregorybchris).
Cross-reference extract/mcq.py and extract/answer_format.py so it is
clear which extractor is oe-eval-compatible.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
@abhishekraok

Copy link
Copy Markdown
Collaborator Author

I left a few comments but this overall looks good to me! I think running a couple of full parity tests is definitely worth it – we could make it cheaper by running some of the baselines (both for reasoning and non-reasoning models) from the Olmo3 paper and just comparing against those numbers – I can help find exact beaker jobs and their metrics if useful!

Thanks for the review. I found the paper's oe-eval mmlu:cot runs in ai2/tulu-3-results (…-PAPER-run{1,2,3}-on-mmlu-cot-hamish_zs_reasoning_deepseek): Olmo-3-7B-Think (fixed-systemprompt runs), Olmo-3-32B-Instruct, and Olmo-3.1-32B-Think, 3 seeds each. For Olmo-3-7B-Instruct I only see the SFT and DPO stage runs — was the final RL model's mmlu:cot run under a different name, or should I use the DPO ones? If the Think and 32B jobs look right to you, I'll run the paired check against those.

oe-eval's reasoning-model runs apply a model-level r1_style processor
that removes everything through </think> before scoring; without the
same step, letters mentioned while thinking reach the fallback regexes.
Verified against the paper's Olmo-3-7B-Think mmlu:cot generations:
14,042/14,042 verdicts agree with stripping, 13,910 without.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
@abhishekraok

Copy link
Copy Markdown
Collaborator Author

Claude Code · https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ

Paired parity against the paper's oe-eval run — Olmo-3-7B-Think, mmlu:cot::hamish_zs_reasoning_deepseek, PAPER run1 (Beaker results 01KAD4QTVWCR9RZSS48YZ52040), all 57 subjects, 14,042 instances:

check result
prompts vs. oe-eval's logged requests 0 mismatches
gold letters 0 mismatches
scorer verdicts on oe-eval's stored generations 14,042 / 14,042
suite score (macro over subjects) 0.764283 both

One real gap surfaced: the paper runs use oe-eval's model-level process_output: r1_style, which strips everything through </think> before scoring. Scoring the raw outputs instead agreed on only 13,910/14,042 (132 flips). 3f777aa applies the identical extract_think_answer inside this task's extractor (no-op without </think>), restoring 14,042/14,042 from raw outputs. The sibling ports (gpqa:cot, popqa, omega_500) have the same gap — filed #348.

Also: the PAPER runs' model config has max_length: 32768 with max_gen_toks: 131072, i.e. generation bounded by context — what max_tokens=None does here.

@mgmorgan23

Copy link
Copy Markdown
Contributor

Those parity checks look right to me! LGTM to merge

@abhishekraok
abhishekraok merged commit 6812e66 into main Sep 3, 2026
10 checks passed
@abhishekraok
abhishekraok deleted the task/add-mmlu-cot branch September 3, 2026 21:19
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.

3 participants