Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
datasets:
|
| 7 |
+
- allenai/olmo-mix-1124
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
# SuperBPE Tokenizer
|
| 11 |
+
SuperBPE extends the BPE algorithm to train tokenizers that include both traditional subword tokens (contained within word boundaries), as well as new **superword** tokens (containing parts of multiple words)! This tokenizer has a vocabulary size of 200k and transitions from learning subword to learning superword tokens at vocabulary size of 160k. It is trained on a random subset of Olmo2's pretraining data.
|
| 12 |
+
|
| 13 |
+
## Example Usage
|
| 14 |
+
```
|
| 15 |
+
from transformers import AutoTokenizer
|
| 16 |
+
tokenizer = AutoTokenizer.from_pretrained("alisawuffles/OLMo2-8B-SuperBPE-t180k")
|
| 17 |
+
tokenizer.convert_ids_to_tokens(tokenizer.encode("By the way, I am a fan of the Milky Way."))
|
| 18 |
+
# ['ByĠtheĠway', ',ĠIĠamĠa', 'ĠfanĠofĠthe', 'ĠMilkyĠWay', '.']
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
# Citation
|
| 22 |
+
```
|
| 23 |
+
@misc{liu-etal-2025-superbpe,
|
| 24 |
+
title={SuperBPE: Space Travel for Language Models},
|
| 25 |
+
author={Alisa Liu and Jonathan Hayase and Valentin Hofmann and Sewoong Oh and Noah A. Smith and Yejin Choi},
|
| 26 |
+
year={2025},
|
| 27 |
+
eprint={2503.13423},
|
| 28 |
+
archivePrefix={arXiv},
|
| 29 |
+
primaryClass={cs.CL},
|
| 30 |
+
url={https://arxiv.org/abs/2503.13423},
|
| 31 |
+
}
|
| 32 |
+
```
|