Downloads · 30 days
0
andre15silva/pt-es-hi-tokenizer
pt-es-hi-tokenizer is a machine learning model from andre15silva. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A shared multilingual byte-level BPE tokenizer (GPT-2/Llama-3 style) for Portuguese, Spanish, and Hindi — one vocabulary, not per-language, intended for a single multilingual pre-training run rather than three separat…
Downloads · 30 days
0
Access
Public
Updated Jul 19, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json2.3 MB · 100%
From the Hugging Face model README
A shared multilingual byte-level BPE tokenizer (GPT-2/Llama-3 style) for Portuguese, Spanish, and Hindi — one vocabulary, not per-language, intended for a single multilingual pre-training run rather than three separate models.
<unk> fallback, which matters since the training corpus mixes Devanagari (Hindi) and Latin (Portuguese/Spanish) scripts.<|begin_of_text|>, <|end_of_text|>, <|pad|>, <|start_header_id|>/<|end_header_id|>/<|eot_id|>), so the tokenizer is chat-fine-tuning-ready without resizing the embedding table later.Trained on a MinHash-deduplicated corpus of pt-fineweb2, es-fineweb2, hi-fineweb2, and hi-sangraha (ai4bharat/sangraha's "verified" split), deduplicated per-language with datatrove (hi's two sources deduplicated against each other, not just internally).
from transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("andre15silva/pt-es-hi-tokenizer")
tok.encode("Olá, ¿cómo estás? नमस्ते")
Fertility (tokens/word, lower is better) and compression (bytes/token, higher is better) on a disjoint held-out sample:
| lang | fertility | compression |
|---|---|---|
| pt | 1.459 | 4.332 |
| es | 1.366 | 4.552 |
| hi | 3.247 | 3.951 |
| overall | 1.773 | 4.264 |
Hindi's fertility is notably higher than pt/es — consistent across every scale this was measured at (pilot, pre-dedup, and this final run), pointing to Hindi being comparatively data-starved in the training corpus rather than a tokenizer-vocab problem.