M2M-100 418M, CTranslate2 int8
M2M-100 418M converted for CTranslate2 with int8 weights, for the CPU. Used by the myDubber local backend as its simple translator: the Light profile's only translator, and what translates a phrase the LLM failed on in the other profiles.
Built from facebook/m2m100_418M at commit 55c2e61bbf05dfb8d7abccdc3fae6fc8512fd636 by
model_builds/m2m100.py
(dubber): ct2-transformers-converter --quantization int8 (ctranslate2 4.8.3, transformers
5.17.0), sentencepiece.bpe.model copied from the source. The weights are modified:
converted to CTranslate2's layout and quantized to int8 (per-row absmax, CTranslate2's own); nothing was trained.
import ctranslate2, sentencepiece
sp = sentencepiece.SentencePieceProcessor(model_file="<this repo>/sentencepiece.bpe.model")
translator = ctranslate2.Translator("<this repo>", device="cpu", compute_type="int8")
tokens = ["__en__", *sp.encode("Wait, did you see that?", out_type=str), "</s>"]
out = translator.translate_batch([tokens], target_prefix=[["__de__"]])[0].hypotheses[0]
print(sp.decode(out[1:]))
model.bin: 0.46 GB, sha256 590e9c7e229e84de8affe7b15487660a286d3d76e44a4ca10e33099b198d9a76
Licence
MIT, as the original (copy in LICENSE). Copyright of the weights: Meta AI (Facebook AI Research, the fairseq
M2M-100 release).