SlavaYus commited on
Commit
cbb4efd
·
verified ·
1 Parent(s): f608894

TinyGSM tinysms_train_qa: 386134 rows, preprocessed as in the project

Browse files
README.md ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: other
5
+ pretty_name: tinysms train qa
6
+ tags:
7
+ - code
8
+ - mathematics
9
+ - tinysms
10
+ configs:
11
+ - config_name: default
12
+ data_files:
13
+ - split: train
14
+ path: data/*.parquet
15
+ ---
16
+
17
+ # tinysms train qa
18
+
19
+ The same training data as prompt/answer pairs, preprocessed exactly as the model is trained on them: the docstring repeating the question is stripped, the entry point is renamed to `solve`, and `text` is the rendered example. `answer_value` is the return value of the reference program, obtained by executing it in a sandbox.
20
+
21
+ ## Loading
22
+
23
+ ```python
24
+ from datasets import load_dataset
25
+ ds = load_dataset("tinysms_train_qa", split="train")
26
+ ```
27
+
28
+ ## Schema
29
+
30
+ ```
31
+ id: string
32
+ question: string
33
+ prompt: string
34
+ code: string
35
+ text: string
36
+ answer_type: string
37
+ answer_value: float64
38
+ n_tokens: int32
39
+ ```
40
+
41
+ | column | what |
42
+ |---|---|
43
+ | `id` | `train-<row index in the source shard>` / `test-<kept row>` |
44
+ | `question` | the math word problem, stripped |
45
+ | `prompt` | the model input: `"### Question:\n" + question + "\n### Code:\n"` |
46
+ | `code` | reference program, docstring removed, entry point renamed to `solve` -- the completion target |
47
+ | `text` | `prompt + code`, exactly what the model is trained on (`tokenizer.format_example`) |
48
+ | `answer_type` | `int` or `float`, the type returned by the reference program |
49
+ | `answer_value` | that return value -- the gold answer pass@1 compares against |
50
+ | `n_tokens` | length of `text` in the project's own BPE tokens (vocab 8192), no EOS |
51
+
52
+ ## Provenance
53
+
54
+ * source: [`TinyGSM/TinyGSM`](https://huggingface.co/datasets/TinyGSM/TinyGSM), revision `5049a7840fa546985eaae4c698d5daf6fdf7b47d`
55
+ * rows: /tmp/opencode/tinysms_data8/train_pool.jsonl (the raw pool of src/data.py, --pool-size), first 400000 of them in file order
56
+ * splits follow `src/data.py`: validation and test are the **tail** of shard 0,
57
+ train is the **head** of shard 0 followed by the following shards, so train,
58
+ validation and test are disjoint
59
+ * gold answers: the reference program is executed in a sandbox (`src/sandbox.py`);
60
+ pairs whose reference does not return a number were dropped (13866 here,
61
+ 1 of them an integer too large for float64, which the
62
+ pass@1 comparator could not handle either)
63
+ * a reference program that kills the sandbox worker takes its whole 64-program batch down with it; for train those batches were re-run one program at a time, the test split keeps the project's own batching so that it stays identical to the evaluation set
64
+ * preprocessing is the model's own (`src/tokenizer.py`): docstring stripped,
65
+ `simple_math_problem` renamed to `solve`, rendered with `format_example`
66
+
67
+ ## Build
68
+
69
+ 386134 rows in 2 parquet file(s), folder `out/hf_datasets/tinysms_train_qa/`, built by
70
+
71
+ ```bash
72
+ python -m scripts.build_hf_datasets --n-train 400000 --n-val 2000 --n-test 2000
73
+ ```
74
+
75
+ `meta.json` next to this file holds the full build parameters.
data/train-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69080b0d78f131725842e03ddaaa948c44e4b9821dee482c69c9c7fe4ed4332e
3
+ size 81030392
data/train-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1e2135e4b21b5cf2a6d0fa971c5d09e7bbd51cea68b47aa0f10914cce3c27d1
3
+ size 44105108
meta.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source": "TinyGSM/TinyGSM",
3
+ "revision": "5049a7840fa546985eaae4c698d5daf6fdf7b47d",
4
+ "n_train": 400000,
5
+ "n_val": 2000,
6
+ "n_test": 2000,
7
+ "tokenizer": "out/tokenizer/tokenizer.json (own byte-level BPE, vocab 8192)",
8
+ "preprocessing": "strip_docstring + format_example (src/tokenizer.py)",
9
+ "source_detail": "/tmp/opencode/tinysms_data8/train_pool.jsonl (the raw pool of src/data.py, --pool-size)",
10
+ "dataset": "tinysms_train_qa",
11
+ "kind": "qa",
12
+ "split": "train",
13
+ "n_rows": 386134,
14
+ "n_dropped": 13866,
15
+ "n_dropped_overflow": 1,
16
+ "gold_note": "\n* a reference program that kills the sandbox worker takes its whole 64-program batch down with it; for train those batches were re-run one program at a time, the test split keeps the project's own batching so that it stays identical to the evaluation set",
17
+ "gold_status": {
18
+ "ok": 398073,
19
+ "error": 1610,
20
+ "timeout": 62,
21
+ "crash_isolated": 255
22
+ },
23
+ "files": [
24
+ "data/train-00000-of-00002.parquet",
25
+ "data/train-00001-of-00002.parquet"
26
+ ],
27
+ "build_seconds": 237.0
28
+ }