File size: 13,271 Bytes
7163353
 
 
 
 
 
 
 
 
 
835a8c4
 
 
 
1f89d53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7163353
 
 
 
 
 
 
 
 
 
 
7e06c1d
7163353
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
835a8c4
 
 
 
 
 
 
 
 
 
 
 
 
7163353
 
 
 
 
 
 
 
1f89d53
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62831c3
1f89d53
7163353
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
---
license: mit
language:
- en
pretty_name: "Same Content, Different Format: worked-example data"
configs:
- config_name: train
  data_files: data/train.jsonl
- config_name: holdout
  data_files: data/holdout.jsonl
- config_name: near_transfer
  data_files: data/near_transfer.jsonl
- config_name: gsm8k_test
  data_files: data/gsm8k_test.jsonl
- config_name: samples_holdout_open
  data_files:
  - split: base
    path: samples/holdout/open/base.jsonl
  - split: bare
    path: samples/holdout/open/bare.jsonl
  - split: complete
    path: samples/holdout/open/complete.jsonl
  - split: fade_ordered
    path: samples/holdout/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/holdout/open/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/holdout/open/bare_pm.jsonl
  - split: complete_pm
    path: samples/holdout/open/complete_pm.jsonl
- config_name: samples_holdout_direct
  data_files:
  - split: base
    path: samples/holdout/direct/base.jsonl
  - split: bare
    path: samples/holdout/direct/bare.jsonl
  - split: complete
    path: samples/holdout/direct/complete.jsonl
  - split: fade_ordered
    path: samples/holdout/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/holdout/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/holdout/direct/bare_pm.jsonl
  - split: complete_pm
    path: samples/holdout/direct/complete_pm.jsonl
- config_name: samples_near_transfer_open
  data_files:
  - split: base
    path: samples/near_transfer/open/base.jsonl
  - split: bare
    path: samples/near_transfer/open/bare.jsonl
  - split: complete
    path: samples/near_transfer/open/complete.jsonl
  - split: fade_ordered
    path: samples/near_transfer/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/near_transfer/open/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/near_transfer/open/bare_pm.jsonl
  - split: complete_pm
    path: samples/near_transfer/open/complete_pm.jsonl
- config_name: samples_near_transfer_direct
  data_files:
  - split: base
    path: samples/near_transfer/direct/base.jsonl
  - split: bare
    path: samples/near_transfer/direct/bare.jsonl
  - split: complete
    path: samples/near_transfer/direct/complete.jsonl
  - split: fade_ordered
    path: samples/near_transfer/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/near_transfer/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/near_transfer/direct/bare_pm.jsonl
  - split: complete_pm
    path: samples/near_transfer/direct/complete_pm.jsonl
- config_name: samples_gsm8k_test_open
  data_files:
  - split: base
    path: samples/gsm8k_test/open/base.jsonl
  - split: bare
    path: samples/gsm8k_test/open/bare.jsonl
  - split: complete
    path: samples/gsm8k_test/open/complete.jsonl
  - split: fade_ordered
    path: samples/gsm8k_test/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/gsm8k_test/open/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/gsm8k_test/open/bare_pm.jsonl
  - split: complete_pm
    path: samples/gsm8k_test/open/complete_pm.jsonl
- config_name: samples_gsm8k_test_direct
  data_files:
  - split: base
    path: samples/gsm8k_test/direct/base.jsonl
  - split: bare
    path: samples/gsm8k_test/direct/bare.jsonl
  - split: complete
    path: samples/gsm8k_test/direct/complete.jsonl
  - split: fade_ordered
    path: samples/gsm8k_test/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: samples/gsm8k_test/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: samples/gsm8k_test/direct/bare_pm.jsonl
  - split: complete_pm
    path: samples/gsm8k_test/direct/complete_pm.jsonl
- config_name: grades_holdout_open
  data_files:
  - split: base
    path: grades/holdout/open/base.jsonl
  - split: bare
    path: grades/holdout/open/bare.jsonl
  - split: complete
    path: grades/holdout/open/complete.jsonl
  - split: fade_ordered
    path: grades/holdout/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/holdout/open/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/holdout/open/bare_pm.jsonl
  - split: complete_pm
    path: grades/holdout/open/complete_pm.jsonl
- config_name: grades_holdout_direct
  data_files:
  - split: base
    path: grades/holdout/direct/base.jsonl
  - split: bare
    path: grades/holdout/direct/bare.jsonl
  - split: complete
    path: grades/holdout/direct/complete.jsonl
  - split: fade_ordered
    path: grades/holdout/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/holdout/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/holdout/direct/bare_pm.jsonl
  - split: complete_pm
    path: grades/holdout/direct/complete_pm.jsonl
- config_name: grades_near_transfer_open
  data_files:
  - split: base
    path: grades/near_transfer/open/base.jsonl
  - split: bare
    path: grades/near_transfer/open/bare.jsonl
  - split: complete
    path: grades/near_transfer/open/complete.jsonl
  - split: fade_ordered
    path: grades/near_transfer/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/near_transfer/open/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/near_transfer/open/bare_pm.jsonl
  - split: complete_pm
    path: grades/near_transfer/open/complete_pm.jsonl
- config_name: grades_near_transfer_direct
  data_files:
  - split: base
    path: grades/near_transfer/direct/base.jsonl
  - split: bare
    path: grades/near_transfer/direct/bare.jsonl
  - split: complete
    path: grades/near_transfer/direct/complete.jsonl
  - split: fade_ordered
    path: grades/near_transfer/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/near_transfer/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/near_transfer/direct/bare_pm.jsonl
  - split: complete_pm
    path: grades/near_transfer/direct/complete_pm.jsonl
- config_name: grades_gsm8k_test_open
  data_files:
  - split: base
    path: grades/gsm8k_test/open/base.jsonl
  - split: bare
    path: grades/gsm8k_test/open/bare.jsonl
  - split: complete
    path: grades/gsm8k_test/open/complete.jsonl
  - split: fade_ordered
    path: grades/gsm8k_test/open/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/gsm8k_test/open/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/gsm8k_test/open/bare_pm.jsonl
  - split: complete_pm
    path: grades/gsm8k_test/open/complete_pm.jsonl
- config_name: grades_gsm8k_test_direct
  data_files:
  - split: base
    path: grades/gsm8k_test/direct/base.jsonl
  - split: bare
    path: grades/gsm8k_test/direct/bare.jsonl
  - split: complete
    path: grades/gsm8k_test/direct/complete.jsonl
  - split: fade_ordered
    path: grades/gsm8k_test/direct/fade_ordered.jsonl
  - split: fade_shuffled
    path: grades/gsm8k_test/direct/fade_shuffled.jsonl
  - split: bare_pm
    path: grades/gsm8k_test/direct/bare_pm.jsonl
  - split: complete_pm
    path: grades/gsm8k_test/direct/complete_pm.jsonl
tags:
- math
- worked-examples
- gsm8k
- continual-pretraining
---

# Same Content, Different Format: worked-example data

Data for the worked-example experiment of *Same Content, Different Format: QA Augmentation and Faded Worked Examples
Under a Fixed Training Budget*. The six trained models are in
[nzhao721/worked-examples-models](https://huggingface.co/nzhao721/worked-examples-models).

## Configs

### `train` (10,000 rows)

The training instances: 5,000 GSM8K training families with two instances each (3,333 answer-augmented, 3,333
rephrased, 1,667 self-verification and 1,667 FOBAR), written by Claude Sonnet 5.5 with MetaMathQA's prompts and
generation code (Yu et al., 2024; commit fe667b14).

| Field | Meaning |
|---|---|
| `instance_id`, `family_id` | instance and family (one family = all rewrites of one GSM8K seed question) |
| `type` | `GSM_AnsAug`, `GSM_Rephrased`, `GSM_SV` or `GSM_FOBAR` |
| `question`, `steps`, `final_answer` | the training question, its step-by-step solution and its final answer |
| `seed_question` | the original GSM8K question of the family |
| `writer_model` | the model that wrote the instance |
| `judge_sonnet`, `judge_argon` | the two LLM judges' audits of the solution (Claude Sonnet 5.5 and Gemini 4 Argon) |

Every instance's final answer matches the gold answer, and neither judge flagged a reasoning error or a slip.

### `holdout` (5,606 rows)

The evaluation holdout: every original question plus every rewrite whose verifying answer matched the gold and that
both judges accepted, 3,247 GSM8K and 2,359 MATH prompts across 1,488 families. No family is shared with training.
`prompt` is the direct-condition prompt (`Problem: q\nAnswer:`); the open condition uses the problem alone.
`final_answer` is the full gold answer.

### `near_transfer` (1,667 rows)

The original GSM8K question of every training family that has no answer-augmented instance. Training showed only
rephrased, self-verification or backward versions of these problems, never the original wording or its solution. A
rephrased training instance has the same final answer as its original question.

### `gsm8k_test` (1,319 rows)

The GSM8K test split (Cobbe et al., 2021), in the same schema, with the final answer taken from each solution's
`####` line. No test problem belongs to a training or holdout family.

All evaluation configs share the holdout's schema.

## Tokenized training streams (`tokenized/`)

The exact token streams each arm was trained on, one folder per arm (`bare`, `complete`, `fade_ordered`,
`fade_shuffled`, `bare_pm`, `complete_pm`): `shard-00000.npy` (token ids, GPT-NeoX OLMo tokenizer, packed into
2,048-token windows in training order), `label_mask-00000.npy` (1 where a token carries loss) and `manifest.json`.
`tokenized/pack_summary.json` gives each arm's windows, tokens, loss tokens and passes. The two fade arms draw on the
same 50,000 documents in different orders.

## Model samples and grades (`samples/`, `grades/`)

Every evaluation sample behind the paper's worked-example results, with both graders' verdicts: the seven models (the
base checkpoint and the six arms in
[nzhao721/worked-examples-models](https://huggingface.co/nzhao721/worked-examples-models)) on the three evaluation
sets, under both prompts. Files are `samples/<set>/<condition>/<model>.jsonl` and
`grades/<set>/<condition>/<model>.jsonl`, with `<set>` one of `holdout`, `near_transfer` and `gsm8k_test`,
`<condition>` `open` or `direct`, and `<model>` `base`, `bare`, `complete`, `fade_ordered`, `fade_shuffled`, `bare_pm`
or `complete_pm`. Each `samples_<set>_<condition>` and `grades_<set>_<condition>` config has one split per model. The
holdout files cover the 5,606 released holdout prompts.

Sampling. Eight samples per prompt at temperature 0.7 with nucleus sampling (top-p 0.95). Direct: the prompt is the
config's `prompt` (`Problem: q
Answer:`), and a sample ends at the first newline after non-blank text, at
end-of-text, or at 128 new tokens. Open: the prompt is `Problem: q
`, and a sample ends at end-of-text, at a line that
opens another problem (`Problem:`, `Question:`, `Q:`), at the end of the line holding the first answer marker
(`####`, `Answer:`, `The answer is`), when a complete line has appeared three times, or at 512 new tokens.

### `samples_*` (one row per sample)

| Field | Meaning |
|---|---|
| `instance_id` | the prompt, as in the evaluation config |
| `sample` | sample index, 0 to 7 |
| `text` | the generated continuation |
| `stop` | why the sample ended: `newline`, `answer`, `problem`, `repeat`, `eos` or `cap` (the length cap); null for the base model's holdout direct samples, which an earlier version of the sampler wrote with the text only |
| `new_tokens` | generated tokens; null where `stop` is null |

### `grades_*` (one row per prompt)

| Field | Meaning |
|---|---|
| `instance_id`, `family_id`, `type`, `gold` | the prompt, its family, its type and its full gold answer |
| `rule_answers`, `rule_correct` | the deterministic grader's verdict for each sample: the first answer field it extracted (null if none) and whether it equals the gold |
| `rule_maj_correct` | whether the most common extracted answer is correct (maj@8) |
| `judge_answers`, `judge_correct` | the LLM judge's verdict for each sample: the first final answer the sample states (null if none) and whether it equals the gold |
| `judge_gold_issue` | null, or the judge's note when it thought the gold was wrong |

Each list has eight entries in sample order, so entry `k` belongs to row `sample = k` of the matching samples file.
Pass@8 is `any(judge_correct)` and PassRatio@8 is the mean of `judge_correct`; the paper's reported numbers use the
judge's grades. The judge is Claude Sonnet 5.5. It graded the eight samples of one prompt together, shown in random
order without the model's name, with the prompt in `grades/judge_prompt.md`. The deterministic grader takes the
first answer field of a sample (in the open condition, after `####`, `Answer:` or `The answer is`); a numeric answer must
equal the gold exactly as a number, any other answer is compared with math-verify, and prose never counts. Its code is in `code/` (see `code/README.md`).

## Licensing

GSM8K and MATH are released under the MIT license; MetaMathQA's prompts and code are used as released. The rewrites
were written by Claude Sonnet 5.5.