Downloads · 30 days
7
3% of all-time downloads
Xeolex/nllb-dhivehi-english-cleaned-best
nllb-dhivehi-english-cleaned-best is a translation model from Xeolex. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of facebook/nllb-200-distilled-600M for bidirectional translation between Dhivehi Latin script (divLatn) and English (engLatn).
Downloads · 30 days
7
3% of all-time downloads
All-time downloads
212
Public
Parameters
615M
1.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 97%
From the Hugging Face model README
This model is a fine-tuned version of facebook/nllb-200-distilled-600M for bidirectional translation between Dhivehi Latin script (div_Latn) and English (eng_Latn).
| Attribute | Value |
|---|---|
| Base Model | facebook/nllb-200-distilled-600M |
| Parameters | 615M |
| Architecture | M2M100 (Encoder-Decoder) |
| Language Pairs | div_Latn ↔ eng_Latn |
| Fine-tuning | Full model (no LoRA) |
| Precision | bfloat16 |
The model was trained using a length-based curriculum approach, starting with short sequences (16 tokens) and progressively increasing to longer sequences (up to 512 tokens).
| Bucket | Max Length | Batch | Epochs | LR | Eval Loss | Time |
|---|---|---|---|---|---|---|
| 16 | 16 | 64 | 4 | 5e-5 | 2.75 | 26 min |
| 32 | 32 | 48 | 4 | 4e-5 | 3.99 | 22 min |
| 64 | 64 | 32 | 3 | 3e-5 | 3.98 | 22 min |
| 128 | 128 | 16 | 3 | 2e-5 | 4.23 | 22 min |
| 256 | 256 | 8 | 2 | 1.5e-5 | 4.16 | 6 min |
| 512 | 512 | 4 | 1 | 1e-5 | 5.76 | 2 min |
Total training time: ~2 hours on NVIDIA RTX PRO 6000 Blackwell (96 GB VRAM)
Final dataset: ~527K rows (down from ~940K after cleaning)
model= argumentfrom transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model = AutoModelForSeq2SeqLM.from_pretrained(
"nllb-dhivehi-english-cleaned-best",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("nllb-dhivehi-english-cleaned-best")
# Dhivehi → English
text = "shukuriyaa"
tokenizer.src_lang = "div_Latn"
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, forced_bos_token_id=256047)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# English → Dhivehi
text = "thank you"
tokenizer.src_lang = "eng_Latn"
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, forced_bos_token_id=256204)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
python -c "
from transformers import pipeline
translator = pipeline('translation', model='nllb-dhivehi-english-cleaned-best', src_lang='div_Latn', tgt_lang='eng_Latn')
print(translator('shukuriyaa'))
"
| Language | Code | Token ID |
|---|---|---|
| Dhivehi (Latin) | div_Latn | 256204 |
| English | eng_Latn | 256047 |
| Source | Translation |
|---|---|
shukuriyaa | Thankful |
thank you | thenkurugai |
fish market | fishaa marukaathugai |
what is your name | namaagai |
The country's economy continues to grow steadily | (from Dhivehi) |
⚠️ Sentence-level translation is weak. The model struggles with:
kurumash kurumash...)Root causes identified:
Best use case: Word-level and short phrase translation. For sentences, the model needs more high-quality training data.
| File | Size |
|---|---|
| model.safetensors | 1.23 GB |
| tokenizer.json | 32.2 MB |
| config.json | ~1 KB |
@misc{nllb2022,
title = {No Language Left Behind: Scaling Human-Centered Machine Translation},
author = {NLLB Team, Meta AI},
year = {2022}
}
MIT