Skip to content

Consolidate benchmarks/prompts/ onto NeMo Skills' directory layout and naming - #1316

Merged
gwarmstrong merged 5 commits into
NVIDIA-NeMo:mainfrom
gwarmstrong:georgea/gym-consolidate-benchmark-prompts
May 18, 2026
Merged

gwarmstrong merged 5 commits into
NVIDIA-NeMo:mainfrom
gwarmstrong:georgea/gym-consolidate-benchmark-prompts

Conversation

@gwarmstrong

@gwarmstrong gwarmstrong commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Consolidate benchmarks/prompts/ onto NeMo Skills' directory layout and naming

Why

Gym's shared benchmark prompts under benchmarks/prompts/ were flat-listed with snake_case names that didn't mirror NeMo Skills' canonical layout (nemo_skills/prompt/config/<category>/<file>.yaml). Several benchmark configs also carried a per-benchmark prompts/default.yaml that was a comment-only fork of a shared yaml, leading to drift surface for prompts that should be a single source of truth.

This PR:

  1. Renames the six shared prompt yamls to Skills-style nested paths + hyphenated filenames (generic/math.yaml, eval/aai/mcq-10choices.yaml, judge/math.yaml, etc.).
  2. Aligns the judge/math.yaml content with Skills' nemo_skills/prompt/config/judge/math.yaml char-for-char (two pre-existing single-token drifts — \sqrt vs \\sqrt, "does not" vs "doesn't").
  3. Collapses 18 per-benchmark prompts/default.yaml files onto shared yamls — 8 that were already byte-identical (modulo comments) to a shared yaml, and 10 that had drift from Skills' canonical prompts (AIME 24/25/26, MMLU, MMLU-Redux, MMLU-Pro, GPQA, LiveCodeBench v5+v6, BigCodeBench, HumanEval) and are now Skills-aligned.

Renames (Skills-style layout)

Old path New path Skills source
benchmarks/prompts/generic_default.yaml benchmarks/prompts/generic/default.yaml generic/default.yaml
benchmarks/prompts/generic_math.yaml benchmarks/prompts/generic/math.yaml generic/math.yaml (less {examples} few-shot)
benchmarks/prompts/mcq_10choices.yaml benchmarks/prompts/eval/aai/mcq-10choices.yaml eval/aai/mcq-10choices.yaml
benchmarks/prompts/math_answer_judge.yaml benchmarks/prompts/judge/math.yaml judge/math.yaml
benchmarks/prompts/math_proof_judge.yaml benchmarks/prompts/judge/math-proof-judge.yaml judge/math-proof-judge.yaml
benchmarks/prompts/lean4_formal_proof_deepseek_prover_v2.yaml benchmarks/prompts/lean4/formal-proof-deepseek-prover-v2.yaml lean4/formal-proof-deepseek-prover-v2.yaml

Skills content alignment

benchmarks/prompts/judge/math.yaml had two single-token drifts from the Skills source. Both fixed:

  • Example 4 predicted-answer LaTeX: \sqrt → \\sqrt (Skills escapes the backslash for .format() semantics).
  • Example 5 reasoning: "The order does not matter…" → "The order doesn't matter…" (Skills' contraction).

After this PR, diff of Gym/benchmarks/prompts/judge/math.yaml vs nemo_skills/prompt/config/judge/math.yaml (whitespace-normalized, comments stripped) is char-for-char identical. The other 5 shared yamls were already in alignment.

Explicitly NOT in this PR

  • Per-benchmark prompts with no Skills counterpart to align to. LongBench v2 (XML <text> wrapping — Skills' eval/longbench/ is empty in the current tree) and Gym-only benchmarks (calendar, xlam_fc, mini_swe_agent, asr_leaderboard, etc.) have no Skills equivalent and are left untouched.
  • The remaining Skills shared yamls. eval/aai/mcq-10choices-boxed.yaml and a few other Skills variants haven't been needed by any Gym benchmark yet, so they're not added here.

…k copies

Reorganize the shared prompt yamls under benchmarks/prompts/ to mirror
NeMo Skills' nemo_skills/prompt/config/<category>/<file>.yaml layout,
align one judge prompt char-for-char with Skills, and collapse 8
per-benchmark prompts that were comment-only forks of a shared yaml
onto the shared yaml directly.

Three logical parts in this commit:

1. Rename shared prompts to Skills-style nested paths + hyphenated names
   (preserved via `git mv` so rename history is intact):

   benchmarks/prompts/generic_default.yaml
     -> benchmarks/prompts/generic/default.yaml
   benchmarks/prompts/generic_math.yaml
     -> benchmarks/prompts/generic/math.yaml
   benchmarks/prompts/mcq_10choices.yaml
     -> benchmarks/prompts/eval/aai/mcq-10choices.yaml
   benchmarks/prompts/math_answer_judge.yaml
     -> benchmarks/prompts/judge/math.yaml
   benchmarks/prompts/math_proof_judge.yaml
     -> benchmarks/prompts/judge/math-proof-judge.yaml
   benchmarks/prompts/lean4_formal_proof_deepseek_prover_v2.yaml
     -> benchmarks/prompts/lean4/formal-proof-deepseek-prover-v2.yaml

   All 53 `prompt_config:` / README references across benchmark configs
   updated to the new paths.

2. Align benchmarks/prompts/judge/math.yaml char-for-char with Skills'
   nemo_skills/prompt/config/judge/math.yaml (two single-token drifts:
   `\sqrt` -> `\\sqrt` for `.format()` semantics, "does not" -> "doesn't"
   contraction).

3. Drop 8 per-benchmark prompts/default.yaml files that were
   byte-identical (modulo comments) to a shared yaml, repointing each
   benchmark's config.yaml at the shared file:

     apex_shortlist          -> benchmarks/prompts/generic/math.yaml
     frontierscience_olympiad -> benchmarks/prompts/generic/default.yaml
     hmmt_feb25              -> benchmarks/prompts/generic/math.yaml
     imo_answerbench         -> benchmarks/prompts/generic/math.yaml
     mmlu_prox               -> benchmarks/prompts/generic/default.yaml
     polymath                -> benchmarks/prompts/generic/default.yaml
     proof_bench_judge       -> benchmarks/prompts/judge/math-proof-judge.yaml
     simpleqa                -> benchmarks/prompts/generic/default.yaml

No nemo_gym/prompt.py changes — the existing loader accepts any path.
Model-facing prompt content is unchanged for every benchmark except the
two-token Skills alignment in (2). Per-benchmark prompts that genuinely
differ from the shared/Skills text (AIME family, MMLU-Pro, GPQA,
LiveCodeBench, LongBench, etc.) are intentionally left alone; that
behavioral alignment belongs in a separate PR with rollout validation.

Test plan:
- pytest tests/unit_tests/ -> 210 passed (incl. all 23 test_prompt.py).
- Smoke-load each renamed yaml via load_prompt_config(...).
- grep for old snake_case shared filenames -> zero leftover refs.
- diff Gym/benchmarks/prompts/judge/math.yaml vs Skills judge/math.yaml
  -> identical after whitespace/comment normalization.

Signed-off-by: gwarmstrong <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented May 13, 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.

…Eval, GPQA) to Skills

Follow-up to the layout/naming consolidation in the previous commit. Repoints
the 10 benchmarks whose per-benchmark `prompts/default.yaml` had genuine
content drift from Skills' canonical prompt onto Skills-mirroring shared
yamls. Customer code consuming Gym benchmarks today still uses Skills'
versions, so this realigns Gym before any of these benchmarks gain
downstream consumers.

Adds 6 new shared yamls under `benchmarks/prompts/` (Skills-mirrors, sans
few-shot scaffolding):

  generic/codegen.yaml                   <- generic/codegen.yaml
  generic/general-boxed.yaml             <- generic/general-boxed.yaml
  eval/aai/mcq-4choices.yaml             <- eval/aai/mcq-4choices.yaml
  eval/aai/mcq-4choices-boxed.yaml       <- eval/aai/mcq-4choices-boxed.yaml
  eval/bigcodebench/codegen.yaml         <- eval/bigcodebench/codegen.yaml
  eval/livecodebench/default_reasoning.yaml  <- eval/livecodebench/default_reasoning.yaml

Repoints 10 benchmarks at the new (and existing) shared yamls and deletes
the per-benchmark prompts/default.yaml that becomes redundant:

  aime24, aime25, aime26  -> generic/math.yaml
      (drops Gym's `system:` prompt; switches to Skills' user-only
       "Solve the following math problem..." which is what Skills uses
       for all aimeXX datasets via ++prompt_config=generic/math)
  mmlu                    -> eval/aai/mcq-4choices-boxed.yaml
  mmlu-redux              -> generic/general-boxed.yaml
  mmlu_pro                -> eval/aai/mcq-10choices.yaml
      (prepare.py now also writes a `problem` field on each row so the
       canonical Skills `{problem}` placeholder works)
  gpqa                    -> eval/aai/mcq-4choices.yaml
      (prepare.py same change as mmlu_pro)
  livecodebench (v5, v6)  -> eval/livecodebench/default_reasoning.yaml
      (intro moves from user to system; user collapses to
       `{question_content}{starter_code}\n\n{formatting_message}`)
  bigcodebench            -> eval/bigcodebench/codegen.yaml
  human_eval              -> generic/codegen.yaml

mmlu_pro and gpqa prepare.py: keep emitting `question` + `options_text`
for backward compat with anything that already reads those fields, but
also bake a single `problem` = `question + "\n" + options_text` so the
shared yaml can use Skills' canonical placeholder name.

livecodebench keeps `benchmarks/livecodebench/prompts/cascade.yaml`
in-tree because cascade is a Gym-only variant with no Skills counterpart.

Test plan:
- pytest tests/unit_tests/ -> 210 passed (no regressions vs main).
- Smoke-render every repointed prompt with a representative row and
  confirm the user (and system, where applicable) message matches what
  Skills would produce.
- grep for old `benchmarks/<name>/prompts/default.yaml` refs ->
  zero leftover references across yaml/py/md.

Signed-off-by: gwarmstrong <[email protected]>
@gwarmstrong
gwarmstrong merged commit 1fe2511 into NVIDIA-NeMo:main May 18, 2026
5 checks passed
gwarmstrong added a commit to gwarmstrong/Gym that referenced this pull request Jun 1, 2026
….yaml

Mirrors PR NVIDIA-NeMo#1316's consolidation of benchmark prompts onto Skills-style
nested paths: nemo_skills/prompt/config/compute-eval/baseline.yaml in
Skills becomes benchmarks/prompts/compute-eval/baseline.yaml in Gym.
Removes the per-benchmark prompts/ directory so the prompt lives at a
single canonical location.

config.yaml's prompt_config and the benchmark README's
ng_collect_rollouts +prompt_config= override both updated to the new
path. Content is byte-identical with the Skills source.

Signed-off-by: gwarmstrong <[email protected]>
gwarmstrong added a commit to gwarmstrong/Gym that referenced this pull request Jun 1, 2026
….yaml

Mirrors PR NVIDIA-NeMo#1316's consolidation of benchmark prompts onto Skills-style
nested paths: nemo_skills/prompt/config/compute-eval/baseline.yaml in
Skills becomes benchmarks/prompts/compute-eval/baseline.yaml in Gym.
Removes the per-benchmark prompts/ directory so the prompt lives at a
single canonical location.

config.yaml's prompt_config and the benchmark README's
ng_collect_rollouts +prompt_config= override both updated to the new
path. Content is byte-identical with the Skills source.

Signed-off-by: gwarmstrong <[email protected]>
marta-sd pushed a commit that referenced this pull request Jul 24, 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 #1316](#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 #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.

Signed-off-by: Grzegorz Chlebus <[email protected]>
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.

2 participants