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 | w8a16 | Universal | QAIRT 2.42, ONNX Runtime 1.24.3 | Download |
| QNN_DLC | float | Universal | QAIRT 2.43 | Download |
| TFLITE | float | Universal | QAIRT 2.43, TFLite 2.19.1 | 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 | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 5.028 ms | 0 - 304 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® X2 Elite | 5.049 ms | 111 - 111 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® X Elite | 12.018 ms | 112 - 112 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 8.395 ms | 0 - 401 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCS6490 | 1361.039 ms | 189 - 278 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCS8550 (Proxy) | 11.413 ms | 0 - 116 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCS9075 | 12.62 ms | 0 - 3 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCM6690 | 710.842 ms | 354 - 367 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Elite For Galaxy Mobile | 6.33 ms | 0 - 302 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 702.472 ms | 355 - 368 MB | CPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.652 ms | 0 - 381 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® X2 Elite | 7.364 ms | 0 - 0 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® X Elite | 14.482 ms | 0 - 0 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 11.872 ms | 0 - 426 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8275 (Proxy) | 50.087 ms | 0 - 384 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8550 (Proxy) | 15.364 ms | 0 - 2 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8775P | 18.828 ms | 0 - 385 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS9075 | 19.163 ms | 2 - 4 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8450 (Proxy) | 21.112 ms | 0 - 408 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA7255P | 50.087 ms | 0 - 384 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8295P | 23.647 ms | 0 - 363 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.194 ms | 0 - 382 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.935 ms | 0 - 393 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 11.944 ms | 0 - 434 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8275 (Proxy) | 50.388 ms | 0 - 398 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8550 (Proxy) | 15.202 ms | 0 - 3 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8775P | 19.1 ms | 0 - 396 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS9075 | 19.432 ms | 0 - 176 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8450 (Proxy) | 21.255 ms | 0 - 403 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA7255P | 50.388 ms | 0 - 398 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8295P | 23.614 ms | 0 - 368 MB | NPU |
| Distil-Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite For Galaxy Mobile | 8.349 ms | 0 - 387 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.
