qaihm-bot commited on
Commit
856d42f
·
verified ·
1 Parent(s): 8fef352

See https://github.com/quic/ai-hub-models/releases/v0.46.1 for changelog.

Files changed (1) hide show
  1. README.md +50 -101
README.md CHANGED
@@ -11,136 +11,85 @@ pipeline_tag: text-generation
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/falcon_v3_7b_instruct/web-assets/model_demo.png)
13
 
14
- # Falcon3-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
  Falcon3 family of Open Foundation Models is a set of pretrained and instruct LLMs ranging from 1B to 10B.
19
 
20
- This model is an implementation of Falcon3-7B-Instruct found [here](https://huggingface.co/tiiuae/Falcon3-7B-Instruct).
21
-
22
-
23
- This repository provides scripts to run Falcon3-7B-Instruct on Qualcomm® devices.
24
- More details on model performance across various devices, can be found
25
- [here](https://aihub.qualcomm.com/models/falcon_v3_7b_instruct).
26
-
27
-
28
 
29
- ### Model Details
30
-
31
- - **Model Type:** Model_use_case.text_generation
32
- - **Model Stats:**
33
- - Input sequence length for Prompt Processor: 128
34
- - Context length: 4096
35
- - Precision: w4a16 + w8a16 (few layers)
36
- - Supported languages: English, French, Spanish, Portuguese.
37
- - 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).
38
- - Response Rate: Rate of response generation after the first response token.
39
-
40
- | Model | Precision | Device | Chipset | Target Runtime | Response Rate (tokens per second) | Time To First Token (range, seconds)
41
- |---|---|---|---|---|---|
42
- | Falcon3-7B-Instruct | w4a16 | Snapdragon 8 Elite Gen 5 QRD | Snapdragon® 8 Elite Gen 5 Mobile | GENIE | 15.8303 | 0.10903 - 3.488966 | -- | Use Export Script |
43
- | Falcon3-7B-Instruct | w4a16 | Snapdragon 8 Elite QRD | Snapdragon® 8 Elite Mobile | GENIE | 14.02985 | 0.1265205 - 4.048656 | -- | Use Export Script |
44
- | Falcon3-7B-Instruct | w4a16 | Snapdragon X Elite CRD | Snapdragon® X Elite | GENIE | 9.96829 | 0.1973798 - 6.3161536 | -- | Use Export Script |
45
 
46
  ## Deploying Falcon3-7B-Instruct on-device
47
 
48
  Please follow the [LLM on-device deployment](https://github.com/quic/ai-hub-apps/tree/main/tutorials/llm_on_genie) tutorial.
49
 
 
 
50
 
 
51
 
52
- ## Installation
53
-
54
-
55
- Install the package via pip:
56
- ```bash
57
- # NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
58
- pip install "qai-hub-models[falcon-v3-7b-instruct]"
59
- ```
60
-
61
-
62
- ## Configure Qualcomm® AI Hub Workbench to run this model on a cloud-hosted device
63
-
64
- Sign-in to [Qualcomm® AI Hub Workbench](https://workbench.aihub.qualcomm.com/) with your
65
- Qualcomm® ID. Once signed in navigate to `Account -> Settings -> API Token`.
66
-
67
- With this API token, you can configure your client to run models on the cloud
68
- hosted devices.
69
- ```bash
70
- qai-hub configure --api_token API_TOKEN
71
- ```
72
- Navigate to [docs](https://workbench.aihub.qualcomm.com/docs/) for more information.
73
-
74
-
75
-
76
- ## Demo off target
77
-
78
- The package contains a simple end-to-end demo that downloads pre-trained
79
- weights and runs this model on a sample input.
80
 
81
- ```bash
82
- python -m qai_hub_models.models.falcon_v3_7b_instruct.demo
83
- ```
84
 
85
- The above demo runs a reference implementation of pre-processing, model
86
- inference, and post processing.
87
 
88
- **NOTE**: If you want running in a Jupyter Notebook or Google Colab like
89
- environment, please add the following to your cell (instead of the above).
90
- ```
91
- %run -m qai_hub_models.models.falcon_v3_7b_instruct.demo
92
- ```
93
 
 
94
 
95
- ### Run model on a cloud-hosted device
96
 
97
- In addition to the demo, you can also run the model on a cloud-hosted Qualcomm®
98
- device. This script does the following:
99
- * Performance check on-device on a cloud-hosted device
100
- * Downloads compiled assets that can be deployed on-device for Android.
101
- * Accuracy check between PyTorch and on-device outputs.
102
 
103
- ```bash
104
- python -m qai_hub_models.models.falcon_v3_7b_instruct.export
105
- ```
106
 
 
 
 
 
 
 
 
107
 
108
-
109
-
110
-
111
-
112
- ## Deploying compiled model to Android
113
-
114
-
115
- The models can be deployed using multiple runtimes:
116
- - TensorFlow Lite (`.tflite` export): [This
117
- tutorial](https://www.tensorflow.org/lite/android/quickstart) provides a
118
- guide to deploy the .tflite model in an Android application.
119
-
120
-
121
- - QNN (`.so` export ): This [sample
122
- app](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-50/sample_app.html)
123
- provides instructions on how to use the `.so` shared library in an Android application.
124
-
125
-
126
- ## View on Qualcomm® AI Hub
127
- Get more details on Falcon3-7B-Instruct's performance across various devices [here](https://aihub.qualcomm.com/models/falcon_v3_7b_instruct).
128
- Explore all available models on [Qualcomm® AI Hub](https://aihub.qualcomm.com/)
129
-
130
 
131
  ## License
132
  * The license for the original implementation of Falcon3-7B-Instruct can be found
133
  [here](https://falconllm.tii.ae/falcon-terms-and-conditions.html).
134
 
135
-
136
-
137
  ## References
138
  * [Source Model Implementation](https://huggingface.co/tiiuae/Falcon3-7B-Instruct)
139
 
140
-
141
-
142
  ## Community
143
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
144
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
145
 
146
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  ![](https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-models/models/falcon_v3_7b_instruct/web-assets/model_demo.png)
13
 
14
+ # Falcon3-7B-Instruct: Optimized for Qualcomm Devices
 
 
15
 
16
  Falcon3 family of Open Foundation Models is a set of pretrained and instruct LLMs ranging from 1B to 10B.
17
 
18
+ This is based on the implementation of Falcon3-7B-Instruct found [here](https://huggingface.co/tiiuae/Falcon3-7B-Instruct).
19
+ This repository contains pre-exported model files optimized for Qualcomm® devices. You can use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/falcon_v3_7b_instruct) library to export with custom configurations. More details on model performance across various devices, can be found [here](#performance-summary).
 
 
 
 
 
 
20
 
21
+ 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.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  ## Deploying Falcon3-7B-Instruct on-device
24
 
25
  Please follow the [LLM on-device deployment](https://github.com/quic/ai-hub-apps/tree/main/tutorials/llm_on_genie) tutorial.
26
 
27
+ ## Getting Started
28
+ There are two ways to deploy this model on your device:
29
 
30
+ ### Option 1: Download Pre-Exported Models
31
 
32
+ Download pre-exported model assets from **[Falcon3-7B-Instruct on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/falcon_v3_7b_instruct)**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
 
 
 
 
34
 
35
+ ### Option 2: Export with Custom Configurations
 
36
 
37
+ Use the [Qualcomm® AI Hub Models](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/falcon_v3_7b_instruct) Python library to compile and export the model with your own:
38
+ - Custom weights (e.g., fine-tuned checkpoints)
39
+ - Custom input shapes
40
+ - Target device and runtime configurations
 
41
 
42
+ This option is ideal if you need to customize the model beyond the default configuration provided here.
43
 
44
+ See our repository for [Falcon3-7B-Instruct on GitHub](https://github.com/quic/ai-hub-models/blob/main/qai_hub_models/models/falcon_v3_7b_instruct) for usage instructions.
45
 
46
+ ## Model Details
 
 
 
 
47
 
48
+ **Model Type:** Model_use_case.text_generation
 
 
49
 
50
+ **Model Stats:**
51
+ - Input sequence length for Prompt Processor: 128
52
+ - Context length: 4096
53
+ - Precision: w4a16 + w8a16 (few layers)
54
+ - Supported languages: English, French, Spanish, Portuguese.
55
+ - 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).
56
+ - Response Rate: Rate of response generation after the first response token.
57
 
58
+ ## Performance Summary
59
+ | Model | Runtime | Precision | Chipset | Context Length | Response Rate (tokens per second) | Time To First Token (range, seconds)
60
+ |---|---|---|---|---|---|---
61
+ | Falcon3-7B-Instruct | GENIE | w4a16 | Snapdragon® 8 Elite Mobile | 4096 | 14.02985 | 0.1265205 - 4.048656
62
+ | Falcon3-7B-Instruct | GENIE | w4a16 | Snapdragon® X Elite | 4096 | 9.96829 | 0.1973798 - 6.3161536
63
+ | Falcon3-7B-Instruct | GENIE | w4a16 | Snapdragon® 8 Elite Gen 5 Mobile | 4096 | 15.8303 | 0.10903 - 3.488966
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  ## License
66
  * The license for the original implementation of Falcon3-7B-Instruct can be found
67
  [here](https://falconllm.tii.ae/falcon-terms-and-conditions.html).
68
 
 
 
69
  ## References
70
  * [Source Model Implementation](https://huggingface.co/tiiuae/Falcon3-7B-Instruct)
71
 
 
 
72
  ## Community
73
  * Join [our AI Hub Slack community](https://aihub.qualcomm.com/community/slack) to collaborate, post questions and learn more about on-device AI.
74
  * For questions or feedback please [reach out to us](mailto:ai-hub-support@qti.qualcomm.com).
75
 
76
+ ## Usage and Limitations
77
+
78
+ This model may not be used for or in connection with any of the following applications:
79
+
80
+ - Accessing essential private and public services and benefits;
81
+ - Administration of justice and democratic processes;
82
+ - Assessing or recognizing the emotional state of a person;
83
+ - Biometric and biometrics-based systems, including categorization of persons based on sensitive characteristics;
84
+ - Education and vocational training;
85
+ - Employment and workers management;
86
+ - Exploitation of the vulnerabilities of persons resulting in harmful behavior;
87
+ - General purpose social scoring;
88
+ - Law enforcement;
89
+ - Management and operation of critical infrastructure;
90
+ - Migration, asylum and border control management;
91
+ - Predictive policing;
92
+ - Real-time remote biometric identification in public spaces;
93
+ - Recommender systems of social media platforms;
94
+ - Scraping of facial images (from the internet or otherwise); and/or
95
+ - Subliminal manipulation