🇲🇳 NLLB-200 3.3B Mongolian (High-Precision Flagship Tier)
A state-of-the-art bidirectional neural machine translation model for Mongolian (Cyrillic) ↔ English, fine-tuned from Meta's NLLB-200 (3.3B) foundation model.
This model is the flagship translation engine of the Universal Open Mongolian AI Suite ("A Model for Every Machine"), delivering unparalleled grammatical accuracy, natural idioms, cultural proverbs, and modern technology/robotics terminology.
🌟 Key Highlights & Architectural Specs
- Massive 3.34 Billion Parameters:
- 24 Transformer encoder layers and 24 decoder layers with
d_model = 2048. - Unlocks deep linguistic comprehension, nuanced semantic disambiguation, and complex compound sentence rendering.
- 24 Transformer encoder layers and 24 decoder layers with
- Gold-Standard Boosted Parallel Corpus:
- Trained on 716,421 parallel pairs combining large-scale clean parallel corpora with 200× oversampled user-curated Gold Standards (covering everyday dialogue, proverbs, cloud/IT engineering, and robotics/AI).
- Validation loss reached
0.8452after 8,000 steps with 8-bit AdamW and LoRA across attention projections.
- Flawless Terminology & Cultural Preservation:
- Zero loanword calques or Russian grammatical artifacts (хотель ➔ зочид буудал, дурсамж ➔ санах ой).
- Natural honorifics, polite modal auxiliaries, and cultural proverbs.
- Standalone BFloat16 Weights:
- LoRA adapter weights fully fused into base weights via
merge_and_unload(). - Direct drop-in replacement with Hugging Face
transformersand CTranslate2.
- LoRA adapter weights fully fused into base weights via
📊 Benchmark & Translation Showdown
| English Input | Baseline / Generic Translation | NLLB-200 3.3B Mongolian | Linguistic Fidelity |
|---|---|---|---|
| "Where is the hotel?" | Хотель хаана байна? | Зочид буудал хаана байна вэ? | Russian loanword eliminated |
| "Good morning, how are you feeling today?" | Сайн өглөө, чи ямар байна? | Өглөөний мэнд, та өнөөдөр ямар байна? | Authentic greeting idiom |
| "The server crashed due to an out of memory error." | Сервер дурсамжгүй болж сүйрсэн | Санах ой дууссан тул сервер гацсан. | Correct IT terminology (RAM = санах ой) |
| "Random Access Memory (RAM)" | Санамсаргүй санах ой | Санамсаргүй нэвтрэх санах ой (RAM) | Exact technical translation |
| "We need to fix the bugs in the application before deploying to production." | ...алдаануудыг засах хэрэгтэй үйлдвэрлэлд... | Үйлдвэрлэлд нэвтрэхээс өмнө бид програмын алдааг засах хэрэгтэй. | Authentic professional Mongolian syntax |
| "God helps those who help themselves." | Өөртөө тусалдаг хүмүүст Бурхан... | Бурхан өөртөө тусалсан хүнд тусалдаг. | Authentic proverb formulation |
| "Can you help me assemble the robotic arm and calibrate the servo motors?" | Надад угсрах туслах уу... | Робот гар нийлүүлж, серво моторнуудыг тохируулахад надад туслахгүй юу? | Polite Mongolian request suffix (-хгүй юу?) |
| "Artificial intelligence is transforming modern robotics and automation across the world." | ...өөрчлөгдөж байна хиймэл оюун... | Хиймэл оюун ухаан нь дэлхий даяар орчин үеийн робот техник, автоматжуулалтыг өөрчилж байна. | Fluent, native formal Mongolian |
💻 Quick Start: Hugging Face Transformers
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_id = "Tsengel-mn/nllb-3.3b-mongolian"
print("Loading tokenizer and model...")
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSeq2SeqLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto"
)
def translate(text: str, source_lang: str = "en", target_lang: str = "mn") -> str:
lang_codes = {
"en": "eng_Latn",
"mn": "khk_Cyrl"
}
src_code = lang_codes[source_lang]
tgt_code = lang_codes[target_lang]
tokenizer.src_lang = src_code
inputs = tokenizer(text, return_tensors="pt").to(model.device)
forced_bos_token_id = tokenizer.convert_tokens_to_ids(tgt_code)
with torch.no_grad():
outputs = model.generate(
**inputs,
forced_bos_token_id=forced_bos_token_id,
max_new_tokens=128,
num_beams=4
)
return tokenizer.decode(outputs[0], skip_special_tokens=True)
# Test translation
print(translate("Artificial intelligence is transforming modern robotics and automation across the world."))
# Output: Хиймэл оюун ухаан нь дэлхий даяар орчин үеийн робот техник, автоматжуулалтыг өөрчилж байна.
⚡ High-Speed Inference with CTranslate2 INT8
For production deployment and low-latency CPU/GPU serving:
- Model repository:
Tsengel-mn/nllb-3.3b-mongolian-ct2-int8 - Compressed size: 3.2 GB
- Memory: Runs smoothly on 8GB VRAM GPUs or 8GB+ host RAM on CPU.
📜 Citation & Credits
- Fine-Tuning & Dataset Curation: Tsengel AI Language Team
- Base Architecture: Meta AI (No Language Left Behind: Scaling Human-Centered Machine Translation)
- License: CC-BY-NC-4.0