Repository navigation
Add opt-in parsing for Harmony final answers - #526
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
abhishekraok
left a comment
There was a problem hiding this comment.
Written by Claude Code session fix-pr-review
Reviewed at 3ed88ac (after update from main). The parser, the stop-string alignment and the tests are solid; the opt-in keeps default hashes. No blockers, three things worth fixing or answering:
- Alternate spellings. README and the compatibility entry say gpt-oss uses
<|im_start|>/<|meta_sep|>/<|im_sep|>. The pinned tokenizer (6cee5e81,tokenizer.jsonviatokenizers) decodes 200005-200008 as<|channel|>/<|start|>/<|end|>/<|message|>, and its added tokens contain none ofim_start,meta_sep,im_sep,fim_suffixorghissue. Where do those spellings come from? If no real gpt-oss tokenizer emits them, drop them from the docs and the regexes; as written, a ChatML model whose completion starts with<|im_start|>also takes the raw-decode path in the vLLM provider. - Not opt-in in the provider.
VLLMProvider.generatestorestext_with_special_tokens(and may setresponse_parser_error) for every Harmony-starting completion, with or withoutresponse_parser=harmony, so every inline-vLLM gpt-oss run roughly doubles the saved text. The compatibility entry says the default output is unchanged; either gate it or say so. - Silent pass-through. With
vllm_serverand no server-side reasoning parser, text arrives token-stripped (analysis...assistantfinal...), passes through unparsed withresponse_parser_found: false, and is scored as CoT plus answer, the original #398 failure. A warning when an opt-in task finishes with zero found would make that visible.
Merge-order note: this conflicts with empty-scoring-text (#523) in README.md and docs/result-compatibility.md (both insert at the same spot); whichever merges second needs a docs-only rebase.
Nice, careful work on keeping this opt-in without moving existing hashes! One thing should be resolved before merge. Blocking
Before mergePlease resolve the spelling question above. The branch also currently conflicts with |
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.
Approving.
The pinned gpt-oss tokenizer has no <|im_start|>, <|meta_sep|> or <|im_sep|> tokens, so drop those spellings from the parser and the vLLM raw re-decode, which also stops ChatML completions from taking the Harmony path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Written by Claude Code session eval-metrics-handoff Thanks, confirmed: at |
# Conflicts: # README.md # docs/result-compatibility.md # src/olmo_eval/inference/providers/vllm.py # tests/providers/test_vllm_provider.py
Codex · codex://threads/01a1326f-ed81-75e3-80e4-661392dbe4b5
Add
-o response_parser=harmonyto score only the final-channel body. Inline vLLM retains reserved delimiters before decoding and maps string stops through the actual decoded prefix. Alignment failures remain unscored when parsing is enabled. Predictions retain decoded/raw text and parser diagnostics. Existing specs, suites, and default hashes stay unchanged; the opt-in changes the task hash.Reference: Harmony format and pinned tokenizer configuration. Addresses Harmony-final-answer (#398). Old token-stripped transcripts cannot be recovered unambiguously; other providers need delimiter-preserving output or native parsing.
Validation (
uv run --frozen --no-group vllm):ruff check src/ tests/ruff format --check src/ tests/ty check src/pytest tests/ --ignore=tests/integration -v(Git 2.53; 5104 passed, 41 skipped)Independent review findings are addressed. CPU regressions exercise local tokenizer → provider → runner → IFEval → saved predictions, custom stops within delimiter spellings and across channels, decoder-only special tokens, parse failures, byte normalization, and pinned hashes. A tokenizer-only probe verified the pinned real tokenizer with Transformers 5.8.1. No GPU evaluation or numerical parity claim.