OpusMT-En-Zh: Optimized for Qualcomm Devices

OpusMT English to Chinese translation model is a state-of-the-art neural machine translation system designed for translating English text into Chinese. 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 Chinese translations with high accuracy.

This is based on the implementation of OpusMT-En-Zh 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
QNN_CONTEXT_BINARY float qualcomm_qcs8450_proxy QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_qcs8550_proxy QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_qcs9075 QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_sa7255p QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_sa8295p QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_sa8775p QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_snapdragon_8_elite_for_galaxy QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_snapdragon_8_elite_gen5 QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_snapdragon_8gen3 QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_snapdragon_x2_elite QAIRT 2.43 Download
QNN_CONTEXT_BINARY float qualcomm_snapdragon_x_elite QAIRT 2.43 Download

For more device-specific assets and performance metrics, visit OpusMT-En-Zh 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-Zh on GitHub for usage instructions.

Model Details

Model Type: Model_use_case.text_generation

Model Stats:

  • Model checkpoint: Helsinki-NLP/opus-mt-en-zh
  • Input resolution: 256 tokens (English text)
  • Max input sequence length: 256 tokens
  • Max output sequence length: 256 tokens
  • Number of parameters (encoder): ~74M
  • Model size (encoder) (float): ~280 MB
  • Number of parameters (decoder): ~74M
  • Model size (decoder) (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
decoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Elite Gen 5 Mobile 2.169 ms 1 - 11 MB NPU
decoder PRECOMPILED_QNN_ONNX float Snapdragon® X2 Elite 1.771 ms 160 - 160 MB NPU
decoder PRECOMPILED_QNN_ONNX float Snapdragon® X Elite 3.162 ms 159 - 159 MB NPU
decoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Gen 3 Mobile 2.692 ms 0 - 7 MB NPU
decoder PRECOMPILED_QNN_ONNX float Qualcomm® QCS8550 (Proxy) 3.434 ms 12 - 14 MB NPU
decoder PRECOMPILED_QNN_ONNX float Qualcomm® QCS9075 3.961 ms 12 - 27 MB NPU
decoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Elite For Galaxy Mobile 2.327 ms 0 - 11 MB NPU
decoder QNN_CONTEXT_BINARY float Snapdragon® 8 Elite Gen 5 Mobile 2.171 ms 1 - 11 MB NPU
decoder QNN_CONTEXT_BINARY float Snapdragon® X2 Elite 2.311 ms 12 - 12 MB NPU
decoder QNN_CONTEXT_BINARY float Snapdragon® X Elite 3.172 ms 12 - 12 MB NPU
decoder QNN_CONTEXT_BINARY float Snapdragon® 8 Gen 3 Mobile 2.878 ms 12 - 20 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® QCS8275 (Proxy) 6.689 ms 12 - 20 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® QCS8550 (Proxy) 3.451 ms 12 - 14 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® SA8775P 4.255 ms 12 - 20 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® QCS9075 3.967 ms 12 - 26 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® QCS8450 (Proxy) 4.813 ms 12 - 21 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® SA7255P 6.689 ms 12 - 20 MB NPU
decoder QNN_CONTEXT_BINARY float Qualcomm® SA8295P 4.881 ms 10 - 16 MB NPU
decoder QNN_CONTEXT_BINARY float Snapdragon® 8 Elite For Galaxy Mobile 2.559 ms 0 - 9 MB NPU
encoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Elite Gen 5 Mobile 1.769 ms 0 - 10 MB NPU
encoder PRECOMPILED_QNN_ONNX float Snapdragon® X2 Elite 1.863 ms 107 - 107 MB NPU
encoder PRECOMPILED_QNN_ONNX float Snapdragon® X Elite 3.975 ms 107 - 107 MB NPU
encoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Gen 3 Mobile 2.659 ms 0 - 8 MB NPU
encoder PRECOMPILED_QNN_ONNX float Qualcomm® QCS8550 (Proxy) 3.759 ms 0 - 113 MB NPU
encoder PRECOMPILED_QNN_ONNX float Qualcomm® QCS9075 4.692 ms 15 - 18 MB NPU
encoder PRECOMPILED_QNN_ONNX float Snapdragon® 8 Elite For Galaxy Mobile 2.28 ms 0 - 11 MB NPU
encoder QNN_CONTEXT_BINARY float Snapdragon® 8 Elite Gen 5 Mobile 1.751 ms 0 - 10 MB NPU
encoder QNN_CONTEXT_BINARY float Snapdragon® X2 Elite 2.189 ms 0 - 0 MB NPU
encoder QNN_CONTEXT_BINARY float Snapdragon® X Elite 3.968 ms 0 - 0 MB NPU
encoder QNN_CONTEXT_BINARY float Snapdragon® 8 Gen 3 Mobile 2.643 ms 0 - 7 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® QCS8275 (Proxy) 12.724 ms 0 - 7 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® QCS8550 (Proxy) 3.633 ms 0 - 1 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® SA8775P 4.744 ms 0 - 9 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® QCS9075 4.59 ms 0 - 8 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® QCS8450 (Proxy) 4.987 ms 0 - 9 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® SA7255P 12.724 ms 0 - 7 MB NPU
encoder QNN_CONTEXT_BINARY float Qualcomm® SA8295P 5.485 ms 0 - 5 MB NPU
encoder QNN_CONTEXT_BINARY float Snapdragon® 8 Elite For Galaxy Mobile 2.231 ms 0 - 9 MB NPU

License

  • The license for the original implementation of OpusMT-En-Zh 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