Downloads · 30 days
0
akshatshaw/LLaMA_hin1
LLaMA_hin1 is a machine learning model from akshatshaw. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A specialized tokenizer for Hindi language processing with a vocabulary size of 150,000 tokens.
Downloads · 30 days
0
Access
Public
Updated Mar 13, 2025
Repo size
13.4 MB
Likes
1
Public
Click a slice to open those files.
.json13.4 MB · 100%
From the Hugging Face model README
A specialized tokenizer for Hindi language processing with a vocabulary size of 150,000 tokens.
This tokenizer is designed specifically for Hindi language processing tasks. With a vocabulary size of 150,000 tokens, it provides comprehensive coverage of Hindi words, subwords, and characters to effectively handle the unique characteristics of the Hindi language.
pip install hindi-tokenizer
# or
pip install git+https://huggingface.co/YOUR_USERNAME/hindi-tokenizer
from transformers import AutoTokenizer
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/hindi-tokenizer")
# Example Hindi text
text = "नमस्ते, यह एक हिंदी पाठ का उदाहरण है।"
# Tokenize
tokens = tokenizer(text)
print(tokens)
# Decode
decoded = tokenizer.decode(tokens["input_ids"])
print(decoded)
# Batch processing
texts = [
"भारत एक विशाल देश है।",
"हिंदी भारत की प्रमुख भाषाओं में से एक है।"
]
# Tokenize with padding and truncation
tokens = tokenizer(texts, padding=True, truncation=True, max_length=128)
print(tokens)
This tokenizer was trained on a large corpus of Hindi text using [BPE]. The training data includes:
If you use this tokenizer in your research, please cite:
@misc{hindi-tokenizer,
author = {Your Name},
title = {Hindi Tokenizer: A Large Vocabulary Tokenizer for Hindi NLP},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/YOUR_USERNAME/hindi-tokenizer}}
}