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.
NLLB-200 Model Variants: Which One to Choose?
| Variant | Parameters | VRAM | Speed | Best For |
|---|---|---|---|---|
| NLLB-200-54B MoE | 54.5B | 4x A100 80GB | Slow | Highest quality, research |
| NLLB-200-3.3B | 3.3B | 24GB (A10G) | Medium | Production with GPU |
| NLLB-200-1.3B | 1.3B | 8GB (consumer) | Fast | Single GPU inference |
| NLLB-200-distilled-600M | 600M | 4GB | Very fast | CPU or low-latency |
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: Frenchspa_Latn: Spanisharb_Arab: Arabicyor_Latn: Yorubawol_Latn: Wolofewe_Latn: Ewetwi_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
import ctranslate2
import transformers
translator = ctranslate2.Translator("nllb-200-ct2", device="cpu", inter_threads=4)
tokenizer = transformers.AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M")
tokenizer.src_lang = "eng_Latn"
source = tokenizer.tokenize("Machine learning is transforming healthcare.")
results = translator.translate_batch(
[source],
target_prefix=["fra_Latn"],
beam_size=4,
max_batch_size=32
)
translated = tokenizer.convert_tokens_to_string(results[0].hypotheses[0][1:])
print(translated)
Cost Comparison: NLLB-200 vs Google Translate API
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.

Comments
Have a question or something to add? Sign in to join the discussion.