topic stringclasses 4
values | messages listlengths 2 2 |
|---|---|
multiplication | [
{
"role": "user",
"content": "What is 5 * 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 55"
}
] |
addition | [
{
"role": "user",
"content": "What is 5 + 91?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 96"
}
] |
division | [
{
"role": "user",
"content": "What is 2 / 1?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 2"
}
] |
division | [
{
"role": "user",
"content": "What is 84 / 7?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 12"
}
] |
division | [
{
"role": "user",
"content": "What is 49 / 7?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 7"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 1 * 2?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 2"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 8 * 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 96"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 2 * 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 10"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 7 * 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 63"
}
] |
division | [
{
"role": "user",
"content": "What is 132 / 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 11"
}
] |
addition | [
{
"role": "user",
"content": "What is 21 + 68?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 89"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 10 * 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 110"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 69 - 28?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 41"
}
] |
division | [
{
"role": "user",
"content": "What is 16 / 4?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 4"
}
] |
division | [
{
"role": "user",
"content": "What is 5 / 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 1"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 3 * 3?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 9"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 98 - 81?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 17"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 5 * 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 60"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 10 * 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 120"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 2 * 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 16"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 7?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 28"
}
] |
division | [
{
"role": "user",
"content": "What is 4 / 2?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 2"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 5 * 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 30"
}
] |
division | [
{
"role": "user",
"content": "What is 70 / 10?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 7"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 98 - 97?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 1"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 94 - 37?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 57"
}
] |
division | [
{
"role": "user",
"content": "What is 33 / 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 3"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 79 - 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 70"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 3 * 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 15"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 53 - 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 48"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 45 - 17?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 28"
}
] |
division | [
{
"role": "user",
"content": "What is 18 / 3?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 6"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 84 - 81?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 3"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 9 * 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 81"
}
] |
addition | [
{
"role": "user",
"content": "What is 5 + 69?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 74"
}
] |
division | [
{
"role": "user",
"content": "What is 55 / 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 11"
}
] |
division | [
{
"role": "user",
"content": "What is 48 / 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 8"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 67 - 47?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 20"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 3 * 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 27"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 93 - 29?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 64"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 2 * 4?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 8"
}
] |
addition | [
{
"role": "user",
"content": "What is 13 + 45?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 58"
}
] |
addition | [
{
"role": "user",
"content": "What is 2 + 82?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 84"
}
] |
division | [
{
"role": "user",
"content": "What is 45 / 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 9"
}
] |
addition | [
{
"role": "user",
"content": "What is 11 + 27?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 38"
}
] |
division | [
{
"role": "user",
"content": "What is 81 / 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 9"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 3 * 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 36"
}
] |
division | [
{
"role": "user",
"content": "What is 28 / 4?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 7"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 54 - 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 48"
}
] |
addition | [
{
"role": "user",
"content": "What is 37 + 57?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 94"
}
] |
addition | [
{
"role": "user",
"content": "What is 17 + 48?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 65"
}
] |
addition | [
{
"role": "user",
"content": "What is 19 + 80?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 99"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 99 - 97?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 2"
}
] |
addition | [
{
"role": "user",
"content": "What is 7 + 93?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 100"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 36"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 3 * 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 24"
}
] |
addition | [
{
"role": "user",
"content": "What is 29 + 64?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 93"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 42 - 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 34"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 58 - 13?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 45"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 96 - 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 91"
}
] |
addition | [
{
"role": "user",
"content": "What is 38 + 44?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 82"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 32"
}
] |
addition | [
{
"role": "user",
"content": "What is 41 + 50?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 91"
}
] |
addition | [
{
"role": "user",
"content": "What is 6 + 89?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 95"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 48"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 1 * 10?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 10"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 60 - 12?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 48"
}
] |
addition | [
{
"role": "user",
"content": "What is 20 + 47?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 67"
}
] |
addition | [
{
"role": "user",
"content": "What is 27 + 63?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 90"
}
] |
addition | [
{
"role": "user",
"content": "What is 45 + 54?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 99"
}
] |
division | [
{
"role": "user",
"content": "What is 108 / 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 12"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 65 - 48?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 17"
}
] |
addition | [
{
"role": "user",
"content": "What is 3 + 4?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 7"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 7 * 10?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 70"
}
] |
division | [
{
"role": "user",
"content": "What is 7 / 1?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 7"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 44"
}
] |
division | [
{
"role": "user",
"content": "What is 15 / 5?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 3"
}
] |
division | [
{
"role": "user",
"content": "What is 8 / 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 1"
}
] |
division | [
{
"role": "user",
"content": "What is 72 / 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 12"
}
] |
division | [
{
"role": "user",
"content": "What is 20 / 2?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 10"
}
] |
division | [
{
"role": "user",
"content": "What is 36 / 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 6"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 88 - 75?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 13"
}
] |
addition | [
{
"role": "user",
"content": "What is 4 + 29?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 33"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 92 - 81?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 11"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 1 * 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 9"
}
] |
addition | [
{
"role": "user",
"content": "What is 20 + 59?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 79"
}
] |
addition | [
{
"role": "user",
"content": "What is 0 + 94?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 94"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 96 - 93?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 3"
}
] |
addition | [
{
"role": "user",
"content": "What is 6 + 48?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 54"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 77 - 6?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 71"
}
] |
division | [
{
"role": "user",
"content": "What is 11 / 1?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 11"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 8 * 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 88"
}
] |
division | [
{
"role": "user",
"content": "What is 9 / 9?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 1"
}
] |
addition | [
{
"role": "user",
"content": "What is 8 + 24?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 32"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 4 * 4?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 16"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 1 * 11?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 11"
}
] |
multiplication | [
{
"role": "user",
"content": "What is 7 * 7?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 49"
}
] |
subtraction | [
{
"role": "user",
"content": "What is 66 - 35?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 31"
}
] |
division | [
{
"role": "user",
"content": "What is 64 / 8?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 8"
}
] |
addition | [
{
"role": "user",
"content": "What is 6 + 71?\n\nEnd with a line that starts with #### followed by your answer."
},
{
"role": "assistant",
"content": "#### 77"
}
] |
Easy Math RL
A compact set of short, synthetic arithmetic questions for reinforcement learning with verifiable integer rewards in NanoChat.
Contents
| Split | Questions |
|---|---|
| Train | 4,240 |
| Validation | 48 |
Both splits have an even mix of addition, subtraction, multiplication, and exact division. Each training topic has 1,060 questions, and each validation topic has 12. Addition and subtraction use whole numbers from 0 to 100. Multiplication uses facts with a factor from 1 to 12. The initial facts multiply numbers up to 12. Additional facts use numbers up to 99. Division uses products from the corresponding multiplication facts, so every answer is a whole number. The underlying facts are kept in the same split.
Questions follow the direct format “What is 2 + 2?” Each conversation also asks the model to put its final integer on a line beginning with ####. Answers are short integers in the reference data.
Each JSONL row has the operation name and one user and assistant message:
{"topic":"addition","messages":[{"role":"user","content":"What is 2 + 2?\n\nEnd with a line that starts with #### followed by your answer."},{"role":"assistant","content":"#### 4"}]}
Use with NanoChat RL
Download the split files and reward task into a local directory:
hf download CrowdMind/ex-nanochat-rl train.jsonl validation.jsonl easy_math_rl.py --repo-type dataset --local-dir ./ex-nanochat-rl
Copy easy_math_rl.py into the NanoChat checkout's tasks/ directory. Add an argument next to the other options in scripts/chat_rl.py, before parse_args():
parser.add_argument("--easy-math-dir", help="Directory containing the easy math JSONL splits")
Import the task with the existing imports from tasks. Select it before the checkout's existing task selection:
from tasks.easy_math_rl import EasyMathRL
if args.easy_math_dir:
train_task = EasyMathRL("train", args.easy_math_dir)
val_task = EasyMathRL("validation", args.easy_math_dir)
elif args.task == "compact-thinking":
# Keep the checkout's existing compact-thinking setup here.
...
else:
# Keep the checkout's existing GSM8K setup here.
...
Run the existing RL command with the data directory option:
python -m scripts.chat_rl --easy-math-dir ./ex-nanochat-rl
The NanoChat RL loop uses reward() to compare the final integer with the reference answer. evaluate() uses the same exact check for validation.
Regenerate
The original 240-question training set and validation split can be reproduced from the dataset directory with the following commands:
python generate.py --seed 42
python generate.py --add-train-facts 500 --seed 43
python generate.py --add-train-facts 500 --seed 44
Each --add-train-facts 500 command adds 2,000 balanced training examples across the four topics. --add-train-facts skips facts already in either split.
- Downloads last month
- -