Opus-MT translation models in ONNX int8 (MediaKit)

31 Opus-MT / Tatoeba-MT models by Helsinki-NLP for translating between English and Russian, German, Spanish, French, Portuguese, Japanese, Polish and Turkish, converted to ONNX and quantized to int8. They are the subtitle translation models of MediaKit, a Windows app: it downloads a folder from here when the user picks a language, checks every file's size and SHA-256, and runs it on the user's computer with ONNX Runtime -- no text leaves the computer.

Nothing in the files is MediaKit-specific; they were tested with ONNX Runtime 1.31.

Files of a model

File What it is
encoder_model.onnx the encoder, int8
decoder_model_merged.onnx one decoder for the first step and the next ones (the KV cache inside an If), int8
source.spm, target.spm SentencePiece models of the source and the target language, unchanged
vocab.json the shared vocabulary, unchanged
config.json the original Marian configuration (decoder_start_token_id, eos_token_id, ...), unchanged
LICENSE, NOTICE the original model's license; where it comes from and what was changed

manifest.json lists every file with its size and SHA-256.

Models

4.7 GB in all. Quality: Good -- the best Opus-MT model of the direction by chrF on Tatoeba; Compact -- smaller and faster, 1-4 chrF lower; Experimental -- Japanese, which makes text up on unpunctuated fragments.

Model Directions Converted from License Quality Size
opus-mt-ru-en Russian โ†’ English Helsinki-NLP/opus-mt-ru-en CC BY 4.0 Good 147 MB
opus-mt-en-ru English โ†’ Russian Helsinki-NLP/opus-mt-en-ru Apache-2.0 Good 147 MB
opus-mt-de-en German โ†’ English Helsinki-NLP/opus-mt-de-en Apache-2.0 Good 138 MB
opus-mt-en-de English โ†’ German Helsinki-NLP/opus-mt-en-de CC BY 4.0 Good 138 MB
opus-mt-es-en Spanish โ†’ English Helsinki-NLP/opus-mt-es-en Apache-2.0 Good 149 MB
opus-mt-en-es English โ†’ Spanish Helsinki-NLP/opus-mt-en-es Apache-2.0 Good 149 MB
opus-mt-fr-en French โ†’ English Helsinki-NLP/opus-mt-fr-en Apache-2.0 Good 140 MB
opus-mt-tc-big-en-fr English โ†’ French Helsinki-NLP/opus-mt-tc-big-en-fr CC BY 4.0 Good 346 MB
opus-mt-tc-bible-big-roa-en Portuguese โ†’ English Helsinki-NLP/opus-mt-tc-bible-big-roa-en Apache-2.0 Good 354 MB
opus-mt-tc-big-en-pt English โ†’ Portuguese Helsinki-NLP/opus-mt-tc-big-en-pt CC BY 4.0 Good 351 MB
opus-mt-ja-en Japanese โ†’ English Helsinki-NLP/opus-mt-ja-en Apache-2.0 Experimental 142 MB
opus-tatoeba-en-ja English โ†’ Japanese Helsinki-NLP/opus-tatoeba-en-ja Apache-2.0 Experimental 149 MB
opus-mt-tc-big-zlw-en Polish โ†’ English Helsinki-NLP/opus-mt-tc-big-zlw-en CC BY 4.0 Good 362 MB
opus-mt-tc-bible-big-deu_eng_fra_por_spa-sla English โ†’ Polish Helsinki-NLP/opus-mt-tc-bible-big-deu_eng_fra_por_spa-sla Apache-2.0 Good 368 MB
opus-mt-tr-en Turkish โ†’ English Helsinki-NLP/opus-mt-tr-en Apache-2.0 Good 145 MB
opus-mt-tc-big-en-tr English โ†’ Turkish Helsinki-NLP/opus-mt-tc-big-en-tr CC BY 4.0 Good 359 MB
opus-mt-ROMANCE-en Portuguese โ†’ English, Spanish โ†’ English, French โ†’ English Helsinki-NLP/opus-mt-ROMANCE-en Apache-2.0 Compact 149 MB
opus-mt-en-ROMANCE English โ†’ Portuguese, English โ†’ Spanish, English โ†’ French Helsinki-NLP/opus-mt-en-ROMANCE Apache-2.0 Compact 149 MB
opus-mt-pl-en Polish โ†’ English Helsinki-NLP/opus-mt-pl-en Apache-2.0 Compact 147 MB
opus-mt-en-zlw English โ†’ Polish Helsinki-NLP/opus-mt-en-zlw Apache-2.0 Compact 138 MB
opus-mt-en-fr English โ†’ French Helsinki-NLP/opus-mt-en-fr Apache-2.0 Compact 140 MB
opus-mt_tiny_rus-eng Russian โ†’ English Helsinki-NLP/opus-mt_tiny_rus-eng Apache-2.0 Compact 38 MB
opus-mt_tiny_eng-rus English โ†’ Russian Helsinki-NLP/opus-mt_tiny_eng-rus Apache-2.0 Compact 38 MB
opus-mt_tiny_deu-eng German โ†’ English Helsinki-NLP/opus-mt_tiny_deu-eng Apache-2.0 Compact 37 MB
opus-mt_tiny_eng-deu English โ†’ German Helsinki-NLP/opus-mt_tiny_eng-deu Apache-2.0 Compact 37 MB
opus-mt_tiny_spa-eng Spanish โ†’ English Helsinki-NLP/opus-mt_tiny_spa-eng Apache-2.0 Compact 37 MB
opus-mt_tiny_eng-spa English โ†’ Spanish Helsinki-NLP/opus-mt_tiny_eng-spa Apache-2.0 Compact 37 MB
opus-mt_tiny_fra-eng French โ†’ English Helsinki-NLP/opus-mt_tiny_fra-eng Apache-2.0 Compact 37 MB
opus-mt_tiny_eng-fra English โ†’ French Helsinki-NLP/opus-mt_tiny_eng-fra Apache-2.0 Compact 37 MB
opus-mt_tiny_tur-eng Turkish โ†’ English Helsinki-NLP/opus-mt_tiny_tur-eng Apache-2.0 Compact 37 MB
opus-mt_tiny_eng-tur English โ†’ Turkish Helsinki-NLP/opus-mt_tiny_eng-tur Apache-2.0 Compact 37 MB

A multilingual model needs a target-language token at the start of the source text:

Model Direction Token
opus-mt-tc-big-en-pt English โ†’ Portuguese >>pob<< (Brazil), >>por<< (Portugal)
opus-mt-tc-bible-big-deu_eng_fra_por_spa-sla English โ†’ Polish >>pol<<
opus-mt-en-ROMANCE English โ†’ Portuguese >>pt_br<< (Brazil), >>pt<< (Portugal)
opus-mt-en-ROMANCE English โ†’ Spanish >>es<<
opus-mt-en-ROMANCE English โ†’ French >>fr<<
opus-mt-en-zlw English โ†’ Polish >>pol<<

How they were made

Each model: exported to ONNX with Hugging Face Optimum (task text2text-generation-with-past: an encoder and one merged decoder with the KV cache) and quantized to int8 with ONNX Runtime's dynamic quantization (QInt8, MatMulConstBOnly, subgraphs included). The weights were not retrained or fine-tuned. source.spm, target.spm, vocab.json and config.json are copied unchanged.

Toolchain: Python 3.12, torch 2.14.1+cpu, transformers 4.57.6, optimum 2.1.0, optimum-onnx 0.1.0, onnx 1.23.2, onnxruntime 1.31.1, sentencepiece 0.2.2. Another version of the exporter or the quantizer gives other bytes.

Credits and licenses

The models were trained by the Language Technology Research Group at the University of Helsinki (Jรถrg Tiedemann and the OPUS-MT team) on OPUS data; this repository only converts them. Each folder keeps its original license -- CC BY 4.0 or Apache-2.0, see the table and LICENSE.md.

  • Jรถrg Tiedemann and Santhosh Thottingal. OPUS-MT -- Building open translation services for the World. EAMT 2020.
  • Jรถrg Tiedemann. The Tatoeba Translation Challenge -- Realistic Data Sets for Low Resource and Multilingual MT. WMT 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. Democratizing neural machine translation with OPUS-MT. Language Resources and Evaluation, 2023.
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