opus-mt-de-ar (ONNX)

ONNX export of Helsinki-NLP/opus-mt-de-ar for on-device inference on Android.

Files

File Description
encoder_model.onnx Encodes the input sentence
decoder_model.onnx Generates the translated tokens
source.spm Source language (German) tokenizer
target.spm Target language (Arabic) tokenizer

Usage in Android

Download the files and run inference with ONNX Runtime for Android.

Encoder input:  input_ids, attention_mask
Encoder output: encoder_hidden_states

Decoder input:  decoder_input_ids, encoder_hidden_states, encoder_attention_mask
Decoder output: logits

Run the encoder once per sentence, then loop the decoder to generate tokens until the EOS token is produced.

Credits

Original model by Helsinki-NLP, trained on OPUS data.
ONNX conversion by [YOUR_NAME].

License

CC-BY 4.0 — same as the original model.

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