feat(gsm1k): add GSM1k dataset + 5-shot base and 0-shot chat tasks - #76
Open
ethan-scitix wants to merge 1 commit into
Open
feat(gsm1k): add GSM1k dataset + 5-shot base and 0-shot chat tasks#76ethan-scitix wants to merge 1 commit into
ethan-scitix wants to merge 1 commit into
Conversation
GSM1k is Scale AI's from-scratch re-do of GSM8K (1205 human-written
problems), built so that a model's GSM8K - GSM1k gap estimates how much
of its GSM8K score is memorization. It is a paired instrument, so this
lands both halves of the pair rather than one protocol.
- `gsm1k` dataset: `hf:ScaleAI/gsm1k@bc09569d`, test split only, 1205
rows. The snapshot ships an empty card while the paper says the data is
withheld, so provenance is verified against the 50-example sample in
Scale's eval repo: all 50 questions appear verbatim with identical
answers, and the row count matches the paper's stated 1205. `license`
is MIT per the paper's datasheet ("will be released with the MIT
license"), not the eval repo's code license.
- `gsm1k_kshot_base_gen`: port of Scale's own lm-eval-harness fork task
(`gsm1k_scale.yaml`, pinned) — `Question:/Answer:` prompt, upstream's
single `flexible-extract` filter, `exact_match` with its four
`regexes_to_ignore`, and its stop list. Reports both extraction rules
under rule-named keys and deliberately no bare `exact_match`, so a
paired diff cannot silently compare the flexible rule here against the
strict one in `gsm8k_kshot_base_gen`.
- `gsm1k_0shot_gen`: the chat half, reusing `gsm8k_0shot_gen`'s
DeepSeek-Math protocol verbatim so the two form a prompt-exact pair.
A different measurement regime from upstream's, not a port of it — no
published GSM1k number corresponds to a 0-shot chat score.
GSM1k ships final answers only (no worked solutions) and has no train
split, so it cannot supply chain-of-thought exemplars. The few-shot task
therefore vendors 5 `openai/gsm8k` train rows, where upstream's exemplars
also come from, verified byte-identical to `shuffle(seed=1234)[:5]` — the
same 5 `gsm8k_kshot_base_gen` draws at `n_shot=5, fewshot_seed=1234`.
Unlike upstream they are fixed rather than resampled per question, which
keeps exemplar variance out of the paired diff; both this and the
`report()` denominator difference vs the sibling are documented in the
module docstring.
Both tasks are `status="experimental"`: faithful by construction, but no
run has been checked against the published column yet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ethan-scitix
marked this pull request as ready for review
August 7, 2026 08:45
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.
Type
Summary
gsm1kdataset —hf:ScaleAI/gsm1k@bc09569d,testsplit only, 1205 rows.gsm1k_kshot_base_gen— port of Scale's own lm-eval-harness fork task (gsm1k_scale.yaml, pinned39294c6f):Question:/Answer:prompt, upstream's singleflexible-extractfilter,exact_matchwith its fourregexes_to_ignore, its stop list,n_shot=5.gsm1k_0shot_gen— the chat half, reusinggsm8k_0shot_gen's DeepSeek-Math protocol verbatim so the two form a prompt-exact pair. This is a different measurement regime from upstream's, not a port of it: no published GSM1k number corresponds to a 0-shot chat score, so read the diff, not the absolute.status="experimental"— faithful by construction, no alignment run yet (see Test Plan).Three decisions worth reviewing
license="MIT", on a snapshot with an empty card. The paper says the data is withheld, which does not match a public HF snapshot existing, so the release was reconstructed rather than assumed: the paper precommits to release on the earlier of "three open-source models of different lineages reach 95%" or June 2025, its datasheet states "The dataset (yet unreleased) will be released with the MIT license", and the snapshot was uploaded to the ScaleAI org 2025-03-31/04-01. MIT is therefore the datasheet's commitment for the data, not the eval repo's code license.gsm1k_public_50.csv(published while the full set was still withheld) appear verbatim in the snapshot'stestsplit with identical answers — 50/50 found, 0 answer mismatches — and the row count matches the paper's stated 1205 exactly.exact_matchkey.gsm8k_kshot_base_genspells its strict (#### N) metricexact_match, while upstream GSM1k's only metric is the flexible one. Sharing the name would let a paired diff compare two different extraction rules and read the extraction gap as a memorization gap. Both rules are reported under rule-named keys instead:flexible_exact_match(upstream's filter, and the headlinescore/correct) andstrict_exact_match.Documented deviations from upstream
openai/gsm8ktrain rows, verified byte-identical toshuffle(seed=1234)[:5]— the same 5gsm8k_kshot_base_gendraws atn_shot=5, fewshot_seed=1234, so the pair can be run prompt-controlled. Holding the prefix fixed also keeps exemplar variance out of the diff, which is what upstream's single shared prompt is reaching for. It does move absolute scores relative to the published column.report()divides bylen(finals) + len(fails)(this repo's convention, 19 of 22 tasks).gsm8k_kshot_base_gendivides bylen(finals), so a paired diff must be read with bothfailscounts in view; identical whenfails == 0.max_tokens=1000is upstream's one deliberate change to lm-eval defaults (raised from 256 so CoT is not truncated). It is a model-layer asset here, recorded inreference_impl.notes.Both deviations live in the shipped module docstring and
reference_impl.notes, not only in this PR.Test Plan
Automated
ruff check+ruff format)ty checkpasses on all three modules.mypy --strictreports 14 unannotated-stage-method / untyped-community-call errors, the same classes the GSM8K siblings produce (28 on the same axis), i.e. the existing house baseline rather than new debt.scripts/check_preflight.py— all checks PASS (registry, naming, shot knobs, record-key access, meta-index sync, imports, examples).--level deeplink check: 52/53 reachable, the one WARN is a pre-existing Wikipedia 403.scripts/check_layer_imports.pyandscripts/sanitize.shclean.Manual
sieval dataset download gsm1ksucceeds (6 files from the pinned revision).testis the only split;_normalize_exact_matchalters 0 golds (upstream's four regexes are no-ops on GSM1k's bare integers); the flexible rule recovers 1205/1205 golds from a plain restatement.Question:blocks, 5#### Nexemplar answers, ends\nAnswer:, reference133matches the row's gold.status="experimental"rather thanstable. Alignment targets to run against, from the paper's Table 1 (GSM8k → GSM1k, 5-shot, temperature 0, no chat template): Meta-Llama-3-8B-Instruct 0.752 → 0.690 (diff 0.062), Meta-Llama-3-70B-Instruct 0.914 → 0.900 (0.014), Mistral-7B-Instruct-v0.2 0.428 → 0.419 (0.009), phi-2 0.566 → 0.504 (0.063). The diff is the quantity to align on; the fixed-exemplar deviation moves the absolute columns.Checklist
Required (all PRs)
sanitize.shclean)AI-Generated Code - <model> (<provider>)in module docstringcore/If: New or Modified Benchmark
experimentaluntil thensieval dataset download gsm1ksucceeds)__init__.py(stubs +meta/index.jsonregenerated)If: New Dependency
gsm1k_0shot_genreuses the existingmathextra (README's extras line updated to name GSM1k);gsm1k_kshot_base_genneeds none.🤖 Generated with Claude Code