OpusMT-En-Es: Optimized for Qualcomm Devices

OpusMT English to Spanish translation model is a state-of-the-art neural machine translation system designed for translating English text into Spanish. This model is based on the Marian transformer architecture and has been optimized for edge inference by splitting into encoder and decoder components with modified attention mechanisms. It exhibits robust performance for real-world translation tasks, making it highly reliable for practical applications. The model supports input sequences up to 256 tokens and can generate Spanish translations with high accuracy.

This is based on the implementation of OpusMT-En-Es found here. This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the Qualcomm® AI Hub Models library to export with custom configurations. More details on model performance across various devices, can be found here.

Qualcomm AI Hub Models uses Qualcomm AI Hub Workbench to compile, profile, and evaluate this model. Sign up to run these models on a hosted Qualcomm® device.

Getting Started

There are two ways to deploy this model on your device:

Option 1: Download Pre-Exported Models

Below are pre-exported model assets ready for deployment.

Runtime Precision Chipset SDK Versions Download
ONNX float Universal QAIRT 2.42, ONNX Runtime 1.24.1 Download
QNN_CONTEXT_BINARY float qualcomm-qcs8275 QAIRT 2.42 Download
QNN_DLC float Universal QAIRT 2.43 Download
TFLITE float Universal QAIRT 2.43, TFLite 2.17.0 Download

For more device-specific assets and performance metrics, visit OpusMT-En-Es on Qualcomm® AI Hub.

Option 2: Export with Custom Configurations

Use the Qualcomm® AI Hub Models Python library to compile and export the model with your own:

  • Custom weights (e.g., fine-tuned checkpoints)
  • Custom input shapes
  • Target device and runtime configurations

This option is ideal if you need to customize the model beyond the default configuration provided here.

See our repository for OpusMT-En-Es on GitHub for usage instructions.

Model Details

Model Type: Model_use_case.text_generation

Model Stats:

  • Model checkpoint: Helsinki-NLP/opus-mt-en-es
  • Input resolution: 256 tokens (English text)
  • Max input sequence length: 256 tokens
  • Max output sequence length: 256 tokens
  • Number of parameters (OpusMTEncoder): ~74M
  • Model size (OpusMTEncoder) (float): ~280 MB
  • Number of parameters (OpusMTDecoder): ~74M
  • Model size (OpusMTDecoder) (float): ~280 MB
  • Number of encoder layers: 6
  • Number of decoder layers: 6
  • Attention heads: 8
  • Hidden dimension: 512

Performance Summary

Model Runtime Precision Chipset Inference Time (ms) Peak Memory Range (MB) Primary Compute Unit
OpusMTDecoder ONNX float Snapdragon® X2 Elite 1.835 ms 161 - 161 MB NPU
OpusMTDecoder ONNX float Snapdragon® X Elite 3.093 ms 160 - 160 MB NPU
OpusMTDecoder ONNX float Snapdragon® 8 Gen 3 Mobile 2.738 ms 0 - 393 MB NPU
OpusMTDecoder ONNX float Qualcomm® QCS8550 (Proxy) 3.527 ms 12 - 16 MB NPU
OpusMTDecoder ONNX float Qualcomm® QCS9075 4.271 ms 12 - 27 MB NPU
OpusMTDecoder ONNX float Snapdragon® 8 Elite For Galaxy Mobile 2.373 ms 0 - 428 MB NPU
OpusMTDecoder ONNX float Snapdragon® 8 Elite Gen 5 Mobile 2.203 ms 0 - 378 MB NPU
OpusMTDecoder QNN_DLC float Snapdragon® X2 Elite 1.978 ms 6 - 6 MB NPU
OpusMTDecoder QNN_DLC float Snapdragon® X Elite 3.075 ms 6 - 6 MB NPU
OpusMTDecoder QNN_DLC float Snapdragon® 8 Gen 3 Mobile 2.397 ms 0 - 190 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® QCS8275 (Proxy) 6.856 ms 3 - 168 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® QCS8550 (Proxy) 3.052 ms 1 - 3 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® SA8775P 3.956 ms 3 - 169 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® QCS9075 3.363 ms 8 - 16 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® QCS8450 (Proxy) 4.017 ms 2 - 169 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® SA7255P 6.856 ms 3 - 168 MB NPU
OpusMTDecoder QNN_DLC float Qualcomm® SA8295P 4.156 ms 6 - 157 MB NPU
OpusMTDecoder QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 2.123 ms 0 - 166 MB NPU
OpusMTDecoder QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 1.899 ms 0 - 171 MB NPU
OpusMTDecoder TFLITE float Snapdragon® 8 Gen 3 Mobile 2.793 ms 0 - 373 MB NPU
OpusMTDecoder TFLITE float Qualcomm® QCS8275 (Proxy) 6.672 ms 0 - 230 MB NPU
OpusMTDecoder TFLITE float Qualcomm® QCS8550 (Proxy) 3.411 ms 0 - 2 MB NPU
OpusMTDecoder TFLITE float Qualcomm® SA8775P 4.238 ms 0 - 230 MB NPU
OpusMTDecoder TFLITE float Qualcomm® QCS9075 4.187 ms 0 - 186 MB NPU
OpusMTDecoder TFLITE float Qualcomm® QCS8450 (Proxy) 4.616 ms 0 - 355 MB NPU
OpusMTDecoder TFLITE float Qualcomm® SA7255P 6.672 ms 0 - 230 MB NPU
OpusMTDecoder TFLITE float Qualcomm® SA8295P 4.886 ms 0 - 212 MB NPU
OpusMTDecoder TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 2.574 ms 0 - 405 MB NPU
OpusMTDecoder TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 2.135 ms 0 - 374 MB NPU
OpusMTEncoder ONNX float Snapdragon® X2 Elite 2.195 ms 108 - 108 MB NPU
OpusMTEncoder ONNX float Snapdragon® X Elite 5.058 ms 108 - 108 MB NPU
OpusMTEncoder ONNX float Snapdragon® 8 Gen 3 Mobile 3.398 ms 0 - 262 MB NPU
OpusMTEncoder ONNX float Qualcomm® QCS8550 (Proxy) 4.766 ms 0 - 136 MB NPU
OpusMTEncoder ONNX float Qualcomm® QCS9075 6.216 ms 16 - 18 MB NPU
OpusMTEncoder ONNX float Snapdragon® 8 Elite For Galaxy Mobile 2.774 ms 0 - 293 MB NPU
OpusMTEncoder ONNX float Snapdragon® 8 Elite Gen 5 Mobile 2.036 ms 0 - 256 MB NPU
OpusMTEncoder QNN_DLC float Snapdragon® X2 Elite 2.011 ms 0 - 0 MB NPU
OpusMTEncoder QNN_DLC float Snapdragon® X Elite 3.898 ms 0 - 0 MB NPU
OpusMTEncoder QNN_DLC float Snapdragon® 8 Gen 3 Mobile 2.544 ms 0 - 86 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® QCS8275 (Proxy) 12.602 ms 0 - 52 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® QCS8550 (Proxy) 3.531 ms 0 - 2 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® SA8775P 4.536 ms 0 - 54 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® QCS9075 4.674 ms 0 - 5 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® QCS8450 (Proxy) 4.712 ms 0 - 85 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® SA7255P 12.602 ms 0 - 52 MB NPU
OpusMTEncoder QNN_DLC float Qualcomm® SA8295P 5.355 ms 0 - 54 MB NPU
OpusMTEncoder QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 2.139 ms 0 - 55 MB NPU
OpusMTEncoder QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 1.615 ms 0 - 58 MB NPU
OpusMTEncoder TFLITE float Snapdragon® 8 Gen 3 Mobile 2.645 ms 0 - 260 MB NPU
OpusMTEncoder TFLITE float Qualcomm® QCS8275 (Proxy) 12.793 ms 6 - 99 MB NPU
OpusMTEncoder TFLITE float Qualcomm® QCS8550 (Proxy) 3.698 ms 0 - 3 MB NPU
OpusMTEncoder TFLITE float Qualcomm® SA8775P 4.814 ms 0 - 93 MB NPU
OpusMTEncoder TFLITE float Qualcomm® QCS9075 5.17 ms 4 - 119 MB NPU
OpusMTEncoder TFLITE float Qualcomm® QCS8450 (Proxy) 5.091 ms 6 - 259 MB NPU
OpusMTEncoder TFLITE float Qualcomm® SA7255P 12.793 ms 6 - 99 MB NPU
OpusMTEncoder TFLITE float Qualcomm® SA8295P 5.655 ms 6 - 95 MB NPU
OpusMTEncoder TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 2.223 ms 0 - 282 MB NPU
OpusMTEncoder TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 1.76 ms 0 - 243 MB NPU

License

  • The license for the original implementation of OpusMT-En-Es can be found here.

References

Community

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