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 float Universal QAIRT 2.42, ONNX Runtime 1.24.1 Download
ONNX w8a16 Universal QAIRT 2.42, ONNX Runtime 1.24.1 Download
QNN_DLC float Universal QAIRT 2.43 Download
QNN_DLC w8a16 Universal QAIRT 2.43 Download
TFLITE float Universal QAIRT 2.43, TFLite 2.17.0 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:

  • Model checkpoint: google-bert/bert-base-uncased
  • Input resolution: 1x384
  • Number of parameters: 110M
  • Model size (float): 418 MB

Performance Summary

Model Runtime Precision Chipset Inference Time (ms) Peak Memory Range (MB) Primary Compute Unit
Bert-Base-Uncased-Hf ONNX float Snapdragon® X Elite 31.093 ms 265 - 265 MB NPU
Bert-Base-Uncased-Hf ONNX float Snapdragon® 8 Gen 3 Mobile 23.713 ms 0 - 752 MB NPU
Bert-Base-Uncased-Hf ONNX float Qualcomm® QCS8550 (Proxy) 31.745 ms 0 - 340 MB NPU
Bert-Base-Uncased-Hf ONNX float Qualcomm® QCS9075 36.35 ms 0 - 3 MB NPU
Bert-Base-Uncased-Hf ONNX float Snapdragon® 8 Elite For Galaxy Mobile 17.03 ms 0 - 699 MB NPU
Bert-Base-Uncased-Hf ONNX float Snapdragon® 8 Elite Gen 5 Mobile 13.771 ms 0 - 718 MB NPU
Bert-Base-Uncased-Hf ONNX float Snapdragon® X2 Elite 14.739 ms 265 - 265 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® X Elite 20.888 ms 154 - 154 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® 8 Gen 3 Mobile 14.841 ms 0 - 595 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Qualcomm® QCS6490 2282.508 ms 188 - 281 MB CPU
Bert-Base-Uncased-Hf ONNX w8a16 Qualcomm® QCS8550 (Proxy) 19.946 ms 0 - 166 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Qualcomm® QCS9075 20.968 ms 0 - 3 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Qualcomm® QCM6690 1210.957 ms 200 - 215 MB CPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® 8 Elite For Galaxy Mobile 10.857 ms 0 - 418 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® 7 Gen 4 Mobile 1188.931 ms 203 - 218 MB CPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® 8 Elite Gen 5 Mobile 8.339 ms 0 - 409 MB NPU
Bert-Base-Uncased-Hf ONNX w8a16 Snapdragon® X2 Elite 8.742 ms 154 - 154 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Snapdragon® X Elite 22.546 ms 0 - 0 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Snapdragon® 8 Gen 3 Mobile 17.014 ms 0 - 587 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® QCS8275 (Proxy) 81.531 ms 0 - 519 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® QCS8550 (Proxy) 23.245 ms 0 - 2 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® SA8775P 28.735 ms 0 - 520 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® QCS9075 28.893 ms 0 - 2 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® QCS8450 (Proxy) 32.332 ms 0 - 565 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® SA7255P 81.531 ms 0 - 519 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Qualcomm® SA8295P 35.957 ms 0 - 501 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 12.025 ms 0 - 519 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 9.512 ms 0 - 536 MB NPU
Bert-Base-Uncased-Hf QNN_DLC float Snapdragon® X2 Elite 10.492 ms 1 - 1 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Snapdragon® X Elite 13.948 ms 0 - 0 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Snapdragon® 8 Gen 3 Mobile 9.155 ms 0 - 500 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Qualcomm® QCS8275 (Proxy) 30.741 ms 0 - 408 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Qualcomm® QCS8550 (Proxy) 13.258 ms 0 - 2 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Qualcomm® SA8775P 13.166 ms 0 - 408 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Qualcomm® QCS9075 15.659 ms 2 - 4 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Qualcomm® SA7255P 30.741 ms 0 - 408 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Snapdragon® 8 Elite For Galaxy Mobile 7.296 ms 0 - 410 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Snapdragon® 8 Elite Gen 5 Mobile 5.134 ms 0 - 414 MB NPU
Bert-Base-Uncased-Hf QNN_DLC w8a16 Snapdragon® X2 Elite 6.087 ms 1 - 1 MB NPU
Bert-Base-Uncased-Hf TFLITE float Snapdragon® 8 Gen 3 Mobile 17.06 ms 0 - 592 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® QCS8275 (Proxy) 81.835 ms 0 - 532 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® QCS8550 (Proxy) 22.476 ms 0 - 3 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® SA8775P 121.121 ms 0 - 533 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® QCS9075 29.219 ms 0 - 259 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® QCS8450 (Proxy) 48.08 ms 0 - 565 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® SA7255P 81.835 ms 0 - 532 MB NPU
Bert-Base-Uncased-Hf TFLITE float Qualcomm® SA8295P 35.785 ms 0 - 503 MB NPU
Bert-Base-Uncased-Hf TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 12.449 ms 0 - 526 MB NPU
Bert-Base-Uncased-Hf TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 9.739 ms 0 - 546 MB NPU

License

  • The license for the original implementation of Bert-Base-Uncased-Hf can be found here.

References

Community

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for qualcomm/Bert-Base-Uncased-Hf