Downloads · 30 days
0
vivekvar/indictok-256k
indictok-256k is a feature extraction model from vivekvar. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as apache-2.0.
A byte‑level‑free BPE tokenizer for 22 scheduled Indian languages across 12 scripts, 256,000 vocabulary. It beats Sarvam‑30B/105B — the open state of the art for Indic — by 14% on average fertility at comparable vocab…
Downloads · 30 days
0
Access
Public
Updated Jul 25, 2026
Repo size
14.1 MB
Likes
0
Public
Click a slice to open those files.
.json14.1 MB · 100%
From the Hugging Face model README
A byte‑level‑free BPE tokenizer for 22 scheduled Indian languages across 12 scripts, 256,000 vocabulary. It beats Sarvam‑30B/105B — the open state of the art for Indic — by 14% on average fertility at comparable vocabulary size, and leads every tokenizer tested on worst‑case fertility, parity, and akshara‑splitting.
Full method, code, benchmark and 14 other variants: https://github.com/vivekvar-dl/indictok Results page: https://vivekvar-dl.github.io/indictok/
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("vivekvar/indictok-256k")
tok.encode("भारत একটি বিশাল দেশ தமிழ் மொழி മലയാളം ভাষা")
Or with the tokenizers library directly:
from tokenizers import Tokenizer
tok = Tokenizer.from_pretrained("vivekvar/indictok-256k")
22 languages, 1,024 identical sentences from IN22‑Gen. Fertility is tokens per word,
parity is Indic ÷ English cost, langs is how many of 22 the tokenizer actually encodes.
Lower is better.
| tokenizer | vocab | avg ↓ | worst ↓ | parity ↓ | langs |
|---|---|---|---|---|---|
| MuRIL | 197k | 1.980 | 3.26 | 1.47× | 20/22 ⚠ |
| IndicBERT‑v2 | 250k | 2.003 | 4.02 | 1.55× | 22/22 |
| indictok‑256k | 256k | 2.122 | 3.38 | 1.42× | 22/22 |
| Sarvam‑105B | 262k | 2.450 | 3.93 | 1.83× | 22/22 |
| Sarvam‑30B | 262k | 2.450 | 3.93 | 1.83× | 22/22 |
| Gemma‑3 | 262k | 3.381 | 12.13 | 2.53× | 22/22 |
| GPT‑4o | ~200k | 4.400 | 16.55 | 3.32× | 22/22 |
| Llama‑4 Scout | 201k | 5.000 | 16.45 | 3.76× | 22/22 |
| Llama‑3 | 128k | 8.551 | 17.83 | 6.36× | 22/22 |
| GPT‑4 | ~100k | 10.008 | 18.17 | 7.43× | 22/22 |
First on three measures: worst‑case fertility (3.23), parity (1.40× on the compression‑optimal variant), and akshara‑splitting (0.17%, 19× better than Sarvam‑30B).
MuRIL and IndicBERT‑v2 post lower average fertility. We do not lead on that number. Both are encoder‑only models and both give something up for it:
ള് → ള്, a different letter). Only 39.1% of sentences survive with content intact,
and it encodes 20 of 22 languages — Santali and Manipuri fail outright.decode() returns WordPiece ##
markers rather than text.On MuRIL's own 14‑language set the gap narrows to 1.5% and this tokenizer leads on parity, but the headline average is theirs.
Every intrinsic metric here is a proxy. Ali et al. (2310.08754) trained 24 LLMs and found fertility does not reliably predict downstream performance. We make no claim that any number here predicts model quality.
254‑ാം ordinal notation, which a hand‑written rule would have
wrongly flagged.Fifteen tokenizers in total, on GitHub — including a 128k that leads on worst‑case and parity, per‑language Hindi tokenizers, and the akshara‑constrained variant (vivekvar/indictok‑acu) that removes 97% of akshara‑splitting for a 3.2% compression cost.
Apache‑2.0.