Downloads · 30 days
180
33% of all-time downloads
olob0/nllb-200-distilled-600M-ct2-int8_float16
nllb-200-distilled-600M-ct2-int8_float16 is a translation model from olob0. Use it when you need text moved from one language to another. It is set up for ctranslate2. The card lists the license as cc-by-nc-4.0.
facebook/nllb-200-distilled-600M converted to the CTranslate2 format and quantised to int8float16. The same model, 0.6 GB instead of 2.5 GB, and it loads without a conversion step.
Downloads · 30 days
180
33% of all-time downloads
All-time downloads
544
Public
Repo size
642 MB
Likes
0
Public
Click a slice to open those files.
.bin620 MB · 96%
From the Hugging Face model README
facebook/nllb-200-distilled-600M converted to the CTranslate2 format and quantised to int8_float16. The same model, 0.6 GB instead of 2.5 GB, and it loads without a conversion step.
The tokenizer files are included, so nothing else has to be downloaded.
import ctranslate2
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer
path = snapshot_download("olob0/nllb-200-distilled-600M-ct2-int8_float16")
tokenizer = AutoTokenizer.from_pretrained(path)
translator = ctranslate2.Translator(path, device="cuda", compute_type="int8_float16")
tokenizer.src_lang = "por_Latn"
tokens = tokenizer.convert_ids_to_tokens(tokenizer("Bom dia.").input_ids)
result = translator.translate_batch([tokens], target_prefix=[["eng_Latn"]])
print(tokenizer.decode(tokenizer.convert_tokens_to_ids(result[0].hypotheses[0][1:])))
The target language goes in as a decoder prefix, and the first output token is that same language code, which is why it is dropped before decoding.
ct2-transformers-converter --model facebook/nllb-200-distilled-600M \
--quantization int8_float16 --output_dir nllb-200-distilled-600M-ct2-int8_float16 \
--copy_files tokenizer.json tokenizer_config.json special_tokens_map.json sentencepiece.bpe.model
CC-BY-NC-4.0, inherited from the original model. Non-commercial use only. Original work by Meta AI, this is a format conversion of it.