Downloads · 30 days
0
Tamazight/Tifinizer-Unigram-32K
Tifinizer-Unigram-32K is a machine learning model from Tamazight. 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 SentencePiece. The card lists the license as apache-2.0.
Tifinizer-Unigram-32K is a custom tokenizer built using the Unigram algorithm via the SentencePiece library. It is specifically trained and optimized to process the Tamazight language using the Tifinagh script, featur…
Downloads · 30 days
0
Access
Public
Updated May 17, 2026
Repo size
703 KB
Likes
2
Public
Click a slice to open those files.
.vocab729 KB · 51%
From the Hugging Face model README
Tifinizer-Unigram-32K is a custom tokenizer built using the Unigram algorithm via the SentencePiece library. It is specifically trained and optimized to process the Tamazight language using the Tifinagh script, featuring a vocabulary size of 32,000 (32K) tokens.
This tokenizer serves as a foundational tool for Natural Language Processing (NLP) tasks involving Tamazight, streamlining the development of Large Language Models (LLMs) and Machine Translation systems.
You can easily integrate this tokenizer into your Python projects to process Tamazight text. Ensure you have the sentencepiece library installed and download the tokenizer.model file from this repository.
usage_example.py)import sentencepiece as spm
from huggingface_hub import hf_hub_download
# Download the tokenizer model directly from Hugging Face
model_path = hf_hub_download(repo_id="Tamazight/Tifinizer-Unigram-32K", filename="tokenizer.model")
# Load the tokenizer model
tokenizer = spm.SentencePieceProcessor()
tokenizer.load(model_path)
# Example usage
text = "ⴰⵣⵓⵍ ⴰⵎⴰⴹⴰⵍ! ⵡⴰ ⵉⴳⴰ ⵉⵔⵉⵎ ⵏ ⵓⵙⵙⵎⵔⵙ ⵏ ⵓⵙⵏⵉⴳⵍ ⵏ ⵓⵙⴽⴽⵉⵍ ⵏ ⵜⴼⵉⵏⴰⵖ"
tokens = tokenizer.encode(text, out_type=str)
decoded = tokenizer.decode(tokenizer.encode(text))
print(f"Text: {text}")
print(f"Tokens: {tokens}")
print(f"Decoded: {decoded}")