Neobe's picture
Update model card (citations)
a46b7ab verified
|
Raw
History Blame Contribute Delete
2.81 kB
metadata
language:
  - dv
  - en
pipeline_tag: translation
library_name: transformers
license: apache-2.0
base_model: google/mt5-large
tags:
  - dhivehi
  - thaana
  - maldives
  - translation
metrics:
  - chrf

mT5-large English→Dhivehi (sentence-level)

mT5-large (1.2B, encoder-decoder) for English→Dhivehi translation, trained on a sentence-level Dhivehi–English corpus (machine-translated).

Sentence-level variant. For multi-sentence input, see the paragraph models: Qwen-para / mT5-para. Suited for single-sentence input.

Scores (chrF / chrF++ / BLEU)

Benchmark chrF chrF++ BLEU
gold (human references, article-level, N=500) 50.47 42.17 4.46
held-out chunk (in-distribution) 71.97 64.85 24.77
held-out sentence (in-distribution) 68.72 61.82 22.96

chrF is the metric to trust for Thaana; BLEU is unreliable (word segmentation / morphology).

Example

Input (en): While this is a 7.6 percent increase compared to the same period last year, an average of 7,778 tourists visit the Maldives daily.

Output (dv): މިއީ މިދިޔަ އަހަރުގެ މި މުއްދަތާ އަޅާބަލާއިރު 7.6 އިންސައްތައިގެ ކުރިއެރުމެއް ކަމަށްވާއިރު، ދުވާލަކު އެވްރެޖްކޮށް 7،778 ފަތުރުވެރިން ރާއްޖެ ޒިޔާރަތްކުރެއެވެ.

Real held-out sample and this model's own output.

Usage

import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

m = "Neobe/en-dhivehi-mt5-large-sentence"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForSeq2SeqLM.from_pretrained(m, torch_dtype=torch.float32).eval().cuda()  # fp32

src = "The President of the Maldives met with the cabinet today."
inp = tok(src, return_tensors="pt", truncation=True, max_length=1024).to("cuda")
out = model.generate(**inp, max_new_tokens=512, num_beams=4, length_penalty=1.0, no_repeat_ngram_size=0)
print(tok.decode(out[0], skip_special_tokens=True))

Run in fp32 — the T5 family produces garbage in bf16/fp16. ~5–6 GB VRAM.

Training

Base google/mt5-large; fp32; Adafactor; LR 1e-4 cosine; max_length 512; 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).

Citation

@misc{neobe_en_dhivehi_mt5_large_sentence_2026,
  title  = {mT5-large English→Dhivehi (sentence-level)},
  author = {Neobe},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/Neobe/en-dhivehi-mt5-large-sentence}}
}