Downloads · 30 days
12
15% of all-time downloads
KyawSu/nllb-en-my-workplace-safety
nllb-en-my-workplace-safety is a translation model from KyawSu. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
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).
Downloads · 30 days
12
15% of all-time downloads
All-time downloads
78
Public
Parameters
615M
2.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
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).
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.
reduce_lr_on_plateau schedulerEvaluated 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.
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
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("KyawSu/nllb-en-my-workplace-safety")
model = AutoModelForSeq2SeqLM.from_pretrained("KyawSu/nllb-en-my-workplace-safety")
def translate(text):
tokenizer.src_lang = "eng_Latn"
inputs = tokenizer(text, return_tensors="pt")
forced_bos_token_id = tokenizer.convert_tokens_to_ids("mya_Mymr")
generated_tokens = model.generate(**inputs, forced_bos_token_id=forced_bos_token_id, max_length=128)
return tokenizer.batch_decode(generated_tokens, skip_special_tokens=True)[0]
print(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: ကျေးဇူးပြု၍ ဆောက်လုပ်ရေး လုပ်ငန်းခွင် တွင် အချိန်တိုင်း တွင် သင် ၏ လုံခြုံရေး ဦးထုပ် ကို ဝတ်ဆင်ပါ ။
This is a portfolio/demonstration project. It is not validated for production or safety-critical deployment.
⚠️ Important limitations:
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.
Built as an NLP portfolio project exploring English-Myanmar translation, with an eye toward eventual application for the Myanmar migrant worker community in Singapore.