Skip to content

Add gsm8k and hendrycks_math benchmarks - #1104

Merged
gwarmstrong merged 4 commits into
mainfrom
georgea/migrate-gym-data-only-math-benchmarks
Apr 21, 2026
Merged

gwarmstrong merged 4 commits into
mainfrom
georgea/migrate-gym-data-only-math-benchmarks

Conversation

@gwarmstrong

@gwarmstrong gwarmstrong commented Apr 21, 2026 •

Copy link
Copy Markdown
Contributor

One-sentence summary

Migrates the gsm8k and hendrycks_math math benchmarks from NeMo Skills
into Gym on top of the existing math_with_judge resource server. No new
servers or agents, no metric-infra changes. Scope is deliberately
data-prep-only: each benchmark's prepare.py mirrors the Skills prepare
method and the final files are validated against Skills' output for every row.

Includes

  • benchmarks/gsm8k/ — GSM8K test split
    • Data source: raw.githubusercontent.com/openai/grade-school-math (test
      split, 1319 problems) — identical upstream URL to Skills
  • benchmarks/hendrycks_math/ — Hendrycks MATH test split
    • Data source: raw.githubusercontent.com/QwenLM/Qwen2.5-Math (MATH test
      split, 5000 problems) — identical upstream URL to Skills'
      save_data_from_qwen("math", "test")
    • Test split only (train not ported, per scope)
  • benchmarks/prompts/generic_math.yaml — new shared prompt mirroring
    nemo_skills/prompt/config/generic/math.yaml (zero-shot form), referenced
    by both benchmark configs via prompt_config: to avoid duplicating the
    same two-line template

Validated against NeMo Skills

Scope is data-prep parity only. This PR does not include rollout or
metrics-parity numbers (no SLURM runs were made). Each benchmark's
prepare() output is compared row-by-row against the Skills' prepare.py
output. Every row is identical up to specific key naming, like problem → question
rename:

==================================================================
Data-prep parity · Skills prepare.py vs Gym prepare()
==================================================================
Benchmark           Skills rows    Gym rows    Identical
------------------------------------------------------------------
gsm8k                  1,319         1,319    1,319 / 1,319
hendrycks_math         5,000         5,000    5,000 / 5,000

Ports three math benchmarks from NeMo Skills into Gym, reusing the existing
math_with_judge resource server. Scope is data-prep parity only — Skills'
prepare methods are mirrored exactly (same upstream sources, same transforms)
and validated byte-for-byte against Skills output (256 + 1319 + 5000 rows,
identical modulo the Gym-side problem -> question rename).

- benchmarks/comp_math_24_25/ — AIME24/25 + HMMT24-25 (256 problems). Static
  snapshot shipped as data/test.txt, copied verbatim from the Skills repo.
- benchmarks/gsm8k/ — GSM8K test split (1319 problems). Fetched from the
  same openai/grade-school-math URL as Skills, with the same hardcoded
  answer-fix dict, <<...>> calc-string stripping, and int-cast.
- benchmarks/hendrycks_math/ — Hendrycks MATH test split (5000 problems).
  Fetched from the same Qwen2.5-Math URL as Skills.
- benchmarks/prompts/generic_math.yaml — shared prompt mirroring Skills'
  generic/math.yaml, referenced by all three benchmark configs to avoid
  duplication.

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

copy-pr-bot Bot commented Apr 21, 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.

gwarmstrong and others added 3 commits April 21, 2026 14:27
Unlike gsm8k and hendrycks_math, the Skills comp-math-24-25 test set is
not reconstructable from any public structured dataset: 138 of 256
problems (HMMT Feb'24/F'25 guts+team rounds and all HMMT Nov 2024 rounds)
live only as rendered PDFs on hmmt-archive.s3.amazonaws.com. The Skills
team curated those once and shipped the result as a static JSONL snapshot
in their repo; MathArena / NuminaMath / OpenR1-Math cover at most 46%.
Shipping the Skills snapshot in Gym would be the only path to full
parity, but that's a larger scope decision (data attribution, licensing,
commit size) than the other two migrations — keeping it out of this PR
so gsm8k and hendrycks_math can land cleanly. comp_math_24_25 can come
back in a follow-up PR if/when we decide how to handle the static-data
dependency.

Signed-off-by: gwarmstrong <[email protected]>
@gwarmstrong gwarmstrong changed the title Add comp_math_24_25, gsm8k, and hendrycks_math benchmarks Add gsm8k and hendrycks_math benchmarks Apr 21, 2026
@gwarmstrong
gwarmstrong merged commit 3317e5f into main Apr 21, 2026
6 checks passed
@gwarmstrong
gwarmstrong deleted the georgea/migrate-gym-data-only-math-benchmarks branch April 21, 2026 22:27
stephencge added a commit that referenced this pull request Apr 23, 2026
Extract the Lean4 formal-proof prompt from `benchmarks/minif2f/prompts/default.yaml`
into `benchmarks/prompts/lean4_formal_proof_deepseek_prover_v2.yaml` following
the new shared-prompts convention introduced in #1104 (`gsm8k` / `hendrycks_math`
using `benchmarks/prompts/generic_math.yaml`).

MOBench and PutnamBench use the same prompt byte-for-byte but are on separate
PRs; they'll migrate to this shared file in a follow-up once the pattern is
landed here.

No content changes — file is byte-identical to the deleted
`benchmarks/minif2f/prompts/default.yaml`.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Stephen Ge <[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