Dataset Viewer
The dataset viewer is not available for this subset.
Datasets with Arrow IPC files are temporarily unavailable in the dataset viewer.

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

YAML Metadata Warning:The task_categories "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, image-text-to-image, image-text-to-video, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other

gsm-gpt2-preprocessed

GPT-2-tokenized TinyGSM (train) and GSM8K (eval), prepared for conditional latent diffusion / flow-map training: a natural-language question conditions the generation of a Python program whose return value is the answer.

Splits

dir source rows size
gsm-gpt2-train TinyGSM 11,840,403 20 GB
gsm-gpt2-val GSM8K main, test 1,319 1.9 MB

Schema

Every row has {index, input, target, condition_input_ids, input_ids}.

  • input / condition_input_ids β€” the question, as text and as token ids.
  • target / input_ids β€” the answer, as text and as token ids.
    • train targets are TinyGSM Python programs defining simple_math_problem(); the answer is that function's return value, not a literal in the text.
    • eval targets are GSM8K reasoning chains carrying the #### N marker.

Condition and target are stored separately β€” the collator concatenates them, so you are free to choose the layout (contiguous [q|a], padded, prefix-masked, …).

Tokenizer

GPT-2 BPE (gpt2). The whole GPT-2 family shares this vocabulary, so these ids are equally valid for gpt2-medium / gpt2-large / gpt2-xl β€” no retokenization needed. Max id observed is 50256, within gpt2's 50257 vocab. GPT-2 has no pad token; EOS (50256) doubles as pad.

Built with --max_length 640 --max_input_length 256, with rows too long to fit filtered out at preparation time β€” so the concatenation is capped at 640 tokens.

Length statistics

Measured over an even 200k-row sample of train and all 1319 eval rows:

mean p50 p90 p99 p99.9 max
train condition 45.9 43 70 100 127 206
train target 173.8 160 258 390 493 592
train concat 219.7 203 324 475 585 640
eval condition 57.8 54 87 119 β€” 183
eval target 98.8 92 155 227 β€” 303
eval concat 156.6 148 231 323 β€” 402

The cap is on the concatenation, so the marginals do not co-occur: a 206-token question never comes with a 592-token program. A fixed condition/target split therefore cannot use the full budget on both sides. Measured truncation for candidate splits:

condition / target total train q train a eval rows affected
128 / 512 640 0.090% 0.048% 9 / 1319
160 / 480 640 0.006% 0.153% 2 / 1319
192 / 448 640 0.001% 0.334% 0 / 1319
206 / 592 798 0 0 0 / 1319

192/448 is the only 640-budget split that leaves every eval question intact, which matters when reported accuracies are in the low percent and a handful of mis-stated questions is a meaningful fraction of the metric. Its cost is 0.33% of train programs (38,723 rows), which are better dropped than truncated β€” a truncated program does not execute, so it is pure label noise for an execution-based metric.

Loading

from huggingface_hub import snapshot_download
from datasets import load_from_disk

p = snapshot_download("erasedwalt/gsm-gpt2-preprocessed", repo_type="dataset")
train = load_from_disk(f"{p}/gsm-gpt2-train")
val   = load_from_disk(f"{p}/gsm-gpt2-val")

Scoring note

TinyGSM answers are executed, not string-matched: run the generated program in a sandbox, take simple_math_problem()'s return value, and compare against the gold #### N. Roughly 193/200 real TinyGSM programs execute to a number; the remainder return tuples, which is inherent to the source data rather than a preprocessing artifact.

Downloads last month
27