Instructions to use Neobe/dhivehi-en-byt5-large-sentence with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neobe/dhivehi-en-byt5-large-sentence with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "translation" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("translation", model="Neobe/dhivehi-en-byt5-large-sentence")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Neobe/dhivehi-en-byt5-large-sentence") model = AutoModelForSeq2SeqLM.from_pretrained("Neobe/dhivehi-en-byt5-large-sentence", device_map="auto") - Notebooks
- Google Colab
- Kaggle
byT5-large Dhivehi→English (sentence-level)
byT5-large (1.2B, byte-level encoder-decoder) for Dhivehi→English translation, trained on a sentence-level Dhivehi–English corpus (machine-translated).
Byte-level single-sentence model — do not feed multi-sentence input (it collapses on paragraphs). For multi-sentence input, see the paragraph models: Qwen-para / mT5-para. Single-sentence input only.
Scores (chrF / chrF++ / BLEU)
| Benchmark | chrF | chrF++ | BLEU |
|---|---|---|---|
| gold (human references, article-level, N=500) | 42.27 | 39.16 | 9.74 |
| held-out chunk (in-distribution) | 40.61 | 39.1 | 16.35 |
| held-out sentence (in-distribution) | 57.31 | 55.39 | 31.84 |
chrF is the metric to trust for Thaana; BLEU is unreliable (word segmentation / morphology).
Example
Input (dv): އެއީ، މިދިޔަ އަހަރުގެ މި މުއްދަތާ ބަލާއިރު، 7.6 އިންސައްތައިގެ ކުރިއެރުމެއް ކަމަށްވާއިރު، ދުވާލަކަށް 7،778 ފަތުރުވެރިން ރާއްޖެ ޒިޔާރަތްކުރެއެވެ.
Output (en): That is, compared to this period last year, which is a 7.6 percent increase, and 7,778 tourists visit the Maldives per day.
Real held-out sample and this model's own output.
Usage
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
m = "Neobe/dhivehi-en-byt5-large-sentence"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForSeq2SeqLM.from_pretrained(m, torch_dtype=torch.float32).eval().cuda() # fp32
src = "ދިވެހިރާއްޖޭގެ ރައީސް މިއަދު ކެބިނެޓާ ބައްދަލުކުރެއްވި އެވެ."
inp = tok(src, return_tensors="pt", truncation=True, max_length=1024).to("cuda")
out = model.generate(**inp, max_new_tokens=256, num_beams=4)
print(tok.decode(out[0], skip_special_tokens=True))
Training
Base google/byt5-large; fp32; Adafactor; LR 1e-4 cosine; max_length 1024; 1 epoch; effective batch ~32; gradient checkpointing.
Limitations
Domain = Maldivian news / press / Wikipedia; technical or informal English is out of distribution. Non-human references are machine-generated (distillation). This byte-level model is single-sentence only.
Citation
@misc{neobe_dhivehi_en_byt5_large_sentence_2026,
title = {byT5-large Dhivehi→English (sentence-level)},
author = {Neobe},
year = {2026},
howpublished = {\url{https://huggingface.co/Neobe/dhivehi-en-byt5-large-sentence}}
}
- Downloads last month
- 4
Model tree for Neobe/dhivehi-en-byt5-large-sentence
Base model
google/byt5-large