NLLB-200: Meta's No Language Left Behind Translation Model
NLLB-200 provides machine translation for 200 languages including 55 low-resource African languages, with a distilled 600M model that outperforms Google Translate on 40+ languages. Practical guide with code examples and cost comparison.
What Is NLLB-200? Meta's No Language Left Behind Explained
NLLB-200 (No Language Left Behind) is Meta AI's machine translation model that supports 200 languages, with a strong focus on low-resource languages. Released in 2022, it was the first model to achieve high-quality translation for languages like Ewe, Wolof, and Yoruba. The project involved building parallel corpora from scratch using web crawling and human validation, resulting in the FLORES-200 benchmark.
Why NLLB-200 Matters
Before NLLB-200, most translation systems covered only 50-100 languages, leaving billions of speakers without adequate tools. Meta's model democratizes access by providing open-source weights and a distilled version that runs on consumer hardware.
How NLLB-200 Works: Architecture and Training
NLLB-200 uses a transformer-based sequence-to-sequence architecture. The largest variant employs Mixture of Experts (MoE) with 54.5 billion parameters, but the distilled 600M model is the most practical for deployment.
Data Mining and Parallel Corpora
Meta developed a data mining pipeline that:
Crawls web content in 200 languages
Detects language pairs using a language identification model
Aligns sentences using LASER embeddings
Filters low-quality pairs with a bilingual dictionary
For low-resource languages, they supplemented mined data with human translations and Bible translations.
Training Details
The model was trained on 1,000 GPU-days using 256 NVIDIA A100 GPUs. It uses a SentencePiece tokenizer with a vocabulary of 256K tokens. The training objective is label-smoothed cross-entropy with temperature sampling to balance high- and low-resource languages.
// stay current
AI & ML insights, weekly
Practical deep-dives on LLMs, developer tools, and AI engineering. No filler. Unsubscribe any time.
// written byFIG. AUTH-01
530
Mahmudul Haque Qudrati
CEO & ML Engineer
CEO and ML Engineer at Pristren. Builds AI-powered software for teams and writes about machine learning, LLMs, developer tools, and practical AI applications.
The distilled 600M model is the sweet spot for most applications. It achieves 80% of the quality of the 3.3B model while being 5x faster and running on CPU.
How to Use NLLB-200 with Python (Transformers)
Here's a complete example using Hugging Face Transformers:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
model_name = "facebook/nllb-200-distilled-600M"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
def translate(text: str, src_lang: str, tgt_lang: str) -> str:
"""
Language codes: eng_Latn, fra_Latn, arb_Arab, yor_Latn, etc.
Full list: https://github.com/facebookresearch/flores/blob/main/flores200/README.md
"""
tokenizer.src_lang = src_lang
inputs = tokenizer(text, return_tensors="pt")
forced_bos_token_id = tokenizer.lang_code_to_id[tgt_lang]
translated_tokens = model.generate(
**inputs,
forced_bos_token_id=forced_bos_token_id,
max_length=512,
num_beams=4,
early_stopping=True
)
return tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
# Example: English to French
print(translate("Hello, world!", "eng_Latn", "fra_Latn"))
# Output: Bonjour, le monde !
# Example: English to Yoruba
print(translate("How are you?", "eng_Latn", "yor_Latn"))
# Output: Bawo ni o se wa?
Language Codes Reference
NLLB-200 uses BCP-47 codes with script tags. Common examples:
eng_Latn: English (Latin script)
fra_Latn: French
spa_Latn: Spanish
arb_Arab: Arabic
yor_Latn: Yoruba
wol_Latn: Wolof
ewe_Latn: Ewe
twi_Latn: Twi
Accelerating NLLB-200 with CTranslate2
For production, use CTranslate2 to achieve 2-5x speedup over PyTorch:
# Install dependencies
pip install ctranslate2 transformers
# Convert model to CTranslate2 format
ct2-transformers-converter --model facebook/nllb-200-distilled-600M --output_dir nllb-200-ct2 --force
For a SaaS product translating 50 million characters per month:
Service
Cost/Month
Notes
Google Translate API
$1,000
$20 per 1M chars, no infrastructure
NLLB-200 self-hosted (c5.2xlarge)
~$200
8 vCPU, 16GB RAM, handles load on CPU
NLLB-200 self-hosted (GPU)
~$400
A10G, lower latency
NLLB-200 is 5x cheaper at scale. For low-resource languages, quality often exceeds Google Translate because NLLB-200 was specifically trained on those languages.
Best Practices for NLLB-200
Use the distilled 600M model for most applications. It's fast, small, and high-quality.
Pre-convert to CTranslate2 for production inference. Reduces latency by 2-5x.
Batch translations to maximize throughput. The model supports dynamic batching.
Set max_length appropriately. For short sentences, 128 is enough; for paragraphs, 512.
Use beam search with beam=4 for better quality, or greedy decoding for speed.
Monitor language detection. NLLB-200's language identification may misclassify similar languages.
NLLB-200 vs Other Models
Model
Languages
Quality
Speed
Cost
NLLB-200-distilled-600M
200
High (especially low-resource)
Fast
Free (self-host)
Google Translate
133
High (high-resource)
Very fast
Paid
M2M-100
100
Medium
Medium
Free
OPUS-MT
1000+ pairs
Variable
Fast
Free
NLLB-200 excels where other models fail: low-resource African languages. For English-French, Google Translate may be slightly better, but for Yoruba-English, NLLB-200 is the clear winner.
Is NLLB-200 Worth It in 2025?
Absolutely. The model remains state-of-the-art for low-resource languages and is cost-effective for high-volume translation. Meta continues to support the model, and the open-source community has built tools for fine-tuning and deployment. If your application needs broad language coverage without vendor lock-in, NLLB-200 is the best choice.
Common Pitfalls and How to Avoid Them
Tokenization mismatch: Always use the NLLB-200 tokenizer, not a generic one.
Language code errors: Double-check codes from the FLORES-200 list.
Memory issues: The 3.3B model requires 24GB VRAM; use the 600M for limited hardware.
Quality degradation on very long texts: Split into paragraphs of <512 tokens.
Conclusion
NLLB-200 is a powerful, open-source translation model that covers 200 languages with state-of-the-art quality for low-resource languages. The distilled 600M variant makes it accessible for developers, and self-hosting reduces costs compared to cloud APIs. Use the code examples above to get started, and consider CTranslate2 for production workloads.
Frequently Asked Questions
What is NLLB-200: Meta's No Language Left Behind Translation Model?
NLLB-200 is Meta AI's machine translation model that supports 200 languages, including 55 low-resource African languages like Ewe, Wolof, and Yoruba. It was trained on a large parallel corpus mined from the web and validated by human translators. The model is open-source and available in several sizes, with the distilled 600M version being the most practical for developers.
How does NLLB-200: Meta's No Language Left Behind Translation Model work?
NLLB-200 uses a transformer-based sequence-to-sequence architecture. It tokenizes input text using a SentencePiece tokenizer, encodes it, and generates translations autoregressively. The model was trained with a data mining pipeline that crawled web content, detected language pairs, and aligned sentences using LASER embeddings. For low-resource languages, additional human translations were used.
What are the best practices for NLLB-200: Meta's No Language Left Behind Translation Model?
Best practices include: using the distilled 600M model for most applications; converting to CTranslate2 for 2-5x faster inference; batching translations for higher throughput; setting appropriate max_length (128 for short sentences, 512 for paragraphs); using beam search with beam=4 for quality; and monitoring language detection to avoid misclassification.
How much does NLLB-200: Meta's No Language Left Behind Translation Model cost?
NLLB-200 is free and open-source. The only cost is infrastructure for self-hosting. For example, a c5.2xlarge AWS instance (8 vCPU, 16GB RAM) costs about $200/month and can handle 50 million characters per month on CPU. In contrast, Google Translate API would cost $1,000/month for the same volume.
Is NLLB-200: Meta's No Language Left Behind Translation Model worth it in 2025?
Yes, NLLB-200 remains highly relevant in 2025. It offers state-of-the-art quality for low-resource languages, is cost-effective for high-volume translation, and avoids vendor lock-in. The open-source community continues to support it with tools for fine-tuning and deployment. For applications requiring broad language coverage, it's an excellent choice.
How does NLLB-200 compare to Google Translate?
NLLB-200 matches or exceeds Google Translate on low-resource African languages where Google has limited coverage. On major European languages, Google Translate may be slightly better. However, NLLB-200 is free and self-hosted, making it 5x cheaper at scale. For a fair comparison, test both on your specific language pairs.
What languages does NLLB-200 support?
NLLB-200 supports 200 languages, including 55 low-resource African languages (e.g., Yoruba, Wolof, Ewe, Twi), major European languages (English, French, Spanish, German), Asian languages (Chinese, Japanese, Arabic, Hindi), and many others. The full list is available in the FLORES-200 benchmark repository.