English
n-gram
olmo-core
language-modeling
Files changed (1) hide show
  1. README.md +94 -0
README.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ tags:
6
+ - n-gram
7
+ - olmo-core
8
+ - language-modeling
9
+ datasets:
10
+ - IanMagnusson/count-ngram-tables
11
+ - allenai/dolma3_mix-6T-1025-7B
12
+ ---
13
+
14
+ # COUNT checkpoints
15
+
16
+ Pretrained COUNT models from **The COUNT: Counting N-grams Unlocks Scaling on Host Memory and
17
+ Training-Free Adaptation** ([paper](https://arxiv.org/abs/XXXX.XXXXX), [code](https://github.com/IanMagnusson/COUNT)).
18
+
19
+ COUNT adds an n-gram embedding to a standard transformer without adding learned parameters. For each
20
+ position it looks up the most frequent next tokens of the longest matching n-grams in a table of corpus
21
+ counts held in CPU RAM, averages those tokens' rows of the model's own output head (weighted by their
22
+ count scores), and adds the result to the token embedding.
23
+
24
+ For the full configuration of each model, see the paper's appendix, the
25
+ `config.json` and `release_args.json` in each step directory, and the ladder configuration in the
26
+ [code](https://github.com/IanMagnusson/COUNT).
27
+
28
+ ## Checkpoints
29
+
30
+ Seven backbone sizes on the OLMo-core model ladder, each trained on Dolma 3
31
+ (`allenai/dolma3_mix-6T-1025-7B`) and saved at three training budgets: 10, 20 and 40 tokens per
32
+ backbone parameter (D/N). Every checkpoint is a full OLMo-core distributed checkpoint with model
33
+ weights, optimizer state and trainer state.
34
+
35
+ | Size | Table used in training | D/N = 10 | D/N = 20 | D/N = 40 | Global batch (tokens) |
36
+ |---|---|---|---|---|---:|
37
+ | 60M | `general-17gb` | step 2190 | step 4381 | step 8762 | 262,144 |
38
+ | 100M | `general-17gb` | step 3881 | step 7762 | step 15524 | 262,144 |
39
+ | 190M | `general-17gb` | step 3631 | step 7261 | step 14523 | 524,288 |
40
+ | 370M | `general-797gb` | step 4721 | step 9442 | step 18883 | 786,432 |
41
+ | 600M | `general-797gb` | step 5574 | step 11148 | step 22297 | 983,040 |
42
+ | 760M | `general-797gb` | step 5785 | step 11570 | step 23139 | 1,310,720 |
43
+ | 1B | `general-797gb` | step 8134 | step 16268 | step 32537 | 1,572,864 |
44
+
45
+ Paths follow the code's ladder layout, `model-ladders/count-<size>/<SIZE>/step<N>/`, so pointing
46
+ `OLMO_ROOT_DIR` at a download lets the code find them. Each step directory has a `release_args.json`
47
+ with the ladder settings it was trained with.
48
+
49
+ The tables are in [count-ngram-tables](https://huggingface.co/datasets/IanMagnusson/count-ngram-tables).
50
+ A checkpoint can be evaluated with its training table or with any other table there, including the
51
+ smaller general tables and the math, biomedical and law tables.
52
+
53
+ **190M note.** The 190M checkpoints come from a rerun with the same recipe, because the original run's
54
+ D/N = 10 and 20 checkpoints were lost. They are a reproduction of the paper's 190M COUNT model, not the
55
+ exact weights behind its reported numbers.
56
+
57
+ ## Usage
58
+
59
+ Evaluate a checkpoint with the [COUNT code](https://github.com/IanMagnusson/COUNT):
60
+
61
+ ```bash
62
+ hf download IanMagnusson/count-checkpoints-count --include "model-ladders/count-190m/*" \
63
+ --local-dir $OLMO_ROOT_DIR
64
+ torchrun --standalone --nproc-per-node=1 olmo-core/src/scripts/train/ladder/count_ladder.py \
65
+ eval-checkpoint --name count-190m --cluster local/h200 --size 190M --sequence-length 8192 \
66
+ --chinchilla-multiple 2.0 --max-gpus 1 --minimum-world-size 1 --fixed-global-batch-size 524288 \
67
+ --rank-mbz 8 --data-root /path/to/tokenized \
68
+ --checkpoint-path $OLMO_ROOT_DIR/model-ladders/count-190m/190M/step14523 \
69
+ --eval-output-dir /path/to/eval-out --no-load-trainer-state \
70
+ --count-table-dir /dev/shm/count-tables/tables/general-17gb \
71
+ --count-k 8 --count-max-order 6 --count-num-orders 6
72
+ ```
73
+
74
+ Evaluation loads model weights only. Resuming training also restores the optimizer and trainer state.
75
+ The trainer state records a fingerprint of the data paths the model was trained on, and the code
76
+ refuses to resume on data whose fingerprint differs; when your tokenized data is the same corpus at
77
+ different paths, pass `--ignore-data-fingerprints`.
78
+
79
+ ## Related
80
+
81
+ - [N-gram tables](https://huggingface.co/datasets/IanMagnusson/count-ngram-tables)
82
+ - [Learned n-gram embedding checkpoints](https://huggingface.co/IanMagnusson/count-checkpoints-learned-ngram)
83
+ - [Standard transformer checkpoints](https://huggingface.co/IanMagnusson/count-checkpoints-standard-transformer)
84
+
85
+ ## Citation
86
+
87
+ ```bibtex
88
+ @article{magnusson2026count,
89
+ title = {The {COUNT}: Counting N-grams Unlocks Scaling on Host Memory and Training-Free Adaptation},
90
+ author = {Magnusson, Ian and Smith, Noah A. and Koh, Pang Wei},
91
+ journal = {arXiv preprint arXiv:XXXX.XXXXX},
92
+ year = {2026}
93
+ }
94
+ ```