Skip to content

Fix(Strip): think traces before GPQA CoT, PopQA, and OMEGA extraction. - #362

Closed
salignatmoandal wants to merge 1 commit into
allenai:mainfrom
salignatmoandal:fix/strip-think-traces-reasoning-extractors
Closed

salignatmoandal wants to merge 1 commit into
allenai:mainfrom
salignatmoandal:fix/strip-think-traces-reasoning-extractors

Conversation

@salignatmoandal

Copy link
Copy Markdown

Reasoning models emit blocks that the remaining post-training extractors scored as if they were the final answer. Apply the same extract_think_answer pre-step already used by mmlu:cot so Think-model numbers stay comparable to oe-eval.

Description

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)

Testing

  • Unit tests pass locally (pytest tests/ --ignore=tests/integration/)
  • Integration tests pass (if applicable)
  • New tests added for new functionality

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added/updated documentation as needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Reasoning models emit <think> blocks that the remaining post-training extractors scored as if they were the final answer. Apply the same extract_think_answer pre-step already used by mmlu:cot so Think-model numbers stay comparable to oe-eval.
@salignatmoandal salignatmoandal changed the title Strip think traces before GPQA CoT, PopQA, and OMEGA extraction. Fix(Strip): think traces before GPQA CoT, PopQA, and OMEGA extraction. Sep 9, 2026
@abhishekraok

Copy link
Copy Markdown
Collaborator

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

Credit where it's due: the lstrip() in your PopQA scorer change catches a real and easy-to-miss trap, and you found it independently.

Since #363, strip_thinking keeps the text after </think> byte-for-byte — trimming it changes IFEval verdicts, because the loose variants drop the response's first line. PopQA's first_line scorer then read that leading blank line as the answer. Measured on the paper's Olmo-3-7B-Think PopQA run (Beaker results 01KAD4QW21HW1MY4VFV0Y5ZJD4): 14,134 of 14,267 outputs begin with a newline after </think>, and the primary metric read 0.0006 instead of 0.1589. Nobody had noticed on the olmo-eval side until this week.

For maintainers deciding between this and enable-thinking-removal (#375): #375 turns on the shared strip_thinking option, which also covers scorers that read output.text without an extractor (IFEval constraints, LLM judges) and records the pre-strip text for auditing; this PR fixes the three extractors directly, which keeps working if the flag is off. They edit the same PopQA scorer lines, so whichever lands second will conflict. Either way, the PopQA catch here should survive.

@gregorybchris

Copy link
Copy Markdown
Collaborator

Hi @salignatmoandal, as mentioned in the comment from @abhishekraok above, it looks like the other fix PR beat yours into main. Thanks so much for your contribution, nonetheless!

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