v0.30.5
Browse filesSee https://github.com/quic/ai-hub-models/releases/v0.30.5 for changelog.
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: pytorch
|
| 3 |
+
license: other
|
| 4 |
+
tags:
|
| 5 |
+
- llm
|
| 6 |
+
- generative_ai
|
| 7 |
+
- android
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+

|
| 13 |
+
|
| 14 |
+
# Qwen2.5-7B-Instruct: Optimized for Mobile Deployment
|
| 15 |
+
## State-of-the-art large language model useful on a variety of language understanding and generation tasks
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
The Qwen2.5-7B-Instruct is a state-of-the-art multilingual language model with 7 billion parameters, excelling in language understanding, generation, coding, and mathematics. AI Hub provides with four QNN context binaries (shared weights) that can be deployed on Snapdragon 8 Elite with Genie SDK.
|
| 19 |
+
|
| 20 |
+
This model is an implementation of Qwen2.5-7B-Instruct found [here](https://github.com/QwenLM/Qwen2.5).
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
More details on model performance across various devices, can be found [here](https://aihub.qualcomm.com/models/qwen2_5_7b_instruct).
|
| 24 |
+
|
| 25 |
+
### Model Details
|
| 26 |
+
|
| 27 |
+
- **Model Type:** Model_use_case.text_generation
|
| 28 |
+
- **Model Stats:**
|
| 29 |
+
- Input sequence length for Prompt Processor: 128
|
| 30 |
+
- Context length: 4096
|
| 31 |
+
- Number of parameters: 7B
|
| 32 |
+
- Precision: w4a16 + w8a16 (few layers)
|
| 33 |
+
- Num of key-value heads: 4
|
| 34 |
+
- Information about the model parts: Prompt Processor and Token Generator are split into 6 parts each. Each corresponding Prompt Processor and Token Generator part share weights.
|
| 35 |
+
- Prompt processor model size: 4.61 GB
|
| 36 |
+
- Prompt processor input (part1): 128 tokens
|
| 37 |
+
- Prompt processor output (part1): Embeddings output
|
| 38 |
+
- Prompt processor input (other parts): 128 tokens + KVCache initialized with pad token
|
| 39 |
+
- Prompt processor output (other parts): 128 output tokens + KVCache for token generator
|
| 40 |
+
- Token generator model size: 4.61 GB
|
| 41 |
+
- Token generator input (part1): 128 tokens
|
| 42 |
+
- Token generator output (part1): Embeddings output
|
| 43 |
+
- Token generator input (other parts): 1 input token + past KVCache
|
| 44 |
+
- Token generator output (other parts): 1 output token + KVCache for next iteration
|
| 45 |
+
- Use: Initiate conversation with prompt-processor and then token generator for subsequent iterations.
|
| 46 |
+
- Minimum QNN SDK version required: 2.27.7
|
| 47 |
+
- Supported languages: Chinese, English, French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, Arabic, and more.
|
| 48 |
+
- TTFT: Time To First Token is the time it takes to generate the first response token. This is expressed as a range because it varies based on the length of the prompt. The lower bound is for a short prompt (up to 128 tokens, i.e., one iteration of the prompt processor) and the upper bound is for a prompt using the full context length (4096 tokens).
|
| 49 |
+
- Response Rate: Rate of response generation after the first response token.
|
| 50 |
+
|
| 51 |
+
| Model | Precision | Device | Chipset | Target Runtime | Response Rate (tokens per second) | Time To First Token (range, seconds)
|
| 52 |
+
|---|---|---|---|---|---|
|
| 53 |
+
| Qwen2.5-3B-Instruct | w4a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | QNN | 15.40274 | 0.1356538 - 4.3409216 | -- | Use Export Script |
|
| 54 |
+
| Qwen2.5-3B-Instruct | w4a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | QNN | 12.33811 | 0.1749494 - 5.5983808 | -- | Use Export Script |
|
| 55 |
+
|
| 56 |
+
## Deploying Qwen2.5-7B-Instruct on-device
|
| 57 |
+
|
| 58 |
+
Please follow the [LLM on-device deployment](https://github.com/quic/ai-hub-apps/tree/main/tutorials/llm_on_genie) tutorial.
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
## License
|
| 63 |
+
* The license for the original implementation of Qwen2.5-7B-Instruct can be found
|
| 64 |
+
[here](https://huggingface.co/Qwen/Qwen2.5-7B/blob/main/LICENSE).
|
| 65 |
+
* The license for the compiled assets for on-device deployment can be found [here](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/Qualcomm+AI+Hub+Proprietary+License.pdf)
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
## References
|
| 70 |
+
* [Qwen2.5 Technical Report](https://arxiv.org/abs/2412.15115)
|
| 71 |
+
* [Source Model Implementation](https://github.com/QwenLM/Qwen2.5)
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
## Community
|
| 76 |
+
* Join [our AI Hub Slack community](https://qualcomm-ai-hub.slack.com/join/shared_invite/zt-2d5zsmas3-Sj0Q9TzslueCjS31eXG2UA#/shared-invite/email) to collaborate, post questions and learn more about on-device AI.
|
| 77 |
+
* For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
|
| 78 |
+
|
| 79 |
+
## Usage and Limitations
|
| 80 |
+
|
| 81 |
+
Model may not be used for or in connection with any of the following applications:
|
| 82 |
+
|
| 83 |
+
- Accessing essential private and public services and benefits;
|
| 84 |
+
- Administration of justice and democratic processes;
|
| 85 |
+
- Assessing or recognizing the emotional state of a person;
|
| 86 |
+
- Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
|
| 87 |
+
- Education and vocational training;
|
| 88 |
+
- Employment and workers management;
|
| 89 |
+
- Exploitation of the vulnerabilities of persons resulting in harmful behavior;
|
| 90 |
+
- General purpose social scoring;
|
| 91 |
+
- Law enforcement;
|
| 92 |
+
- Management and operation of critical infrastructure;
|
| 93 |
+
- Migration, asylum and border control management;
|
| 94 |
+
- Predictive policing;
|
| 95 |
+
- Real-time remote biometric identification in public spaces;
|
| 96 |
+
- Recommender systems of social media platforms;
|
| 97 |
+
- Scraping of facial images (from the internet or otherwise); and/or
|
| 98 |
+
- Subliminal manipulation
|