Bert-Base-Uncased-Hf: Optimized for Qualcomm Devices
Bert 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 is based on the implementation of Bert-Base-Uncased-Hf found here. 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.45, ONNX Runtime 1.27.1 | Download |
| QNN_DLC | float | Universal | QAIRT 2.45 | Download |
| QNN_DLC | w8a16 | Universal | QAIRT 2.45 | Download |
| TFLITE | float | Universal | QAIRT 2.45 | Download |
For more device-specific assets and performance metrics, visit 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 Bert-Base-Uncased-Hf on GitHub for usage instructions.
Model Details
Model Type: Model_use_case.text_generation
Model Stats:
- Input resolution: 1x384
- Model checkpoint: google-bert/bert-base-uncased
- Model size (float): 418 MB
- Number of parameters: 110M
Performance Summary
| Model | Runtime | Precision | Chipset | Inference Time (ms) | Peak Memory Range (MB) | Primary Compute Unit |
|---|---|---|---|---|---|---|
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® X2 Elite | 5.463 ms | 1 - 1 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® X Elite | 15.642 ms | 154 - 154 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Gen 3 Mobile | 11.464 ms | 0 - 525 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Gen 1 Mobile | 24.541 ms | 0 - 527 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS6490 | 118.221 ms | 60 - 63 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 14.929 ms | 0 - 4 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 15.66 ms | 0 - 163 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® QCS8450 | 24.541 ms | 0 - 527 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 15.499 ms | 0 - 3 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 15.642 ms | 154 - 154 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-6690 | 170.984 ms | 58 - 595 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-7790 | 35.154 ms | 59 - 538 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 8.845 ms | 0 - 460 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Elite Mobile | 8.845 ms | 0 - 460 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 4.906 ms | 0 - 466 MB | NPU |
| Bert-Base-Uncased-Hf | ONNX | w8a16 | Snapdragon® 7 Gen 4 Mobile | 35.154 ms | 59 - 538 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® X2 Elite | 21.637 ms | 1 - 1 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® X Elite | 18.778 ms | 0 - 0 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Gen 3 Mobile | 12.42 ms | 0 - 540 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Gen 1 Mobile | 36.531 ms | 0 - 575 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-8275 | 24.617 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 17.754 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8775P | 24.295 ms | 0 - 358 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8650P | 24.295 ms | 0 - 358 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8255P | 24.295 ms | 0 - 358 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® QCS8450 | 36.531 ms | 0 - 575 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-9075 | 24.159 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® Dragonwing™ IQ-X7181 | 18.778 ms | 0 - 0 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® Dragonwing™ Q-8750 | 9.051 ms | 0 - 395 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA7255P | 76.844 ms | 0 - 358 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Qualcomm® SA8295P | 30.133 ms | 0 - 397 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite Mobile | 9.051 ms | 0 - 395 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.61 ms | 0 - 346 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® X2 Elite | 5.426 ms | 1 - 1 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® X Elite | 12.107 ms | 0 - 0 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Gen 3 Mobile | 7.849 ms | 0 - 519 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-8275 | 10.561 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 11.424 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA8775P | 11.157 ms | 0 - 446 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA8650P | 11.157 ms | 0 - 446 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA8255P | 11.157 ms | 0 - 446 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-9075 | 11.044 ms | 2 - 4 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ IQ-X7181 | 12.107 ms | 0 - 0 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® Dragonwing™ Q-8750 | 6.429 ms | 0 - 458 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Qualcomm® SA7255P | 27.074 ms | 0 - 444 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Elite Mobile | 6.429 ms | 0 - 458 MB | NPU |
| Bert-Base-Uncased-Hf | QNN_DLC | w8a16 | Snapdragon® 8 Elite Gen 5 Mobile | 4.359 ms | 0 - 463 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Gen 3 Mobile | 12.499 ms | 0 - 555 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Gen 1 Mobile | 36.33 ms | 0 - 584 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® Dragonwing™ IQ-8275 | 24.758 ms | 0 - 260 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® Dragonwing™ QCS8550 (Proxy) | 17.143 ms | 0 - 2 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8775P | 24.491 ms | 0 - 373 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8650P | 24.491 ms | 0 - 373 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8255P | 24.491 ms | 0 - 373 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® QCS8450 | 36.33 ms | 0 - 584 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® Dragonwing™ IQ-9075 | 24.672 ms | 0 - 259 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® Dragonwing™ Q-8750 | 9.202 ms | 0 - 404 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA7255P | 77.276 ms | 0 - 373 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Qualcomm® SA8295P | 30.149 ms | 0 - 400 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite Mobile | 9.202 ms | 0 - 404 MB | NPU |
| Bert-Base-Uncased-Hf | TFLITE | float | Snapdragon® 8 Elite Gen 5 Mobile | 6.864 ms | 0 - 387 MB | NPU |
License
- The license for the original implementation of Bert-Base-Uncased-Hf can be found here.
References
- BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
- Source Model Implementation
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.
