Distil-Bert-Base-Uncased-Hf: Optimized for Qualcomm Devices
DistilBERT is a lightweight BERT model designed for efficient self-supervised learning of language representations. It can be used for masked language modeling and as a backbone for various NLP tasks.
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.37, ONNX Runtime 1.23.0 | Download |
| ONNX | w8a16 | Universal | QAIRT 2.37, ONNX Runtime 1.23.0 | Download |
| QNN_DLC | float | Universal | QAIRT 2.42 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.42 | Download |
| TFLITE | float | Universal | QAIRT 2.42, TFLite 2.17.0 | Download |
For more device-specific assets and performance metrics, visit Distil-Bert-Base-Uncased-Hf 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 Distil-Bert-Base-Uncased-Hf on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.text_generation
Model Stats:
- Model checkpoint: distil_bert_base_uncased_hf
- Input resolution: 1x384
- Number of parameters: 11.3M
- Model size (float): 43.3 MB
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Snapdragon® X Elite | 18.999 ms | 179 - 179 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Snapdragon® 8 Gen 3 Mobile | 15.081 ms | 0 - 469 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Qualcomm® QCS8550 (Proxy) | 20.102 ms | 0 - 390 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Qualcomm® QCS9075 | 22.109 ms | 0 - 3 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Snapdragon® 8 Elite For Galaxy Mobile | 10.491 ms | 0 - 428 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | float | Snapdragon® 8 Elite Gen 5 Mobile | 8.904 ms | 0 - 448 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® X Elite | 194.493 ms | 590 - 590 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCS6490 | 1352.618 ms | 182 - 265 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCM6690 | 728.856 ms | 350 - 362 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 335.303 ms | 331 - 1042 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 710.038 ms | 354 - 367 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 329.203 ms | 229 - 938 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® X Elite | 14.519 ms | 0 - 0 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 11.717 ms | 0 - 438 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 49.983 ms | 0 - 394 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 15.132 ms | 0 - 2 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8775P | 18.833 ms | 0 - 395 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS9075 | 19.034 ms | 0 - 2 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 36.589 ms | 0 - 407 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA7255P | 49.983 ms | 0 - 394 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8295P | 23.827 ms | 0 - 375 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.154 ms | 0 - 392 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.856 ms | 0 - 357 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® X Elite | 7.907 ms | 0 - 0 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 5.106 ms | 0 - 357 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® QCS8275 (Proxy) | 17.698 ms | 0 - 290 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® QCS8550 (Proxy) | 7.395 ms | 0 - 2 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA8775P | 7.589 ms | 0 - 290 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® QCS9075 | 9.247 ms | 2 - 4 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA7255P | 17.698 ms | 0 - 290 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 4.094 ms | 0 - 290 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 3.012 ms | 0 - 309 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.806 ms | 0 - 450 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 50.277 ms | 0 - 408 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 14.979 ms | 0 - 2 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8775P | 19.053 ms | 0 - 408 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS9075 | 19.468 ms | 0 - 176 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 36.783 ms | 0 - 417 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA7255P | 50.277 ms | 0 - 408 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8295P | 23.484 ms | 0 - 387 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.482 ms | 0 - 398 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 7.099 ms | 0 - 378 MB | NPU |
License
- The license for the original implementation of Distil-Bert-Base-Uncased-Hf can be found here.
References
Community
- Join our AI Hub Slack community to collaborate, post questions and learn more about on-device AI.
- For questions or feedback please reach out to us.
