sidgraph commited on
Commit
4e92e04
·
verified ·
1 Parent(s): d1a8b7e

docs: dataset card with native + raw access paths

Browse files
Files changed (1) hide show
  1. README.md +138 -103
README.md CHANGED
@@ -1,106 +1,141 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: meta
5
- struct:
6
- - name: tier
7
- dtype: string
8
- - name: split
9
- dtype: string
10
- - name: bucket
11
- dtype: string
12
- - name: seed
13
- dtype: uint64
14
- - name: axes
15
- struct:
16
- - name: n
17
- dtype: int64
18
- - name: k
19
- dtype: int64
20
- - name: renders
21
- sequence: string
22
- - name: program
23
- list:
24
- - name: op
25
- dtype: string
26
- - name: args
27
- sequence: int64
28
- - name: label
29
- dtype: string
30
- - name: target
31
- dtype: string
32
- - name: trace
33
- struct:
34
- - name: steps
35
- list:
36
- - name: pc
37
- dtype: int64
38
- - name: regs
39
- sequence: int64
40
- - name: stack
41
- sequence: int64
42
- - name: emitted
43
- dtype: int64
44
- - name: output
45
- sequence: int64
46
- - name: halted
47
- dtype: bool
48
- - name: renders
49
- struct:
50
- - name: direct
51
- struct:
52
- - name: input_ids
53
- sequence: int64
54
- - name: target_ids
55
- sequence: int64
56
- - name: input_text
57
- dtype: string
58
- - name: target_text
59
- dtype: string
60
- splits:
61
- - name: train
62
- num_bytes: 808043736
63
- num_examples: 200000
64
- - name: eval_len_128
65
- num_bytes: 470063605
66
- num_examples: 20000
67
- - name: eval_len_16
68
- num_bytes: 66397821
69
- num_examples: 20000
70
- - name: eval_len_32
71
- num_bytes: 124082576
72
- num_examples: 20000
73
- - name: eval_len_48
74
- num_bytes: 181742886
75
- num_examples: 20000
76
- - name: eval_len_64
77
- num_bytes: 239414953
78
- num_examples: 20000
79
- - name: eval_len_8
80
- num_bytes: 37534223
81
- num_examples: 20000
82
- - name: eval_len_96
83
- num_bytes: 354723239
84
- num_examples: 20000
85
- download_size: 188376341
86
- dataset_size: 2282003039
87
  configs:
88
- - config_name: default
89
- data_files:
90
- - split: train
91
- path: data/train-*
92
- - split: eval_len_128
93
- path: data/eval_len_128-*
94
- - split: eval_len_16
95
- path: data/eval_len_16-*
96
- - split: eval_len_32
97
- path: data/eval_len_32-*
98
- - split: eval_len_48
99
- path: data/eval_len_48-*
100
- - split: eval_len_64
101
- path: data/eval_len_64-*
102
- - split: eval_len_8
103
- path: data/eval_len_8-*
104
- - split: eval_len_96
105
- path: data/eval_len_96-*
106
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ task_categories:
4
+ - text-generation
5
+ - other
6
+ language:
7
+ - en
8
+ tags:
9
+ - synthetic
10
+ - reasoning
11
+ - program-execution
12
+ - tiny-vm
13
+ - interpretability
14
+ pretty_name: Tiny-VM Tier 1 (Register Traces)
15
+ size_categories:
16
+ - 100K<n<1M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: data/train-*
22
+ - split: eval_len_8
23
+ path: data/eval_len_8-*
24
+ - split: eval_len_16
25
+ path: data/eval_len_16-*
26
+ - split: eval_len_32
27
+ path: data/eval_len_32-*
28
+ - split: eval_len_48
29
+ path: data/eval_len_48-*
30
+ - split: eval_len_64
31
+ path: data/eval_len_64-*
32
+ - split: eval_len_96
33
+ path: data/eval_len_96-*
34
+ - split: eval_len_128
35
+ path: data/eval_len_128-*
36
  ---
37
+
38
+ # Tiny-VM Tier 1 — Register Traces
39
+
40
+ Synthetic dataset of straight-line Tiny-VM programs with full execution traces and pre-rendered training prompts. Tier 1 of the **FANC "Latent State as Computer"** experimental curriculum, focused on **register-file tracking under bounded program length**.
41
+
42
+ - **200,000** train programs
43
+ - **140,000** stratified eval programs (7 buckets × 20,000, one per program length `n ∈ {8, 16, 32, 48, 64, 96, 128}`)
44
+ - Generator: `tinyvm.generators.gen_register_trace` (LOAD / ADD / SUB / MOV / PRINT, no control flow)
45
+ - Per-row: full `Program` (instruction list) + `ExecutionTrace` (per-step register snapshots, output stream, halted flag) + `direct`-mode pre-rendered prompt (token IDs and surface text)
46
+ - Deterministic: every row is reconstructable from `(meta.seed, meta.axes)` via `tinyvm.data.configs.TIER1.build`
47
+ - Byte-integrity: every file's SHA-256 is in `manifest.json` (raw layout); `python -m tinyvm.data verify` re-hashes against it
48
+ - Seed base: `0`
49
+
50
+ ## Two access paths
51
+
52
+ ### 1. Native HF datasets (Parquet)
53
+
54
+ ```python
55
+ from datasets import load_dataset
56
+
57
+ ds = load_dataset("Genesis-AI-Labs/tinyvm-tier1")
58
+ ds["train"] # 200,000 rows
59
+ ds["eval_len_16"] # 20,000 rows (one per length bucket)
60
+
61
+ # Each row has: meta, program, trace, renders
62
+ row = ds["train"][0]
63
+ print(row["meta"]["seed"], row["meta"]["axes"])
64
+ print(row["renders"]["direct"]["input_text"]) # surface tokens
65
+ print(row["renders"]["direct"]["input_ids"]) # 64-vocab token IDs
66
+ ```
67
+
68
+ ### 2. Raw JSONL + manifest (byte-integrity)
69
+
70
+ The exact files emitted by `python -m tinyvm.data emit --tier tier1 --out data/` are mirrored under `raw/` on the Hub. Download and verify:
71
+
72
+ ```bash
73
+ huggingface-cli download Genesis-AI-Labs/tinyvm-tier1 \
74
+ --repo-type dataset \
75
+ --include "raw/*" \
76
+ --local-dir ./data
77
+
78
+ python -m tinyvm.data verify --dataset ./data/raw # exits 0 if SHA-256 matches manifest
79
+ ```
80
+
81
+ Then stream with the project's loader (skip Program/Trace reconstruction for fast DataLoader pipelines):
82
+
83
+ ```python
84
+ from tinyvm.data import load_jsonl, load_prompts
85
+
86
+ # Full row with reconstructed Program + ExecutionTrace.
87
+ for row in load_jsonl("data/raw/train.jsonl"):
88
+ ...
89
+
90
+ # Fast path: just (input_ids, target_ids) tuples for the chosen render mode.
91
+ for input_ids, target_ids in load_prompts("data/raw/train.jsonl", mode="direct"):
92
+ ...
93
+ ```
94
+
95
+ ## Schema
96
+
97
+ Each row is a JSON object with four top-level keys:
98
+
99
+ | Key | Type | Description |
100
+ |---|---|---|
101
+ | `meta` | object | `{tier: "tier1", split: "train"\|"eval", bucket: <name>\|null, seed: int, axes: {n: int, k: int}, renders: ["direct"]}` |
102
+ | `program` | array | List of instruction dicts: `{op: "LOAD"\|"ADD"\|..., args: [...], label?: str, target?: str}` |
103
+ | `trace` | object | `{steps: [{pc: int, regs: [int×8]}, ...], output: [int, ...], halted: bool}` |
104
+ | `renders` | object | `{direct: {input_ids: [int], target_ids: [int], input_text: str, target_text: str}}` |
105
+
106
+ The vocabulary is the project's custom 64-token vocabulary (see `tinyvm.tokeniser`). Token 0 is `<pad>`, registers are `R0..R7`, etc.
107
+
108
+ ## Tier 1 axes
109
+
110
+ | Axis | Range / Values | Meaning |
111
+ |---|---|---|
112
+ | `n` | uniformly sampled from `[8, 32]` (train); fixed per eval bucket | Program length in instructions |
113
+ | `k` | uniformly chosen from `{2, 4, 8}` | Number of distinct registers used |
114
+
115
+ Eval buckets are length-stratified at `n ∈ {8, 16, 32, 48, 64, 96, 128}` with `k=4` fixed. The `len_48` through `len_128` buckets test **length generalisation** beyond the training distribution (which tops out at `n=32`) — the `len_128` bucket is 4× the longest training program.
116
+
117
+ ## Reproducibility
118
+
119
+ The dataset is bit-exact reproducible:
120
+
121
+ ```bash
122
+ git clone https://github.com/mr-siddy/FANC
123
+ cd FANC
124
+ pip install -e .
125
+ python -m tinyvm.data emit --tier tier1 --out data/ --seed 0
126
+ python -m tinyvm.data verify --dataset data/tier1 # exit 0
127
+ ```
128
+
129
+ The verify step re-hashes every emitted file's SHA-256 and compares against `manifest.json`. Manifest also records `tinyvm_commit` (git SHA at emit time) so consumers can pin to the exact code that produced the data.
130
+
131
+ ## Provenance
132
+
133
+ - **Project:** FANC — "Latent State as Computer" (research)
134
+ - **Code:** [github.com/mr-siddy/FANC](https://github.com/mr-siddy/FANC) — `tinyvm/data/` sub-package
135
+ - **Spec:** `docs/superpowers/specs/2026-05-16-tinyvm-data-pipeline-design.md`
136
+ - **Parent doc:** `Latent_State_as_Computer.docx` §11.2 (dataset sizes), §17 (Day 3)
137
+ - **Companion datasets** (to come): `tinyvm-tier0` (counter programs), `tinyvm-tier2` (branched programs with CoT renders)
138
+
139
+ ## License
140
+
141
+ MIT. Use freely.