CoolFace
Modelpublic

savinugunarathna/mT5-Singlish-Sinhala-Merged

sourceHugging Facemitupdated 7mo agoView on Hugging Face
0likes10downloads
Model Card

mT5 — Singlish → Sinhala Transliteration

Fine-tuned version of google/mt5-base for the task of Singlish-to-Sinhala transliteration, developed as part of the IndoNLP 2025 Shared Task on Singlish–Sinhala Transliteration.

This is the merged (LoRA weights absorbed) final model.


Task

Singlish (romanised colloquial Sinhala) → Sinhala script transliteration.

Input (Singlish)Output (Sinhala)
mama giyaමම ගිය
kohomadaකොහොමද

Training Pipeline

Trained using a three-phase curriculum strategy with LoRA, using the same pipeline as the Small100 variant, adapted for the mT5 architecture.

Data

SplitSourceSize
Phase 1 & 2 trainingphonetic_train_1M.csv1,000,000 samples
Adhoc fine-tuningadhoc.csv11,937 samples
Phonetic validationphonetic_test.csv10,003 samples
Adhoc validationadhoc_test.csv5,003 samples

Synthetic Augmentation

Adhoc data was expanded with a rule-based Singlish augmenter:

  • —Vowel dropping — randomly drops non-boundary vowels
  • —Cluster simplification — collapses common digraphs (th→t, sh→s, nd→n, etc.)
  • —Vowel swapping — substitutes phonetically similar vowels (a↔e, i↔e, o↔u)

Aggression factor: 0.5. Applied at 15% / 20% / 15% across the three phases.

Input Prefix

Inputs are prefixed with transliterate: at inference time, consistent with T5-style task conditioning.

Three-Phase Curriculum

PhaseDataEpochsLRValidationAug
1 — Foundation65% of phonetic train (~650K)21e-4Phonetic15%
2 — ExpansionRemaining phonetic + 5× adhoc + 80K replay25e-5Adhoc20%
3 — Mastery10× adhoc + 200K phonetic mix22e-5Adhoc15%

LoRA Configuration

ParameterValue
Rank (r)64
Alpha128
Dropout0.05
Target modulesq_proj, k_proj, v_proj, out_proj, fc1, fc2

Training Arguments

ParameterValue
Batch size8
Gradient accumulation4 (effective batch: 32)
Weight decay0.01
Max grad norm1.0
Warmup ratio0.03
OptimizerAdamW fused
Precisionbfloat16 / fp16

Evaluation Results

Test SetCER ↓WER ↓BLEU ↑BERTScore ↑
Phonetic0.04780.17640.62130.9897
Adhoc0.10340.30150.42230.9861
BERTScore computed using Ransaka/sinhala-bert-medium-v2.

Usage

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model_id = "savinugunarathna/mT5-Singlish-Sinhala-Merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)

inputs = tokenizer("transliterate: mama giya", return_tensors="pt")
outputs = model.generate(
    **inputs,
    num_beams=4,
    max_length=128,
    length_penalty=1.2,
    repetition_penalty=1.2,
    no_repeat_ngram_size=3,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
# → මම ගිය
Note: Always prepend transliterate: to inputs. Suppressing <extra_id_N> tokens via bad_words_ids is recommended for clean output.