Skip to content

Add GPQA 0-shot CoT tasks (post-training regime) - #309

Merged
abhishekraok merged 6 commits into
mainfrom
task/add-gpqa-cot
Aug 31, 2026
Merged

abhishekraok merged 6 commits into
mainfrom
task/add-gpqa-cot

Conversation

@abhishekraok

Copy link
Copy Markdown
Collaborator

Stacked on #308 (uses the shared answer-extraction cascade; will retarget to main once #308 merges).

Registers gpqa_{diamond,main,extended}:cot matching oe-eval's gpqa:0shot_cot::qwen3-instruct (the OLMO_3 suite entry): inline choices, boxed-letter instruction, temp 0.6 / top-p 0.95 / 131k tokens, OLMO_3 answer-regex templates. The regime's choice shuffle (seed 111 + index, oe-eval's list order) differs from the base gpqa tasks' shuffle, so this is a separate task class with its own doc processing — base gpqa_* numbers are unaffected.

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

  • Prompts and gold letters identical on 16 synthetic docs covering the preprocessing edge cases ([title] markers, bracket stripping, double spaces)
  • Scorer verdicts identical on 64 response/label cases
  • 90 gpqa tests pass; ruff/ty clean

Before undraft: accept the Idavidrein/gpqa HF gate on the eval account, re-run parity on real docs, then GPU parity run.

🤖 Generated with Claude Code

https://claude.ai/code/session_01B9VUctQuzfAtrdpk4wDjEx

@abhishekraok

Copy link
Copy Markdown
Collaborator Author

Verification (complete)

Consolidates the three comments previously posted here. One of them advanced a claim that a later comment retracted; the retracted claim is simply gone rather than restated and corrected.

Prompt/gold parity against oe-eval, real data

Prompts and gold letters are byte-identical to oe-eval's gpqa:0shot_cot::qwen3-instruct construction on all 448 gpqa_main and 198 gpqa_diamond docs (the Idavidrein/gpqa gate is accepted). Shuffle seed, preprocessing and template all match.

Note the shuffle here deliberately differs from base gpqa_diamond: seed 111 + index over oe-eval's list order, which is what the post-training regime uses. Base GPQA doc processing is unaffected — verified identical to main for all three subsets.

Production runs

OLMoE3-KDA MoE via the #312 path, run 01M0R4PSF4QZCJQ4T8NH7DH4A4 (from the cross-architecture SFT session):

task score n median tokens truncated @8192
gpqa_main:cot 0.3058 448 435 0.0%
gpqa_diamond:cot 0.2980 198 — 0.5%

Both clean end-to-end. Cross-harness score cells for :cot are not yet run.

What the CoT regime actually buys

Paired McNemar comparison against the non-CoT MCQ variant over identical items, six model×subset pairs: no model shows a significant CoT uplift on either subset (closest is dense diamond, χ²=3.52 < 3.84). CoT does not score higher in aggregate.

What it does do is reshuffle which items are correct without changing how many. Dense on gpqa_main: 83 items flip wrong→right, 79 flip right→wrong — 36% of items change state for a net +4, and the pattern is near-symmetric for every model×subset. The two regimes are not measuring the same thing item-for-item even when aggregates agree, so a model selected on MCQ is not necessarily the model you would select on CoT. That, plus matching other labs' published numbers, is the argument for these variants — not an uplift.

Scope caveat for the parity work generally

Aggregate equality can hide large per-item disagreement — observed elsewhere in this effort: two models tying at 59/198 while agreeing on only 16 of the 59. The cross-harness parity claimed on #307/#308/#309 is score parity, which is what these merge gates assert. Item-level agreement of generations across harnesses is untested and not expected at T=0.6. (For #307's and #308's scorers, the paired offline checks on those PRs do establish per-instance agreement — a different and stronger claim about the scorer alone.)

@abhishekraok

Copy link
Copy Markdown
Collaborator Author

GPU parity — the gap this PR was missing is now closed. Olmo-3-7B-Instruct, gpqa_main, n=448 both sides:

harness spec exact_match
oe-eval gpqa:0shot_cot::qwen3-instruct 0.42857
olmo-eval gpqa_main:cot 0.41964

diff 0.009, z ≈ 0.27 → agree. (Beaker: olmo-eval 01M0X48ANW8WH0XM1AXBY8XCVV, oe-eval 01M0X48YNCBYV7FZHPMT97EAND, results 01M0X6HRZQPXGY8QD65D42WH3W.) Same run also produced gpqa_diamond:cot = 0.43939.

Paired scorer check on the same 448 generations — oe-eval's stored output scored by this PR's GPQACoTExactMatchScorer, compared per-instance to oe-eval's own verdicts:

per-instance agreement : 448/448 = 100.00%
oe-eval                : 0.42857
this PR's scorer       : 0.42857
paired diff            : 0.00000

That's the strong form: n=448 at T=0.6 gives SE_diff ≈ 0.033, so the aggregate cell alone only bounds gross error, while the paired check shows the two extractors never disagree on a single real generation. Note answer_format_correct averages 0.51 on this run — about half the responses don't use the requested phrasing and are recovered by lower-priority templates in the cascade — so the agreement is exercising the fallback tiers, not just the happy path.

Qwen3-8B pair is still running; will add if it changes anything.

🤖 Generated with Claude Code

@abhishekraok

Copy link
Copy Markdown
Collaborator Author

Second model cell — Qwen/Qwen3-8B, gpqa_main, n=448 (Beaker: olmo-eval 01M0X48JSV8XZWGZE7RT8ENETG results 01M0X4MSK10S17EZKCQMGWKGFD; oe-eval 01M0X4901ZXVV89ACDEGXWZ3QZ results 01M0X97G7JWE00EFSEE6J1ZK1N):

harness exact_match
oe-eval 0.56920
olmo-eval 0.58482

diff 0.0156, z ≈ 0.47 → agree. Paired scorer check on oe-eval's 448 stored generations: 448/448 agreement, aggregates equal to five decimals. Same run also produced gpqa_diamond:cot = 0.61111 (no oe-eval counterpart run for diamond).

Cumulative for this PR: 2 models × aggregate agreement (z = 0.27, 0.47), 896/896 paired scorer agreement, prompts byte-identical on all 646 real docs. Evidence complete.

🤖 Generated with Claude Code

@abhishekraok
abhishekraok force-pushed the task/add-gpqa-cot branch 2 times, most recently from 50ae68d to e105bb9 Compare August 26, 2026 17:51
Base automatically changed from task/add-omega-500 to main August 26, 2026 20:46
abhishekraok and others added 4 commits August 26, 2026 20:55
Registers gpqa_{diamond,main,extended}:cot with inline answer choices,
the boxed-letter instruction, and temp 0.6 / top-p 0.95 / 131k tokens,
matching oe-eval's gpqa:0shot_cot::qwen3-instruct (the OLMO_3 suite
entry). Choice shuffling uses that regime's seed (111 + index) with its
list order, which differs from the base gpqa tasks' shuffle, so a
separate task class carries its own doc processing. Answers are
extracted via the shared regex cascade with the OLMO 3 answer-regex
templates (added to common/answer_extraction.py).

Prompts and scorer verdicts verified identical to oe-eval's own code on
synthetic docs (the dataset gate on Idavidrein/gpqa blocks real-data
checks from this account; re-verify after accepting it).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01B9VUctQuzfAtrdpk4wDjEx
Entries 10 and 11 are identical. That repetition comes from the reference
implementation's list, which this mirrors so extraction stays in step with
it; without a note, the duplicate reads as an oversight to remove.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
Follows the answer-extraction module's move to evals/extract in the base
branch; the templates constant is now exported from the package.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
Comment thread src/olmo_eval/evals/tasks/gpqa.py Outdated
answer_format_regex=_COT_ANSWER_FORMAT_REGEX,
answer_regexes=_COT_ANSWER_REGEXES,
answer_regexes_templates=OLMO_3_ANSWER_REGEX_TEMPLATES,
).answer

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.

Could we preserve format_correct from extract_answer_with_format() instead of discarding it here? The reference GPQA evaluation reports answer-format correctness, and the parity results suggest it is a useful diagnostic—roughly half the responses relied on fallback extraction. At minimum, it would be helpful to store this value in the output metadata, consistent with the OMEGA-500 scorer.

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.

Done — the scorer now records answer_format_correct in output metadata, same as the omega_500 scorer. Scores are unchanged (the extractor already computed the value; it was just being dropped). Test added covering both the requested-format and fallback-extraction cases.

register_variant(_subset, "mc", formatter=MultipleChoiceFormatter(), metrics=_DEFAULT_METRICS)
register_variant(_subset, "bpb", formatter=PPLFormatter(), metrics=(BPBMetricInstanceAvg(),))

# 0-shot CoT (post-training regime): needs its own doc processing, so it is

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.

Small documentation thought: since the task count and supported variants are already changing, should we avoid hard-coding an exact count in the module docstring? Describing the naming scheme and available variants without a total might keep it from becoming stale as more GPQA configurations are added.

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.

Done — the count is gone; the docstring now describes the naming scheme (gpqa_{subset}, gpqa_{subset}_{subject}) and lists the :mc / :bpb / :cot variants without a total.

@donovanr

Copy link
Copy Markdown
Contributor

Didn't spat anything that Tyler didn't – looks pretty good to me.

abhishekraok and others added 2 commits August 31, 2026 18:15
Review follow-ups from #309 (undfined):

- The CoT scorer discarded the format score returned by the extractor.
  Roughly half of responses rely on fallback extraction, so the value
  distinguishes a wrong answer from one stated outside the requested
  format. Now recorded in output metadata, matching the omega_500 scorer.
- Drop the hard-coded task count from the module docstring and describe
  the naming scheme and variants instead, so it does not go stale as more
  GPQA configurations are added.

Scores are unchanged; the extractor already computed this value.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01LMFjgUqHjQA3aCeB4QmEHZ
@abhishekraok
abhishekraok merged commit b974a92 into main Aug 31, 2026
10 checks passed
@abhishekraok
abhishekraok deleted the task/add-gpqa-cot branch August 31, 2026 18:18
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