nllb
Collection
40 items β’ Updated
Core ML conversion of opus-mt-mul-en-big (multilingual-to-English, Marian NMT, ~0.3B parameters) for deployment on iOS and macOS.
OpusMT_Encoder_128.mlpackage β Marian encoder (input_ids, attention_mask β hidden states)OpusMT_Decoder_128.mlpackage β Marian decoder (input_ids, encoder_hidden_states, encoder_attention_mask β logits)tokenizer/ β Marian tokenizer (sentencepiece + config)config.json β Model configtest.txt β Multilingual sample sentences; test_results_*.csv / test_results_*.json β Evaluation outputsSource text must be prefixed with a language code so the model routes correctly:
>>jpn<< γγγ―γγΉγγ§γγ
>>fra<< Ceci est un test.
>>deu<< Das ist ein Test.
Use the opus-mt language code (e.g. jpn, fra, deu, eng). For unsupported languages the notebook typically falls back to eng (output is for reference only).
.mlpackage files and tokenizer assets to your Xcode project (or load from disk).>>{lang}<< {text}.input_ids (int32, shape [1, 128]) and attention_mask (int32, shape [1, 128]).Precision is float32 for both encoder and decoder to avoid quality loss (e.g. Korean/CJK with float16) and decoder output collapse.
Sample sentences and test results are provided in this repo:
test.txt β One sentence per line in the form N. Language name (English)γSource texttest_results_*.csv / test_results_*.json β Batch translation results (index, code, source, translation)Apache 2.0 (inherited from OPUS-MT / Marian).