Downloads · 30 days
8
9% of all-time downloads
Oyunbat26/mongolian-en-mn-translator
mongolian-en-mn-translator is a translation model from Oyunbat26. Use it when you need text moved from one language to another. The card lists the license as cc-by-nc-4.0.
Fine-tune of facebook/nllb-200-distilled-600M for English-to-Mongolian translation, specialized on human rights terminology.
Downloads · 30 days
8
9% of all-time downloads
All-time downloads
87
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
Fine-tune of facebook/nllb-200-distilled-600M for English-to-Mongolian translation, specialized on human rights terminology.
eng_Latnkhk_Cyrl (NLLB/FLORES-200 code for Halh Mongolian; note this is not mon_Cyrl, which does not exist in NLLB's vocabulary)~4,000 professionally translated EN-MN sentence pairs from human rights reports and legal documents, deduplicated and split 80/10/10 into train/val/test.
| Metric | Score |
|---|---|
| BLEU (sacrebleu) | 17.56 |
| chrF | 47.39 |
from transformers import AutoModelForSeq2SeqLM
from transformers.models.nllb.tokenization_nllb import NllbTokenizer
model_id = "Oyunbat26/mongolian-en-mn-translator"
tokenizer = NllbTokenizer.from_pretrained(model_id, src_lang="eng_Latn", tgt_lang="khk_Cyrl")
model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
model.generation_config.forced_bos_token_id = tokenizer.convert_tokens_to_ids("khk_Cyrl")
inputs = tokenizer("Human rights are universal.", return_tensors="pt")
output = model.generate(**inputs, max_length=128, num_beams=4)
print(tokenizer.batch_decode(output, skip_special_tokens=True)[0])