Skip to content

align MMLU-Pro prompt formatting with NeMo Skills - #1853

Merged
marta-sd merged 3 commits into
mainfrom
gchlebus/mmlu-pro-skills-prompt
Jul 24, 2026
Merged

marta-sd merged 3 commits into
mainfrom
gchlebus/mmlu-pro-skills-prompt

Conversation

@gchlebus

@gchlebus gchlebus commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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 #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 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 #1316 without changing grading or the MCQA verifier contract. Related to #1451 and #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.

@copy-pr-bot

copy-pr-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@gchlebus gchlebus changed the title [codex] align MMLU-Pro prompt formatting with NeMo Skills align MMLU-Pro prompt formatting with NeMo Skills Jul 1, 2026
@gchlebus
gchlebus marked this pull request as ready for review July 1, 2026 08:01
@marta-sd
marta-sd enabled auto-merge (squash) July 23, 2026 15:48
@marta-sd
marta-sd merged commit e203e55 into main Jul 24, 2026
15 checks passed
@marta-sd
marta-sd deleted the gchlebus/mmlu-pro-skills-prompt branch July 24, 2026 06:52
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]>
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.

4 participants