Make bench tokenizer configs byte-identical to their source models
Browse filesThe encode benches in huggingface/tokenizers load their model configs from this dataset. Some entries were slimmed-down fixtures or diverged from the source models, which made bench numbers unrepresentative (reported as "vocab is smaller than the real model"). This PR makes every bench config byte-identical to `tokenizer.json` in the original model repo:
- `gpt-oss.json` (new): from `openai/gpt-oss-20b` (byte-identical in `openai/gpt-oss-120b`). 199,998 vocab / 446,189 merges vs 3,060 / 4,000 in `gpt-oss-slim.json`.
- `glm-5.2.json` (new): from `zai-org/GLM-5.2`. 154,820 vocab / 321,649 merges vs 2,951 / 4,000 in `glm-5.2-slim.json`.
- `gemma-4.json` (new): from `google/gemma-4-31B-it` (the variant `gemma-4-slim.json` was derived from — vocab/merges are identical across gemma-4 sizes, only the base models' post_processor differs). 262,144 vocab / 514,906 merges vs 2,787 / 4,000 in the slim file.
- `mistral-small-4.json` (new): from `mistralai/Mistral-Small-4-119B-2603` — the current tekken chain (`Sequence[Split, ByteLevel]` pre-tokenizer, 131,072 vocab, 1,000 added special tokens), a workload archetype the benches didn't cover.
- `llama-2.json` (refresh): synced byte-identical with `meta-llama/Llama-2-7b-hf`. The previous copy had the same vocab and merge set but 119 trailing whitespace merges in a different order — merge order is BPE priority, so whitespace runs tokenized differently.
- `llama-3-tokenizer.json` (refresh): synced byte-identical with `meta-llama/Llama-3.1-8B` (the file was already semantically this tokenizer, but re-serialized in the tuple-merges format, 17.2MB vs 9.1MB). Vocab, merges, and added tokens are unchanged — encode ids are identical.
- `.gitattributes`: track the three new configs via LFS/Xet, same as the other full configs.
The `-slim` fixtures are left untouched. The bench manifest in huggingface/tokenizers points at the full configs as of the fix/bpe-benches branch.
- .gitattributes +4 -0
- gemma-4.json +3 -0
- glm-5.2.json +3 -0
- gpt-oss.json +3 -0
- llama-2.json +2 -2
- llama-3-tokenizer.json +2 -2
- mistral-small-4.json +3 -0
|
@@ -67,3 +67,7 @@ t5-base.json filter=lfs diff=lfs merge=lfs -text
|
|
| 67 |
llama-2.json filter=lfs diff=lfs merge=lfs -text
|
| 68 |
gpt2.json filter=lfs diff=lfs merge=lfs -text
|
| 69 |
fixtures/models/** filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
llama-2.json filter=lfs diff=lfs merge=lfs -text
|
| 68 |
gpt2.json filter=lfs diff=lfs merge=lfs -text
|
| 69 |
fixtures/models/** filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
gpt-oss.json filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
glm-5.2.json filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
gemma-4.json filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
mistral-small-4.json filter=lfs diff=lfs merge=lfs -text
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cc8d3a0ce36466ccc1278bf987df5f71db1719b9ca6b4118264f45cb627bfe0f
|
| 3 |
+
size 32169626
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d
|
| 3 |
+
size 20217442
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
|
| 3 |
+
size 27868174
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bcd04f0eadf90287bd26e1a183ac487d8a141b09b06aecb7725bbdd343640f2e
|
| 3 |
+
size 1842767
|
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76e48799b099d43365bd24ccd8ecc5aedac831718da780552f03b0a6eb4412aa
|
| 3 |
+
size 9085658
|
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ba5b3330fd84d5376fcca797cfb3b42eee6241ce23e3271e6fb2a115a8751bd
|
| 3 |
+
size 17077420
|