opus-mt-tc-big-zls-en, converted to CTranslate2 (int8)
South Slavic → English, including Macedonian, converted to run on a phone.
A straight conversion of
Helsinki-NLP/opus-mt-tc-big-zls-en
with ctranslate2.converters.transformers --quantization int8. No retraining and no
fine-tuning: the weights are Helsinki's work, quantised so a phone can hold them.
Why it exists
No CTranslate2 build of this model was published. It is used by Kiwaro to translate Macedonian on device, where nothing leaves the phone.
Measured
Twelve FLEURS sentences matched by id across languages, decoded on an iPhone 17e at int8:
| Macedonian → English | chrF |
|---|---|
opus-mt-mk-en (the smaller dedicated pair, 145 MB) | 65.7 |
| this model (230 MB) | 69.9 |
Use
import ctranslate2, sentencepiece as spm
translator = ctranslate2.Translator(".", compute_type="int8")
source = spm.SentencePieceProcessor("source.spm")
target = spm.SentencePieceProcessor("target.spm")
tokens = source.encode("Обединетите нации се надеваат.", out_type=str) + ["</s>"]
result = translator.translate_batch([tokens], beam_size=4, no_repeat_ngram_size=3)
print(target.decode(result[0].hypotheses[0]))
Two details that cost real debugging:
</s>is not optional. Without it the decoder never learns the input has ended and repeats itself until the length limit — "you use a satellite satellite to call someone thousands of miles away. You use a satellite satellite to…"no_repeat_ngram_size=3removes the same loop on spontaneous speech, where the end token alone is not enough. Measured cost to quality: none.
Licence
CC BY 4.0, following the original. Attribution: Helsinki-NLP / University of Helsinki, Tatoeba Challenge. Changes made: format conversion and int8 quantisation.