Repository navigation
align MMLU-Pro prompt formatting with NeMo Skills - #1853
Merged
Merged
Conversation
Signed-off-by: Grzegorz Chlebus <[email protected]>
gchlebus
marked this pull request as ready for review
July 1, 2026 08:01
gwarmstrong
approved these changes
Jul 1, 2026
fsiino-nvidia
approved these changes
Jul 1, 2026
marta-sd
enabled auto-merge (squash)
July 23, 2026 15:48
OlegSudakov
pushed a commit
to OlegSudakov/Gym
that referenced
this pull request
Aug 7, 2026
## Summary - Align MMLU-Pro's prepared `problem` field with NeMo Skills' canonical MCQ formatter: trim edge newlines, separate the question and choices with a blank line, and render choices as `A) ...`. - Preserve Gym's structured `options` field for MCQA verification and add an offline unit regression for the exact model-facing bytes. ## Why [Gym PR NVIDIA-NeMo#1316](NVIDIA-NeMo#1316) aligned the shared MMLU-Pro prompt YAML with NeMo Skills, but the row preparer still emitted `A: ...` after a single newline. NeMo Skills' [`get_mcq_fields`](https://github.com/NVIDIA-NeMo/Skills/blob/e5d40c58eba08fd1d25d9a740c0749b03372b006/nemo_skills/dataset/utils.py#L295-L303) uses `A) ...`, strips leading/trailing newline characters from the question, and inserts a blank line before choices. The mismatch changes every model input even though both backends select the same shared prompt. This patch finishes the parity intent of NVIDIA-NeMo#1316 without changing grading or the MCQA verifier contract. Related to NVIDIA-NeMo#1451 and NVIDIA-NeMo#1542. ## Compatibility - This intentionally changes all 12,032 MMLU-Pro model inputs, so scores produced before and after this patch are not the same prompt baseline. - Refresh preparation with `gym eval prepare --benchmark mmlu_pro +use_cached_prepared_benchmarks=false`. - Rerun collection without `--resume` and with a new output path, for example `gym eval run --no-serve --benchmark mmlu_pro --model-type vllm_model --output results/mmlu_pro-skills-format.jsonl`. Cache and resume both default to `false`. - Dataset revision pinning and scorer changes are deliberately out of scope. ## Validation - Compared Gym `4703bdc98fe30ab724e2778bb6ce53e2f8401713` with Skills `e5d40c58eba08fd1d25d9a740c0749b03372b006` on Hugging Face revision `b189ec765aa7ed75c8acfea42df31fdae71f97be` (test fingerprint `0072dd0a32d256fc`). - Prepared all 12,032 rows, including 226 questions with edge newlines and 3–10 choices. - Reproduced the canonical ordered `(problem, expected_answer)` SHA-256 `b2cb6eba8e460c0ddbc154bdb29a76c53380aa895f9d06248a5b5f0c6f6dcfff` by hashing each compact UTF-8 JSON tuple plus a newline in source order. - Reproduced the canonical rendered user-message SHA-256 `559c2d3bcd60ec214e8776f88b65f96f34597a0fd55201744ace5031ec576e62` with the same newline-delimited compact-JSON method. - CI-equivalent local run: 699 non-sandbox tests and 102 sandbox tests passed, with 97.24% combined coverage. - Scoped pre-commit hooks passed. Signed-off-by: Grzegorz Chlebus <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
problemfield with NeMo Skills' canonical MCQ formatter: trim edge newlines, separate the question and choices with a blank line, and render choices asA) ....optionsfield for MCQA verification and add an offline unit regression for the exact model-facing bytes.Why
Gym PR #1316 aligned the shared MMLU-Pro prompt YAML with NeMo Skills, but the row preparer still emitted
A: ...after a single newline. NeMo Skills'get_mcq_fieldsusesA) ..., strips leading/trailing newline characters from the question, and inserts a blank line before choices.The mismatch changes every model input even though both backends select the same shared prompt. This patch finishes the parity intent of #1316 without changing grading or the MCQA verifier contract. Related to #1451 and #1542.
Compatibility
gym eval prepare --benchmark mmlu_pro +use_cached_prepared_benchmarks=false.--resumeand with a new output path, for examplegym eval run --no-serve --benchmark mmlu_pro --model-type vllm_model --output results/mmlu_pro-skills-format.jsonl. Cache and resume both default tofalse.Validation
4703bdc98fe30ab724e2778bb6ce53e2f8401713with Skillse5d40c58eba08fd1d25d9a740c0749b03372b006on Hugging Face revisionb189ec765aa7ed75c8acfea42df31fdae71f97be(test fingerprint0072dd0a32d256fc).(problem, expected_answer)SHA-256b2cb6eba8e460c0ddbc154bdb29a76c53380aa895f9d06248a5b5f0c6f6dcfffby hashing each compact UTF-8 JSON tuple plus a newline in source order.559c2d3bcd60ec214e8776f88b65f96f34597a0fd55201744ace5031ec576e62with the same newline-delimited compact-JSON method.