nllb-200-distilled-1.3B-ct2
This is a CTranslate2 conversion of facebook/nllb-200-distilled-1.3B. The weights come directly from the original model with no additional training or fine-tuning — only format conversion and quantization for faster inference.
Purpose
This conversion was created for a real-time live-captioning application that runs on CPU. Converting to CTranslate2 with int8 quantization significantly reduces model size and inference latency compared to the original Transformers checkpoint, making it practical for real-time translation without a GPU.
Conversion
Converted using the official ctranslate2 conversion tool:
pip install ctranslate2 transformers
ct2-transformers-converter --model facebook/nllb-200-distilled-1.3B \
--output_dir nllb-200-distilled-1.3B-ct2 \
--quantization int8
Usage
import ctranslate2
import transformers
translator = ctranslate2.Translator("nllb-200-distilled-1.3B-ct2")
tokenizer = transformers.AutoTokenizer.from_pretrained(
"facebook/nllb-200-distilled-1.3B", src_lang="eng_Latn"
)
source = tokenizer.convert_ids_to_tokens(tokenizer.encode("Hello, world!"))
target_prefix = [tokenizer.lang_code_to_token["zho_Hant"]]
results = translator.translate_batch([source], target_prefix=[target_prefix])
target = results[0].hypotheses[0][1:]
print(tokenizer.decode(tokenizer.convert_tokens_to_ids(target)))
License
This inherits the original model's license: CC-BY-NC-4.0 (non-commercial use only). All rights to the model weights and training belong to the original authors, Meta AI / the NLLB Team. This repository only provides a converted inference format.