Datasets:
add README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
pretty_name: CFRL reasoning tasks (Countdown, Game24, Sudoku, Knights-and-Knaves)
|
| 3 |
+
license: other
|
| 4 |
+
license_name: mit-with-upstream-terms
|
| 5 |
+
license_link: LICENSE
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
task_categories:
|
| 9 |
+
- text-generation
|
| 10 |
+
size_categories:
|
| 11 |
+
- 1M<n<10M
|
| 12 |
+
tags:
|
| 13 |
+
- reasoning
|
| 14 |
+
- program-verified
|
| 15 |
+
- countdown
|
| 16 |
+
- game24
|
| 17 |
+
- sudoku
|
| 18 |
+
- knights-and-knaves
|
| 19 |
+
- flow-matching
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
# CFRL reasoning tasks
|
| 23 |
+
|
| 24 |
+
The four program-verified reasoning datasets of the paper **CFRL** (reinforcement learning for continuous flow
|
| 25 |
+
language models), in the exact form used to fine-tune and evaluate the ELF-B checkpoints at
|
| 26 |
+
[tufts-ml/CFRL](https://huggingface.co/tufts-ml/CFRL). Every prompt has a program verifier that decides whether a
|
| 27 |
+
model output is correct without reference to the stored answer, so rewards are exact and label-free.
|
| 28 |
+
|
| 29 |
+
| task | `train` | `valid` (held out) | prompt | response |
|
| 30 |
+
|---|---|---|---|---|
|
| 31 |
+
| `countdown` | 500,000 | 2,000 | four or five integers and a target, e.g. `12 5 4 3 -> 25` | a chain of equations, e.g. `12-5=7 , 4*7=28 , 28-3=25` |
|
| 32 |
+
| `game24` | 13,150 | 1,601 | four numbers in 1..13, target 24 | a chain of equations reaching 24 |
|
| 33 |
+
| `sudoku` | 400,000 | 2,000 | the 81 cells of the puzzle, `*` for blanks | all 81 cells of the solution |
|
| 34 |
+
| `kk` | 300,000 | 2,000 | one statement per character, 4 to 6 characters | the knight/knave assignment |
|
| 35 |
+
|
| 36 |
+
The `valid` split holds the held-out prompts of the paper. They are split by index into a validation half (even
|
| 37 |
+
indices, used to select checkpoints) and a test half (odd indices, on which every reported accuracy is measured).
|
| 38 |
+
Game24 is split by number set: no held-out number set appears in training in any order.
|
| 39 |
+
|
| 40 |
+
## Format
|
| 41 |
+
|
| 42 |
+
Each split is a Hugging Face `datasets` folder written with `Dataset.save_to_disk` (Arrow). Load with
|
| 43 |
+
`datasets.load_from_disk`, not `load_dataset`:
|
| 44 |
+
|
| 45 |
+
```python
|
| 46 |
+
from datasets import load_from_disk
|
| 47 |
+
ds = load_from_disk("data/countdown/train")
|
| 48 |
+
print(ds[0]["input"], "||", ds[0]["target"])
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
Columns shared by all tasks: `input` and `target` (the raw strings), `condition_input_ids` and `input_ids`
|
| 52 |
+
(the T5-small token ids of prompt and response, each followed by EOS, as the ELF models consume them). Countdown
|
| 53 |
+
and Game24 add `nums`, `tgt` and `n_nums`; Knights-and-Knaves adds `n_nums` (the number of characters); Sudoku adds
|
| 54 |
+
`rating`, `clues` and `source` carried over from the upstream collection; the `valid` splits carry `index`.
|
| 55 |
+
|
| 56 |
+
To use the files with the CFRL code release, download them into its `data/` folder:
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
hf download tufts-ml/CFRL-data --repo-type dataset --local-dir data
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
## Where the data comes from
|
| 63 |
+
|
| 64 |
+
**Countdown, Game24 and Knights-and-Knaves are generated by the CFRL code** (`cfrl/tasks/build_*.py` in the
|
| 65 |
+
release) with seeded Python generators and no external input. The task formulations follow earlier work:
|
| 66 |
+
|
| 67 |
+
- **Countdown** follows the formulation of Stream of Search (Gandhi et al., 2024): random integers in 1..99, a
|
| 68 |
+
target in 10..100, and a derivation as a sequence of binary operations. One random valid derivation per problem
|
| 69 |
+
is stored as the supervised target; the verifier accepts any valid derivation.
|
| 70 |
+
- **Game24** follows the Game of 24 of Tree of Thoughts (Yao et al., 2023): reach 24 from four numbers in 1..13,
|
| 71 |
+
each used once. All 1,345 solvable unordered number sets were enumerated and split by set.
|
| 72 |
+
- **Knights-and-Knaves** follows Xie et al. (2024): each of 4 to 6 characters makes one statement ("A: C knave",
|
| 73 |
+
"B: A same C", "C: D diff B"); only puzzles with a unique solution are kept. The generator and the compact
|
| 74 |
+
statement format are the release's own.
|
| 75 |
+
|
| 76 |
+
**Sudoku is derived from a third-party collection.** The puzzles and solutions are taken from
|
| 77 |
+
[sapientinc/sudoku-extreme](https://huggingface.co/datasets/sapientinc/sudoku-extreme), the "Hardest Sudoku
|
| 78 |
+
Puzzle Dataset V2" released by Sapient Intelligence with the Hierarchical Reasoning Model (Wang et al., 2025).
|
| 79 |
+
That collection combines puzzles from the [tdoku benchmark sets](https://github.com/t-dillon/tdoku/blob/master/benchmarks/README.md#benchmarked-data-sets)
|
| 80 |
+
and the [enjoysudoku forum](http://forum.enjoysudoku.com/the-hardest-sudokus-new-thread-t6539-600.html#p277835),
|
| 81 |
+
exact-deduplicated and randomly permuted, with a difficulty rating from the tdoku solver. Our `train` split is
|
| 82 |
+
400,000 puzzles sampled from its `train.csv` and our `valid` split 2,000 puzzles sampled from its `test.csv`,
|
| 83 |
+
so the two remain mathematically inequivalent as in the upstream collection. The `rating`, `clues` and `source`
|
| 84 |
+
columns are the upstream fields. The upstream dataset card states no license; the Sudoku splits here are
|
| 85 |
+
redistributed under the upstream collection's terms, whatever they are, and the MIT license of this repository
|
| 86 |
+
covers only the generated tasks and the packaging.
|
| 87 |
+
|
| 88 |
+
Token ids were produced with the T5-small tokenizer (Raffel et al., 2020), the encoder of ELF (Hu et al., 2026).
|
| 89 |
+
|
| 90 |
+
## Reproducing the splits
|
| 91 |
+
|
| 92 |
+
`scripts/prepare_data.sh` in the code release regenerates the Countdown splits and the Sudoku `train` split
|
| 93 |
+
byte-for-byte. The remaining splits were produced by the same builders with different seeds or ordering than the
|
| 94 |
+
script states (Sudoku `valid`: seed 1; Knights-and-Knaves `valid`: seed 11, and `train`: seed 0 excluding the
|
| 95 |
+
`valid` prompts), and the Game24 split keeps a subset of the orderings of each training set. The files in this
|
| 96 |
+
repository are therefore the canonical splits; treat the script as documentation of the generators.
|
| 97 |
+
|
| 98 |
+
## Citation
|
| 99 |
+
|
| 100 |
+
If you use this data, please cite the CFRL paper and the sources of the tasks:
|
| 101 |
+
|
| 102 |
+
```bibtex
|
| 103 |
+
@article{gandhi2024sos,
|
| 104 |
+
title={Stream of Search ({SoS}): Learning to Search in Language},
|
| 105 |
+
author={Gandhi, Kanishk and Lee, Denise and Grand, Gabriel and Liu, Muxin and Cheng, Winson and Sharma, Archit and Goodman, Noah D.},
|
| 106 |
+
journal={arXiv preprint arXiv:2404.03683}, year={2024}}
|
| 107 |
+
@article{yao2023tot,
|
| 108 |
+
title={Tree of Thoughts: Deliberate Problem Solving with Large Language Models},
|
| 109 |
+
author={Yao, Shunyu and Yu, Dian and Zhao, Jeffrey and Shafran, Izhak and Griffiths, Thomas L. and Cao, Yuan and Narasimhan, Karthik},
|
| 110 |
+
journal={arXiv preprint arXiv:2305.10601}, year={2023}}
|
| 111 |
+
@article{xie2024kk,
|
| 112 |
+
title={On Memorization of Large Language Models in Logical Reasoning},
|
| 113 |
+
author={Xie, Chulin and Huang, Yangsibo and Zhang, Chiyuan and Yu, Da and Chen, Xinyun and Lin, Bill Yuchen and Li, Bo and Ghazi, Badih and Kumar, Ravi},
|
| 114 |
+
journal={arXiv preprint arXiv:2410.23123}, year={2024}}
|
| 115 |
+
@article{wang2025hrm,
|
| 116 |
+
title={Hierarchical Reasoning Model},
|
| 117 |
+
author={Wang, Guan and Li, Jin and Sun, Yuhao and Chen, Xing and Liu, Changling and Wu, Yue and Lu, Meng and Song, Sen and Abbasi Yadkori, Yasin},
|
| 118 |
+
journal={arXiv preprint arXiv:2506.21734}, year={2025}}
|
| 119 |
+
@misc{sudokuextreme,
|
| 120 |
+
title={Hardest Sudoku Puzzle Dataset V2 (sudoku-extreme)}, author={Sapient Intelligence},
|
| 121 |
+
howpublished={\url{https://huggingface.co/datasets/sapientinc/sudoku-extreme}}}
|
| 122 |
+
@article{hu2026elf,
|
| 123 |
+
title={{ELF}: Embedded Language Flows},
|
| 124 |
+
author={Hu, Keya and Qiu, Linlu and Lu, Yiyang and Zhao, Hanhong and Li, Tianhong and Kim, Yoon and Andreas, Jacob and He, Kaiming},
|
| 125 |
+
journal={arXiv preprint arXiv:2605.10938}, year={2026}}
|
| 126 |
+
@article{cfrl2026,
|
| 127 |
+
title={CFRL: Reinforcement Learning for Continuous Flow Language Models},
|
| 128 |
+
year={2026}}
|
| 129 |
+
```
|