做多语言NLP或印度语AI应用的团队终于有了一个不牺牲英语和代码性能的专用分词器——直接替换o200k_base就能获得印度语26.7%的token节省,建议做LLM训练或推理优化的开发者试试。
研究者发布了BrahmicTokenizer-131K,一个131072词汇量的字节级BPE分词器,专门优化了印度婆罗米系语言的压缩效率,同时保持与OpenAI o200k_base相当的英语、欧洲语言和代码压缩性能。它通过两阶段改造实现:先裁剪o200k_base中不相关的书写系统,再为9个婆罗米Unicode区块分配2372个词汇槽位。在2700万印度语预训练文本上,它比同词汇量的Mistral-Nemo Tekken/Sarvam-m少产生26.7%的token,其中奥里亚语压缩比达4.31倍。在非印度语内容上,其英语词元率(1.235 vs 1.232)与o200k_base持平,并在HumanEval、MBPP和GSM8K上优于Tekken/Sarvam-m 4.0-14.2%。该分词器是131K词汇量下唯一同时在婆罗米语、英语、欧洲语言、代码和数学上表现均衡的方案,已以Apache 2.0协议开源。
BrahmicTokenizer-131K: An Indic-Capable Drop-In Replacement for o200k_base
We present BrahmicTokenizer-131K, a 131,072-vocabulary byte-level BPE tokenizer that closes the Brahmic compression gap at the 131K-vocabulary class while preserving the English, EU-language, and code compression of OpenAI's o200k_base. We construct it through a two-stage retrofit: (1) a script-prune crop that reduces 200,019 tokens to 131,072 by removing nine out-of-scope writing systems, and (2) a surgical retrofit of 2,372 corpus-dead vocabulary slots determined by linear-programming allocation across nine Brahmic Unicode blocks. The pre-tokenizer, decoder, and inherited merge rules are unchanged from o200k_base, making BrahmicTokenizer-131K a drop-in replacement at the tokenizer interface. On 27 million documents of public Indic pretraining text (2.84 billion words, 46.21 GB), BrahmicTokenizer-131K produces 26.7% fewer tokens than Mistral-Nemo Tekken / Sarvam-m at the same vocabulary budget, with per-language savings of 15.79% (Tamil) to 76.79% (Odia, a 4.31x compression ratio). The Odia advantage is mechanistically explained by Tekken/Sarvam-m containing zero Oriya-block tokens; our surgery added 725. On non-Indic content, BrahmicTokenizer-131K matches o200k_base's English fertility (1.235 vs 1.232 tokens/word) and beats Tekken/Sarvam-m by 4.0-14.2% on HumanEval, MBPP, and GSM8K. Across our 14-tokenizer benchmark, it is the only tokenizer simultaneously competitive on Brahmic, English, EU, code, and math at the 131K budget. Specialist tokenizers at other vocab classes (Sarvam-30B, Sarvam-1, MUTANT-Indic) achieve better Indic compression at the cost of non-Indic performance: Sarvam-1's English fertility is 15.9% worse and its code/math compression 26-33% worse than ours. We release the artifact under Apache 2.0 at https://huggingface.co/theschoolofai/BrahmicTokenizer-131K.