--- library_name: pytorch license: apache-2.0 tags: - foundation - android pipeline_tag: text-generation --- ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/web-assets/model_demo.png) # 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](https://github.com/Helsinki-NLP/Opus-MT). This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.62.2/src/qai_hub_models/models/opus_mt_en_zh) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary). Qualcomm AI Hub Models uses [Qualcomm AI Hub Workbench](https://workbench.aihub.qualcomm.com) to compile, profile, and evaluate this model. [Sign up](https://myaccount.qualcomm.com/signup) to run these models on a hosted Qualcomm® device. ## Deploying OpusMT-En-Zh on-device This model is compatible with the Qualcomm Voice AI SDK. Download the SDK from the [Qualcomm Package Manager](https://qpm.qualcomm.com/#/main/tools/details/VoiceAI_Translation) to deploy this model on-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 | |---|---|---|---|---| | VOICE_AI | float | Snapdragon® X2 Elite | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_x2_elite.zip) | VOICE_AI | float | Snapdragon® X Elite | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_x_elite.zip) | VOICE_AI | float | Snapdragon® 8 Gen 3 Mobile | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_8gen3.zip) | VOICE_AI | float | Snapdragon® 8 Gen 1 Mobile | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_8gen1.zip) | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-8275 | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_qcs8275.zip) | VOICE_AI | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_qcs8550_proxy.zip) | VOICE_AI | float | Qualcomm® SA8775P | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_sa8775p.zip) | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-9075 | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_qcs9075.zip) | VOICE_AI | float | Qualcomm® SA7255P | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_sa7255p.zip) | VOICE_AI | float | Qualcomm® SA8295P | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_sa8295p.zip) | VOICE_AI | float | Snapdragon® 8 Elite Mobile | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_8_elite_for_galaxy.zip) | VOICE_AI | float | Snapdragon® 8 Elite Gen 5 Mobile | QAIRT 2.45 | [Download](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/opus_mt_en_zh/releases/v0.62.2/opus_mt_en_zh-voice_ai-float-qualcomm_snapdragon_8_elite_gen5_for_galaxy.zip) For more device-specific assets and performance metrics, visit **[OpusMT-En-Zh on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/opus_mt_en_zh)**. ### Option 2: Export with Custom Configurations Use the [Qualcomm® AI Hub Models](https://github.com/qualcomm/ai-hub-models/blob/v0.62.2/src/qai_hub_models/models/opus_mt_en_zh) 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](https://github.com/qualcomm/ai-hub-models/blob/v0.62.2/src/qai_hub_models/models/opus_mt_en_zh) for usage instructions. ## Model Details **Model Type:** Model_use_case.text_generation **Model Stats:** - Attention heads: 8 - Hidden dimension: 512 - Input resolution: 256 tokens (English text) - Max input sequence length: 256 tokens - Max output sequence length: 256 tokens - Model checkpoint: Helsinki-NLP/opus-mt-en-zh - Model size (decoder) (float): ~280 MB - Model size (encoder) (float): ~280 MB - Number of decoder layers: 6 - Number of encoder layers: 6 - Number of parameters (decoder): ~74M - Number of parameters (encoder): ~74M ## Performance Summary | Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |---|---|---|---|---|---|--- | decoder | VOICE_AI | float | Snapdragon® X2 Elite | 2.286 ms | 12 - 12 MB | NPU | decoder | VOICE_AI | float | Snapdragon® X Elite | 3.06 ms | 12 - 12 MB | NPU | decoder | VOICE_AI | float | Snapdragon® 8 Gen 3 Mobile | 2.952 ms | 12 - 20 MB | NPU | decoder | VOICE_AI | float | Snapdragon® 8 Gen 1 Mobile | 4.511 ms | 11 - 20 MB | NPU | decoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-8275 | 4.507 ms | 12 - 27 MB | NPU | decoder | VOICE_AI | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 3.384 ms | 3 - 5 MB | NPU | decoder | VOICE_AI | float | Qualcomm® SA8775P | 4.244 ms | 12 - 22 MB | NPU | decoder | VOICE_AI | float | Qualcomm® SA8650P | 4.244 ms | 12 - 22 MB | NPU | decoder | VOICE_AI | float | Qualcomm® SA8255P | 4.244 ms | 12 - 22 MB | NPU | decoder | VOICE_AI | float | Qualcomm® QCS8450 | 4.511 ms | 11 - 20 MB | NPU | decoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-9075 | 3.976 ms | 14 - 28 MB | NPU | decoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-X7181 | 3.06 ms | 12 - 12 MB | NPU | decoder | VOICE_AI | float | Qualcomm® Dragonwing™ Q-8750 | 2.546 ms | 0 - 13 MB | NPU | decoder | VOICE_AI | float | Qualcomm® SA7255P | 6.578 ms | 12 - 20 MB | NPU | decoder | VOICE_AI | float | Qualcomm® SA8295P | 4.428 ms | 10 - 16 MB | NPU | decoder | VOICE_AI | float | Snapdragon® 8 Elite Mobile | 2.546 ms | 0 - 13 MB | NPU | decoder | VOICE_AI | float | Snapdragon® 8 Elite Gen 5 Mobile | 2.168 ms | 1 - 9 MB | NPU | encoder | VOICE_AI | float | Snapdragon® X2 Elite | 2.125 ms | 0 - 0 MB | NPU | encoder | VOICE_AI | float | Snapdragon® X Elite | 3.928 ms | 0 - 0 MB | NPU | encoder | VOICE_AI | float | Snapdragon® 8 Gen 3 Mobile | 2.646 ms | 0 - 7 MB | NPU | encoder | VOICE_AI | float | Snapdragon® 8 Gen 1 Mobile | 4.976 ms | 0 - 14 MB | NPU | encoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-8275 | 4.807 ms | 0 - 8 MB | NPU | encoder | VOICE_AI | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 3.627 ms | 1 - 2 MB | NPU | encoder | VOICE_AI | float | Qualcomm® SA8775P | 4.734 ms | 0 - 10 MB | NPU | encoder | VOICE_AI | float | Qualcomm® SA8650P | 4.734 ms | 0 - 10 MB | NPU | encoder | VOICE_AI | float | Qualcomm® SA8255P | 4.734 ms | 0 - 10 MB | NPU | encoder | VOICE_AI | float | Qualcomm® QCS8450 | 4.976 ms | 0 - 14 MB | NPU | encoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-9075 | 4.59 ms | 0 - 8 MB | NPU | encoder | VOICE_AI | float | Qualcomm® Dragonwing™ IQ-X7181 | 3.928 ms | 0 - 0 MB | NPU | encoder | VOICE_AI | float | Qualcomm® Dragonwing™ Q-8750 | 2.227 ms | 0 - 10 MB | NPU | encoder | VOICE_AI | float | Qualcomm® SA7255P | 12.641 ms | 0 - 9 MB | NPU | encoder | VOICE_AI | float | Qualcomm® SA8295P | 5.353 ms | 0 - 6 MB | NPU | encoder | VOICE_AI | float | Snapdragon® 8 Elite Mobile | 2.227 ms | 0 - 10 MB | NPU | encoder | VOICE_AI | float | Snapdragon® 8 Elite Gen 5 Mobile | 1.762 ms | 0 - 9 MB | NPU ## License * The license for the original implementation of OpusMT-En-Zh can be found [here](https://github.com/Helsinki-NLP/Opus-MT/blob/master/LICENSE). ## References * [OPUS-MT – Building open translation services for the World](https://aclanthology.org/2020.eamt-1.61/) * [Source Model Implementation](https://github.com/Helsinki-NLP/Opus-MT) ## Community * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI. * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).