Downloads · 30 days
16
13% of all-time downloads
LingoIITGN/Ansh-160k
Ansh-160k is a machine learning model from LingoIITGN. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for tokenizers. The card lists the license as apache-2.0.
The tokenizer model Ansh-160k, is trained on a dataset of Wikipedia articles in 18 Indic languages and English. We propose the name Ansh as this tokenizer is designed to meticulously identify every essential token (An…
Downloads · 30 days
16
13% of all-time downloads
All-time downloads
122
Public
Repo size
13.5 MB
Likes
2
Public
Click a slice to open those files.
.json13.5 MB · 100%
From the Hugging Face model README
The tokenizer model Ansh-160k, is trained on a dataset of Wikipedia articles in 18 Indic languages and English. We propose the name Ansh as this
tokenizer is designed to meticulously identify every essential token (Ansh in Sanskrit) of our diverse Indic languages.

India is a vast country that has a multi-lingual culture that covers 22 Official languages and more than 1700 languages and dialects. It has been observed that various languages share words among themselves, sometimes even across language families. To capitalize on this observation, we trained our tokenization model with a vocabulary size of 160,000 (160k) using the dataset of Wikipedia articles in 18 Indic languages and English by applying the Byte-Pair Encoding (BPE) algorithm. When compared among all the popular open-source tokenizers trained on multilingual Indic languages on fertility scores, our model outperformed them in most of the languages, with significant performance improvement in Sanskrit (sa), Kashmiri (ks), Sindhi (sd) and Konkani (gom).
Use the code below to get started with the model.
from transformers import AutoTokenizer
try:
tokenizer = tokenizer = AutoTokenizer.from_pretrained("LingoIITGN/Ansh-160k"))
print("Tokenizer loaded successfully!")
except Exception as e:
print(f"Error loading tokenizer: {e}")
print("Please ensure you have the correct model name and are connected to the internet.")
exit()
input_text = "Hello, world! This is an example of how to use the tokenizer."
#input_text = 'मुझे यह presentation कल morning तक submit करना है। '
#input_text = 'What is capital city of India?'
encoded_input = tokenizer.encode(example_text)
print("\nOriginal Text:", example_text)
print("Encoded (Token IDs):", encoded_input)
decoded_output = tokenizer.decode(encoded_input)
print("Decoded Text:", decoded_output)
[More Information Needed]
| Language | IndicBERTv2 | Sarvam-1 | MuRIL | Gemma-3 | Llama-3.1 | XLM-RoBERTa | NLLB | Ansh-160k |
|---|---|---|---|---|---|---|---|---|
| Tamil | 1.966 | 2.853 | 1.904 | 2.766 | 12.170 | 2.726 | 2.925 | 1.937 |
| Kannada | 2.035 | 2.651 | 1.992 | 3.498 | 15.302 | 2.835 | 2.955 | 1.876 |
| Malayalam | 2.202 | 3.246 | 2.199 | 3.571 | 15.215 | 2.999 | 3.329 | 2.073 |
| Maithili | 1.534 | 2.269 | 1.549 | 2.036 | 3.414 | 1.991 | 2.058 | 1.270 |
| Konkani | 2.145 | 2.954 | 2.469 | 2.830 | 4.180 | 2.746 | 2.765 | 1.741 |
| Telugu | 1.803 | 2.429 | 1.859 | 3.050 | 13.002 | 2.391 | 2.691 | 1.713 |
| Odia | 1.601 | 2.419 | 1.497 | 4.639 | 15.629 | 2.222 | 2.284 | 1.397 |
| Bengali | 1.610 | 2.083 | 1.555 | 1.890 | 8.389 | 2.374 | 2.396 | 1.515 |
| Nepali | 1.629 | 2.450 | 1.484 | 2.163 | 3.768 | 1.903 | 2.070 | 1.466 |
| Punjabi | 1.458 | 1.822 | 1.459 | 2.968 | 8.277 | 2.031 | 1.983 | 1.445 |
| Urdu | 1.565 | 9.004 | 1.402 | 1.984 | 3.153 | 1.582 | 1.807 | 1.383 |
| Hindi | 1.456 | 1.784 | 1.450 | 1.719 | 2.997 | 1.716 | 1.790 | 1.364 |
| Gujarati | 1.505 | 2.228 | 1.428 | 2.491 | 9.926 | 2.195 | 2.332 | 1.387 |
| Kashmiri | 2.722 | 9.237 | 2.220 | 3.204 | 4.119 | 3.155 | 2.966 | 1.528 |
| Marathi | 1.529 | 1.906 | 1.493 | 2.026 | 3.964 | 2.032 | 2.173 | 1.494 |
| Sindhi | 1.740 | 8.337 | 1.436 | 2.377 | 3.060 | 1.735 | 1.830 | 1.380 |
| Assamese | 1.677 | 4.474 | 1.655 | 2.815 | 8.506 | 3.006 | 2.303 | 1.562 |
| Sanskrit | 2.821 | 3.916 | 2.294 | 3.586 | 5.036 | 3.268 | 3.390 | 1.950 |
| English | 1.491 | 1.844 | 1.526 | 1.537 | 1.486 | 1.574 | 1.587 | 1.521 |
Lingo Research Group at IIT Gandhinagar, India </br> Mail at: [email protected]