rpn-gpt-data / README.md
markab's picture
rpn-gpt data: s2a_r7 training rows, demonstrations, held-out eval sets, cards
dfac6b7 verified
|
Raw History Blame Contribute Delete
7.34 kB
---
license: mit
language:
- en
task_categories:
- text-generation
- question-answering
tags:
- math
- arithmetic
- forth
- rpn
- reasoning
pretty_name: rpn-gpt data
size_categories:
- 10K<n<100K
configs:
- config_name: rows_r7
data_files:
- split: train
path: train/r7_train.jsonl
- split: validation
path: train/r7_val.jsonl
- config_name: demos_r5
data_files:
- split: train
path: demos/r5_train.jsonl
- split: validation
path: demos/r5_val.jsonl
- config_name: demos_r6
data_files:
- split: train
path: demos/r6_train.jsonl
- split: validation
path: demos/r6_val.jsonl
- config_name: frozen_test
data_files:
- split: test
path: eval/frozen_test.json
- config_name: dev_round
data_files:
- split: test
path: eval/dev_round.json
- config_name: dev_codefull
data_files:
- split: test
path: eval/dev_codefull.json
- config_name: demo_set
data_files:
- split: test
path: eval/demo_set.json
- config_name: demo10
data_files:
- split: test
path: eval/demo10.json
- config_name: dm_frontier
data_files:
- split: test
path: eval/dm_frontier.json
- config_name: math500
data_files:
- split: test
path: eval/math500.json
---
# rpn-gpt data
The training rows and the evaluation sets of [rpn-gpt](https://github.com/markab21/rpn-gpt). rpn-gpt puts an exact Forth machine into the weights of NVIDIA Nemotron 3.5 Lightning and trains a LoRA adapter, [markab/rpn-gpt-lightning](https://huggingface.co/markab/rpn-gpt-lightning), to use it. This dataset holds the rows that trained that adapter and the sets that measured it.
## Files
| Config | File | Rows | Size | What it is |
|---|---|---|---|---|
| `rows_r7` | `train/r7_train.jsonl`, `train/r7_val.jsonl` | 9269 / 388 | 229 MB / 9.0 MB | The rows that trained the round-7 adapter |
| `demos_r5` | `demos/r5_train.jsonl`, `demos/r5_val.jsonl` | 1177 / 53 | 14.0 MB / 0.6 MB | Round-5 program demonstrations. They are also in `rows_r7`. |
| `demos_r6` | `demos/r6_train.jsonl`, `demos/r6_val.jsonl` | 534 / 16 | 6.6 MB / 0.2 MB | Round-6 demonstrations: stack-form programs and recovery after a bug. Round 6 was not promoted, and `rows_r7` does not hold them. |
| `frozen_test` | `eval/frozen_test.json` | 600 | 97 KB | The frozen test. Used only at milestones. |
| `dev_round` | `eval/dev_round.json` | 407 | 65 KB | The dev set that decided each round |
| `dev_codefull` | `eval/dev_codefull.json` | 200 | 35 KB | Code-heavy dev set |
| `demo_set` | `eval/demo_set.json` | 90 | 14 KB | Hard problems that need the machine |
| `demo10` | `eval/demo10.json` | 10 | 2 KB | 10 hard problems for in-weights runs |
| `dm_frontier` | `eval/dm_frontier.json` | 260 | 31 KB | Easy DeepMind problems, 10 per family |
| `math500` | `eval/math500.json` | 500 | 158 KB | MATH-500, the guard against a plain-math regression |
| | `cards/*.txt` | | 12 KB | The cards: system prompts that describe the machine. `reference_v4.txt` is the current one. `nomachine.txt` is the prompt for MATH-500. |
An evaluation row has `q` (the problem), `a` (the expected answer), `family`, and for most sets `kind` (hard, small, variant, easy, easy_big).
A training row is one whole turn as Lightning token ids, ready for SFT:
- `input_ids`: the turn in the Lightning tokenizer: the card as system prompt, the problem, the model's thinking, its Forth blocks, the machine's output blocks, and the answer.
- `train_mask`: 1 where the model wrote the token and the loss applies. 0 on the prompt, on the machine's output blocks, and on a masked first attempt in a recovery row.
- `q`, `answer`, `family`, `kind`, `machine` (the answer came from the machine), `reruns`, `stage` (the source, below), and `recovery` in `demos_r6`.
To read a row, decode it with the base model's tokenizer:
```python
from datasets import load_dataset
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16")
row = load_dataset("markab/rpn-gpt-data", "rows_r7", split="validation")[0]
print(tok.decode(row["input_ids"]))
```
## How the rows were made
Every row is a correct, clean turn. Every row has card v4 as its system prompt, also when the rollout used an older card. Every output block is exact against the kernel's token stream. The `stage` field gives the source:
| `stage` | Rows (train) | Source |
|---|---|---|
| `A`, `B`, `W`, `WR` | 2630, 1453, 857, 416 | Rollouts of the round-1 adapter on fresh problems (round 3) |
| `R4W`, `R4M` | 616, 300 | Rollouts of the round-3 adapter on weak families and on the MATH train split (round 4) |
| `demo` | 1177 | Program demonstrations. Code wrote them: a short plan, one program, its exact output, the answer (round 5). |
| `R7` | 1820 | Rollouts of the round-5 adapter: correct, short, answer read from a machine output (round 7) |
The rounds, the filters and the results are in [training](https://github.com/markab21/rpn-gpt/blob/main/training/README.md).
## Held-out sets
We never trained on an evaluation set. The frozen test was carved out first and was used only at milestones, never to pick a round. Training problems use new seeds. Before this release, we made sure again that no training or demonstration row has the problem text of an evaluation set.
## Sources and licenses
| Part | Source | License |
|---|---|---|
| Problems of the `L6.*` and `DMbig.*` families, and the demonstrations | Our generators in [rpn-gpt](https://github.com/markab21/rpn-gpt). `DMbig` uses DeepMind's question forms with bigger numbers. | MIT |
| Easy problems (`arithmetic`, `algebra`, `numbers` and other DeepMind modules) | Made with DeepMind's [mathematics_dataset](https://github.com/google-deepmind/mathematics_dataset) generator | Generator: Apache-2.0 |
| `math500` | MATH-500, the 500-problem test subset of [MATH](https://github.com/hendrycks/math) from [PRM800K](https://github.com/openai/prm800k) | MIT (both) |
| `R4M` problems | The MATH train split | MIT |
| Model text in the rows (thinking, programs, answers) | Rollouts of Nemotron 3.5 Lightning with our adapters | The base model is under [OpenMDW-1.1](https://openmdw.ai/license/1-1/), which puts no restriction on outputs |
| Output blocks | Our Forth machine (the spec) | MIT |
No row holds text from a teacher model. Every row is either a Lightning rollout or a demonstration that our code wrote.
Our MIT license covers our work: the rows as we built them, the demonstrations, the cards, the generator-made problems, and this card. The MATH and MATH-500 problems stay under their MIT license (Copyright (c) 2021 Dan Hendrycks, and Copyright (c) 2023 OpenAI for PRM800K). The DeepMind generator stays under Apache-2.0.
## License
MIT, Copyright (c) 2026 Mark Berry and rpn-gpt contributors ([LICENSE](LICENSE)).
## Credit and citation
The MIT license requires that you keep the copyright and permission notice in copies. In addition, we ask you, politely, to credit rpn-gpt with a link to [github.com/markab21/rpn-gpt](https://github.com/markab21/rpn-gpt) when you use or change this data.
```bibtex
@misc{berry2026rpngpt,
author = {Mark Berry},
title = {rpn-gpt: An exact Forth machine compiled into the weights of a language model},
year = {2026},
howpublished = {\url{https://github.com/markab21/rpn-gpt}}
}
```