Add README
Browse files
README.md
CHANGED
|
@@ -1,37 +1,80 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
- name: expression
|
| 11 |
-
dtype: string
|
| 12 |
-
- name: steps
|
| 13 |
-
dtype: int64
|
| 14 |
-
- name: text
|
| 15 |
-
dtype: string
|
| 16 |
-
splits:
|
| 17 |
-
- name: train
|
| 18 |
-
num_bytes: 12149052
|
| 19 |
-
num_examples: 15000
|
| 20 |
-
- name: validation
|
| 21 |
-
num_bytes: 607770
|
| 22 |
-
num_examples: 750
|
| 23 |
-
- name: test
|
| 24 |
-
num_bytes: 2428870
|
| 25 |
-
num_examples: 3000
|
| 26 |
-
download_size: 7567774
|
| 27 |
-
dataset_size: 15185692
|
| 28 |
configs:
|
| 29 |
-
- config_name: default
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: gpl-3.0
|
| 3 |
+
pretty_name: Calculator
|
| 4 |
+
size_categories:
|
| 5 |
+
- 10K<n<100K
|
| 6 |
+
task_categories:
|
| 7 |
+
- text-generation
|
| 8 |
+
language:
|
| 9 |
+
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
configs:
|
| 11 |
+
- config_name: default
|
| 12 |
+
data_files:
|
| 13 |
+
- split: train
|
| 14 |
+
path: data/train-*
|
| 15 |
+
- split: validation
|
| 16 |
+
path: data/validation-*
|
| 17 |
+
- split: test
|
| 18 |
+
path: data/test-*
|
| 19 |
---
|
| 20 |
+
|
| 21 |
+
# Arithmetic Expression Dataset Generator
|
| 22 |
+
|
| 23 |
+
## Overview
|
| 24 |
+
|
| 25 |
+
This is a synthetic deterministic dataset with nested arithmetic expressions and step-by-step solutions. We provide balanced examples of bracketed arithmetic expressions using:
|
| 26 |
+
|
| 27 |
+
- parentheses: `()`
|
| 28 |
+
- square brackets: `[]`
|
| 29 |
+
- curly braces: `{}`
|
| 30 |
+
|
| 31 |
+
and operators:
|
| 32 |
+
|
| 33 |
+
- `+`
|
| 34 |
+
- `-`
|
| 35 |
+
- `*`
|
| 36 |
+
|
| 37 |
+
The dataset is balanced across reduction depths from 1 to 15 and is intended for SLMs that learn structured mathematical reasoning from examples.
|
| 38 |
+
|
| 39 |
+
## Content
|
| 40 |
+
|
| 41 |
+
Each sample contains:
|
| 42 |
+
|
| 43 |
+
- `expression` — the original arithmetic expression
|
| 44 |
+
- `prompt` — the input prompt for the model
|
| 45 |
+
- `completion` — the target answer in `<think> ... </think>` and `<answer> ... </answer>` format
|
| 46 |
+
- `answer` — the final numeric result
|
| 47 |
+
- `steps` — the number of reduction steps
|
| 48 |
+
- `text` — the full formatted training sample
|
| 49 |
+
|
| 50 |
+
## Counts
|
| 51 |
+
|
| 52 |
+
- Train examples: 15000
|
| 53 |
+
- Validation examples: 750
|
| 54 |
+
- Test examples: 3000
|
| 55 |
+
- Total examples: 18750
|
| 56 |
+
|
| 57 |
+
Each step from 1 to 15 appears exactly:
|
| 58 |
+
- 1000 times in train
|
| 59 |
+
- 50 times in validation
|
| 60 |
+
- 200 times in test
|
| 61 |
+
|
| 62 |
+
## Example
|
| 63 |
+
|
| 64 |
+
```text
|
| 65 |
+
### Expression
|
| 66 |
+
Calculate: (11 + (296 - 98))
|
| 67 |
+
|
| 68 |
+
### Answer
|
| 69 |
+
<think>
|
| 70 |
+
Start: (11 + (296 - 98))
|
| 71 |
+
1. (74 * 4) = 296
|
| 72 |
+
2. (296 - 98) = 198
|
| 73 |
+
3. (11 + 198) = 209
|
| 74 |
+
</think>
|
| 75 |
+
<answer>209</answer>
|
| 76 |
+
```
|
| 77 |
+
|
| 78 |
+
## Dataset generation
|
| 79 |
+
|
| 80 |
+
Expressions are generated automatically with random trees and bracket types. The evaluator uses stack-based parsing and operator precedence to produce valid traces. The generator deduplicates expressions so the dataset contains unique samples.
|