Opus-MT for Core ML (Memoria)

These are on-device Core ML conversions of Helsinki-NLP OPUS-MT translation models, made for the Memoria iOS app's offline translator. They contain no new training or fine-tuning: they are the original models in Apple's format.

Each model comes in two variants:

  • accurate/ (16-bit weights) matches the original model almost exactly.
  • compact/ (8-bit weights) is about half the size. It may occasionally drop or change a word compared with the original.
Folder Translates Original model (pinned commit) Available
zls-en/ Croatian, Serbian, Bosnian, Slovenian → English Helsinki-NLP/opus-mt-tc-big-zls-en accurate, compact
en-sh/ English → Croatian, Serbian, Bosnian Helsinki-NLP/opus-mt-tc-base-en-sh accurate, compact
zls-de/ Croatian, Serbian, Bosnian, Slovenian → German Helsinki-NLP/opus-mt-tc-big-zls-de accurate, compact
zls-itc/ Croatian, Serbian, Bosnian, Slovenian → Italian, French, Spanish, Portuguese Helsinki-NLP/opus-mt-tc-big-zls-itc accurate, compact
deu_eng_fra_por_spa-sla/ German, English, French, Portuguese, Spanish → Croatian (and other Slavic languages) Helsinki-NLP/opus-mt-tc-bible-big-deu_eng_fra_por_spa-sla accurate, compact

Each folder's own README lists its files, sizes, SHA-256 checksums, the target-language tokens it needs (for example >>hrv<<), and the comparison results against the original model.

Attribution and license

  • Authors: the original models are by Helsinki-NLP, the Language Technology Research Group at the University of Helsinki, trained on OPUS data.
  • License: they are licensed under CC-BY 4.0. The deu_eng_fra_por_spa-sla model is also tagged Apache-2.0 on Hugging Face, while its original release archive carries a CC-BY 4.0 license; both allow this use.
  • What Memoria changed:
    • converted the weights to Core ML (16-bit and 8-bit);
    • split the model into encoder and decoder functions;
    • added one unused padding slot to the decoder buffers, to work around a Core ML out-of-bounds read;
    • re-exported the SentencePiece tokenizers to a single tokenizer.json.
  • No weights were retrained. These conversions are shared under the same CC-BY 4.0 terms.

If you use these models, please cite the OPUS-MT authors:

  • Jörg Tiedemann and Santhosh Thottingal. 2020. OPUS-MT: Building open translation services for the World. EAMT 2020.
  • Jörg Tiedemann, Mikko Aulamo, Daria Bakshandaeva, Michele Boggia, Stig-Arne Grönroos, Tommi Nieminen, Alessandro Raganato, Yves Scherrer, Raúl Vázquez and Sami Virpioja. 2023. Democratizing neural machine translation with OPUS-MT. Language Resources and Evaluation.

Notes for use

  • Inputs and outputs: each model is one Core ML package with an encode function (flexible input length, 1 to 256 tokens) and a one-token-per-call decode function.
  • Language tags: multi-target models need a target-language token at the start of the input. The zls-en model sometimes starts its output with a stray language tag such as >>srp_Cyrl<<, so remove a leading >>…<< from outputs.
  • Data: nothing is downloaded at runtime, and no data leaves the device.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support