CoolFace
Modelpublic

Neobe/dhivehi-byt5-latin2thaana-v1

sourceHugging Faceapache-2.0updated 8mo agoView on Hugging Face
0likes20downloads
Model Card

Dhivehi ByT5 Latin to Thaana (v1)

This model is a specialized Latin-to-Thaana transliteration model optimized for Maldives news media, but also capable of handling both formal journalistic text and casual social media typing.

It functions as a "Hybrid" model: it respects the casual spacing of chat messages while correctly applying formal grammatical rules (such as compounding verbs) when it detects a news context.

🧠 Training Strategy

  1. 1.Base Model: google/byt5-small
  2. 2.General Fine-tuning: Tuned on the alakxender/dhivehi-transliteration-pairs dataset (~150k pairs) to learn general phonetics and spelling.
  3. 3.Domain Adaptation: Further fine-tuned on a high-quality dataset of 10k News headlines to recognize formal entities and apply correct grammatical spacing for official terms.

📊 Performance Samples

CategoryLatin InputModel Output
Formal GrammarRaeesul jumhooriyya... thasdheegu kuravvaifiރައީސުލް ޖުމްހޫރިއްޔާ... ތަސްދީގުކުރައްވައިފި
Casual / ChatAharen miadhu varah ban'du haiއަހަރެން މިއަދު ވަރަށް ބަނޑުހައި
Official TitlesMinister of Foreign Affairs Moosa Zameerމިނިސްޓަރު އޮފް ފޮރިން އެފެއާސް މޫސަ ޒަމީރު
News PhrasingPolice service in vanee ekan kuhveri kohfaޕޮލިސް ސާވިސްއިން ވަނީ އެކަން ކުށްވެރިކޮށްފައި

💻 Usage

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("Neobe/dhivehi-byt5-latin2thaana-v1")
model = AutoModelForSeq2SeqLM.from_pretrained("Neobe/dhivehi-byt5-latin2thaana-v1")

text = "Raeesul jumhooriyya miadhu ganoonu thasdheegu kuravvaifi"
inputs = tokenizer(text, return_tensors="pt")

outputs = model.generate(**inputs, max_length=256)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# Output: ރައީސުލް ޖުމްހޫރިއްޔާ މިއަދު ގާނޫނު ތަސްދީގުކުރައްވައިފި