NLLB English-Myanmar Translation Model (Fine-tuned)
An English-to-Myanmar translation model, fine-tuned from NLLB-200, explored for potential application in workplace-safety communication (e.g., for the Myanmar migrant worker community in Singapore).
Model Description
This model fine-tunes facebook/nllb-200-distilled-600M on a general-domain English-Myanmar parallel corpus. It was not trained on a dedicated workplace-safety dataset — it is a general-purpose translation model that was evaluated using workplace-safety example sentences to assess its potential fit for that use case.
Training Details
Base model: facebook/nllb-200-distilled-600M (0.6B parameters)
Early stopping (patience = 2 epochs on validation loss)
Max epochs: 10 (best result at epoch 7)
Hardware: Google Colab (T4 GPU)
Best checkpoint: Epoch 7, validation loss 0.680
Evaluation Results
Evaluated on a random sample of 100 sentences from the ALT test split (not the full 1,017-sentence test set).
Metric
Score
Notes
Custom character-level BLEU*
58.93
Sentences split into individual characters before scoring with sacrebleu — not standard word-level BLEU
chrF
53.05
Standard sacrebleu chrF implementation
*Standard word-level BLEU on this same sample was ~11.6 — the large gap reflects Myanmar word-segmentation mismatches with sacrebleu's default tokenizer, not a difference in translation quality. chrF and the custom character-level score are reported because they are more appropriate for Myanmar script.
Training Pipeline
ALT Dataset → Data Cleaning (null/empty filtering) → NLLB Tokenization (eng_Latn / mya_Mymr)
→ Fine-tuning (early stopping + LR scheduling) → Validation → Best Checkpoint Selection → Hugging Face Upload
Usage
python
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
23tokenizer = AutoTokenizer.from_pretrained("KyawSu/nllb-en-my-workplace-safety")4model = AutoModelForSeq2SeqLM.from_pretrained("KyawSu/nllb-en-my-workplace-safety")56deftranslate(text):7 tokenizer.src_lang ="eng_Latn"8 inputs = tokenizer(text, return_tensors="pt")9 forced_bos_token_id = tokenizer.convert_tokens_to_ids("mya_Mymr")10 generated_tokens = model.generate(**inputs, forced_bos_token_id=forced_bos_token_id, max_length=128)11return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]1213print(translate("Please wear your safety helmet at all times on the construction site."))
Example output (actually generated by this model):
Input: Please wear your safety helmet at all times on the construction site.
Output: ကျေးဇူးပြု၍ ဆောက်လုပ်ရေး လုပ်ငန်းခွင် တွင် အချိန်တိုင်း တွင် သင် ၏ လုံခြုံရေး ဦးထုပ် ကို ဝတ်ဆင်ပါ ။
Intended Use
This is a portfolio/demonstration project. It is not validated for production or safety-critical deployment.
⚠️ Important limitations:
Trained on general news-domain text (ALT), not workplace-safety-specific text
Not validated by professional or native Myanmar translators
Not checked against official Singapore MOM (Ministry of Manpower) terminology standards
Evaluation used a 100-sentence sample, not the full test set
Any real-world safety communication use would require review and correction by a qualified native Myanmar speaker, given the risk of mistranslation in safety-critical contexts.
Author
Built as an NLP portfolio project exploring English-Myanmar translation, with an eye toward eventual application for the Myanmar migrant worker community in Singapore.