NLLB-200 Distilled 600M (CTranslate2) - fast translation for 200 languages
2 min readupdated
This repository contains an optimized version of the well-known language model facebook/nllb-200-distilled-600M converted to the CTranslate2 format (float16) without additional fine-tuning. The model is designed for fast machine translation between 200 languages and is used in the Live Trans project as an optional Japanese-to-English translator. The new version allows running inference with lower memory consumption and higher speed on supported hardware. It is suitable for developers, researchers, and anyone who needs a local tool for translating rare or popular languages.
Key features
- Optimized for CTranslate2 (float16) to speed up work and reduce VRAM consumption.
- Support for translation between 200 languages using FLORES-200 codes.
- Precise preservation of the tokenizer and weights of the original model from Meta AI.
- Ready-to-use integration with Python libraries for fast deployment.
What you can do
- Run a local text translation service using the ctranslate2 library on CPU or GPU.
- Integrate the model into custom translators, bots, or applications for processing texts in various languages.
- Use it in research work to translate sentences within the supported token limit.
Example
import ctranslate2
from huggingface_hub import snapshot_download
from tokenizers import Tokenizer, processors
path = snapshot_download("wew571/nllb-200-distilled-600M")
tokenizer = Tokenizer.from_file(f"{path}/tokenizer.json")
tokenizer.post_processor = processors.TemplateProcessing(
single="jpn_Jpan $A ",
special_tokens=[("jpn_Jpan", tokenizer.token_to_id("jpn_Jpan")), ("", tokenizer.token_to_id(""))],
)
translator = ctranslate2.Translator(path, device="cpu")
tokens = tokenizer.encode("こんにちは。私はAIです。").tokens
result = translator.translate_batch([tokens], target_prefix=[[ "eng_Latn"]])
ids = [tokenizer.token_to_id(token) for token in result[0].hypotheses[0]]
print(tokenizer.decode(ids, skip_special_tokens=True))
Read more
Details• Benchmarks: Evaluated using BLEU, spBLEU, and chrF++ metrics.
• Limitations: The model is for research, not intended for commercial use (CC BY-NC 4.0 license), and not focused on medical or legal texts.
• Requirements: Input sequence length limit is no more than 512 tokens.
• Details: Original weights converted to float16 without fine-tuning.










Comments