%2C%203.13-yellow)
The Qualcomm® AI Hub Models are a collection of
state-of-the-art machine learning models optimized for deployment on Qualcomm® devices.
See supported: On-Device Runtimes, Hardware Targets & Precision, Chipsets, Devices
Install Python Package
Choose the package that fits your use case (both provide the qai-hub-models command-line interface):
# Lightweight CLI for:
# - browsing the catalog (model info, performance, & evals)
# - downloading deployable model assets
pip install qai-hub-models-cli
or
# The full package, for exporting from source, evaluating models, and running end-to-end demos. Includes the CLI.
#
# NOTE for Snapdragon X Elite and Snapdragon X2 Elite users:
# AMDx64 (64-bit) Python is required on Windows.
# Installation will fail when using Windows ARM64 Python.
pip install qai_hub_models
Browse and Download Models
Use the CLI to browse the catalog and download deployable assets:
qai-hub-models models # browse the catalog
qai-hub-models info mobilenet_v2 # model details + download options
qai-hub-models numerics mobilenet_v2 # model evaluation results
qai-hub-models perf mobilenet_v2 # model performance results
qai-hub-models fetch mobilenet_v2 --runtime tflite --precision float # download a deployable asset
# ... and more
The CLI also offers a Python API. See the CLI README for full usage instructions.
Export from Source and Run A Model on a Physical Device
All models in our directory can be compiled and profiled on a hosted
Qualcomm® device.
The downloads and numerics / performance results published with each release are generated by the export and evaluate commands outlined below.
1. Configure AI Hub Workbench Access
Create a Qualcomm® ID, use it to login to Qualcomm® AI Hub Workbench,
and configure your API token:
qai-hub configure --api_token API_TOKEN
2. Install Model-Specific Dependencies
qai-hub-models install yolov7
3. Compile, Export, and Evaluate the model.
# Quantize the floating point model to w8a8, convert it to LiteRT format, and profile it on the Samsung Galaxy S25.
qai-hub-models export yolov7 --target-runtime tflite --precision w8a8 --device "Samsung Galaxy S25 (Family)"
# Download a dataset and run evaluation of the LiteRT model on the Samsung Galaxy S25.
qai-hub-models evaluate yolov7 --hub-model-id <Model ID printed by export>
Export and evaluate use Qualcomm® AI Hub Workbench to:
- If applicable, Quantize the model (see: Quantization on AI Hub Workbench)
- Compile the model for the chosen device and target runtime (see: Compiling Models on AI Hub Workbench).
- Download the model.
- Profile the compiled model on a real device in the cloud (see: Profiling Models on AI Hub Workbench).
- Evaluate the model on a subset of a dataset on a real device in the cloud, and compare on-device model output with PyTorch output (see: Running Inference on AI Hub Workbench)
Sample Applications
Native applications that can run our models (with pre and post processing) on physical devices are published in the AI Hub Apps repository.
Python applications are defined for all models (from qai_hub_models.models.<model_name> import App). These apps wrap model inference with pre- and post-processing steps written using torch & numpy. These apps are optimized to be an easy-to-follow example, rather than to minimize prediction time.
End-To-End Model Use-Case Demos