Tokenisation via Convex Relaxations
About
Tokenisation is an integral part of the current NLP pipeline. Current tokenisation algorithms such as BPE and Unigram are greedy algorithms -- they make locally optimal decisions without considering the resulting vocabulary as a whole. We instead formulate tokeniser construction as a linear program and solve it using convex optimisation tools, yielding a new algorithm we call ConvexTok. We find ConvexTok consistently improves intrinsic tokenisation metrics and the bits-per-byte (BpB) achieved by language models; it also improves downstream task performance, but less consistently. Furthermore, ConvexTok allows the user to certify how far their tokeniser is from optimal, with respect to a certain objective, via a lower bound, and we empirically find it to be within 1\% of optimal at common vocabulary sizes.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Language Modeling | (val) | Validation BPB0.6951 | 76 | |
| Downstream Performance Evaluation | CORE | CORE Score0.302 | 53 | |
| Intrinsic Tokenization | FLORES+ (test) | Vocabulary Utilisation69.2 | 24 | |
| Intrinsic Tokenization Evaluation | ClimbMix (held-out) | Vocabulary Utilization99 | 24 | |
| Language Modeling | ClimbMix pretraining corpus (val held-out) | BPB (val)0.7132 | 14 | |
| Zero-shot Evaluation | DCLM Core | CORE Score0.2631 | 9 | |
| Morphological Alignment | UniMorph (test) | English Alignment Score0.36 | 9 | |
| Compression | Goldfish data | English Compression Error Rate-1.18 | 8 |