OPUS-MT MNN Model: en → ru

These models are generated automatically by the MNN OPUS-MT Toolkit. The toolkit provides end-to‑end scripts for conversion, testing on Android devices, and uploading to Hugging Face.

Model Details

Property Value
Source language en
Target language ru
Model format MNN (.mnn)
Available precisions fp32,fp16,int8,int4
Conversion tool MNN OPUS-MT Toolkit
Original model Helsinki-NLP/opus-mt-en-ru
Tokenizer source Xenova/opus-mt-en-ru

Usage

Loading with MNN (C++ / Android)

The models can be loaded using the MNN Express API:

#include <MNN/expr/Module.hpp>
#include <MNN/expr/ExprCreator.hpp>

// Load encoder
auto encoder = Module::load(
    {"input_ids", "attention_mask"},
    {"last_hidden_state"},
    "en_ru_encoder_.mnn"
);

// Load decoder
auto decoder = Module::load(
    {"input_ids", "encoder_hidden_states", "encoder_attention_mask"},
    {"logits"},
    "en_ru_decoder_.mnn"
);

// Perform translation (example)
auto input_ids = _Input({1, seq_len}, NCHW, halide_type_of<int>());
auto attention_mask = _Input({1, seq_len}, NCHW, halide_type_of<int>());
// ... fill input tensors ...
auto context = encoder->onForward({input_ids, attention_mask});
auto logits = decoder->onForward({input_ids, context[0], attention_mask});

Using the MNN OPUS-MT Toolkit

Requirements

  • MNN runtime (version 3.6.0 or compatible)
  • Android NDK (if building for Android)
  • C++17 compiler

License

This model is derived from the original OPUS‑MT model by Helsinki‑NLP, which is licensed under the MIT License.

The MNN conversion and this repository are provided under the same MIT License terms.

Third‑party attributions

Component License Source
OPUS‑MT model (Helsinki‑NLP) MIT https://huggingface.co/Helsinki-NLP
Tokenizer (Xenova) MIT https://huggingface.co/Xenova
MNN framework (Alibaba) Apache 2.0 https://github.com/alibaba/MNN
MNN OPUS‑MT Toolkit Apache 2.0 https://github.com/HoSStiA/mnn-opus-mt-toolkit

Acknowledgements

  • Helsinki‑NLP for the original OPUS‑MT models
  • Xenova for providing tokenizer and ONNX exports
  • Alibaba MNN for the inference framework
  • Hosstia Cortes for the MNN OPUS‑MT Toolkit and conversion pipeline

Contact & Support

For issues with this specific model, please open an issue on the MNN OPUS‑MT Toolkit repository or contact the toolkit author at hosstia@gmail.com.

Repository URL: https://huggingface.co/Hosstia/opus-mt-en-ru-mnn


This README was automatically generated by the MNN OPUS‑MT Toolkit.

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