File size: 1,579 Bytes
d658c3d
 
d128460
4dbdf22
d128460
 
4dbdf22
 
 
 
d128460
4dbdf22
d128460
 
e162113
5f1311e
 
e162113
5f1311e
e162113
d658c3d
c6157a4
 
 
a7074e5
c6157a4
 
 
d128460
 
 
e162113
d128460
 
 
a7074e5
d128460
e162113
c6157a4
 
 
 
 
 
 
 
5f1311e
e162113
 
 
c6157a4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
---
configs:
- config_name: test
  data_files:
  - split: test
    path: test/test-*.parquet
- config_name: 1BT
  data_files:
  - split: train
    path: 1BT/train-*.parquet
- config_name: 10BT
  data_files:
  - split: train
    path: 10BT/train-*.parquet
- config_name: 3MT-3digit
  data_files:
  - split: train
    path: 3MT-3digit/train-*.parquet
  - split: test
    path: 3MT-3digit/test-*.parquet
---

# Addition Dataset

Addition problems in the format `{a} + {b} = {c}`.

## Subsets

- **test**: 5K held-out evaluation examples (operands >= 10, i.e. min 2 digits)
- **1BT**: ~85M training examples (~1 billion tokens under Llama-3 tokenizer)
- **10BT**: ~850M training examples (~10 billion tokens)
- **3MT-3digit**: Exhaustive single-token addition: all (a, b) with a, b in [0, 999] and a+b <= 999. 500,500 ordered pairs, ~3M tokens. All of a, b, c are single tokens. Symmetry-safe train/test split (10% test).

## Deduplication

- Commutative dedup: if `a + b = c` exists, `b + a = c` is excluded (1BT/10BT)
- Test exclusion: both orderings of test-set pairs are excluded from train splits
- 3MT-3digit: both orderings always in the same split (no commutative leakage)

## Usage

```python
from datasets import load_dataset

train = load_dataset("deqing/addition_dataset", "1BT", split="train")
test = load_dataset("deqing/addition_dataset", "test", split="test")

# Single-token exhaustive (0-999, a+b<=999)
train_3d = load_dataset("deqing/addition_dataset", "3MT-3digit", split="train")
test_3d = load_dataset("deqing/addition_dataset", "3MT-3digit", split="test")
```