Whisper-Small-Quantized: Transformer-based automatic speech recognition (ASR) model for multilingual transcription and translation available on HuggingFace
We have applied w8a16 quantization to significantly enhance performance and efficiency. HuggingFace Whisper-Small ASR (Automatic Speech Recognition) model is a state-of-the-art system designed for transcribing spoken language into written text. This model is based on the transformer architecture and has been optimized for edge inference by replacing Multi-Head Attention (MHA) with Single-Head Attention (SHA) and linear layers with convolutional (conv) layers. It exhibits robust performance in realistic, noisy environments, making it highly reliable for real-world applications. Specifically, it excels in long-form transcription, capable of accurately transcribing audio clips up to 30 seconds long. Time to the first token is the encoder's latency, while time to each additional token is decoder's latency, where we assume a max decoded length specified below.
This is based on the implementation of Whisper-Small-Quantized found here. This repository contains scripts for optimized on-device export suitable to run on Qualcomm® devices. 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.
Use our lightweight command-line interface to inspect and download Whisper-Small-Quantized:
pip install qai_hub_models_cli # (the CLI is also available with the qai-hub-models package)
# Inspect the model and list the available download options
qai-hub-models info Whisper-Small-Quantized
# Print performance and accuracy metrics
qai-hub-models perf Whisper-Small-Quantized
qai-hub-models numerics Whisper-Small-Quantized
# Download a ready-to-deploy asset
qai-hub-models fetch Whisper-Small-Quantized --runtime qnn_context_binary --precision w8a16See the CLI README for the full list of commands and filters.
This model is compatible with the Qualcomm Voice AI SDK. Download the SDK from the Qualcomm Package Manager to deploy this model on-device.
sudo apt install ffmpeg libportaudio2winget install ffmpeg
Install the package via pip:
# NOTE: 3.10 <= PYTHON_VERSION < 3.14 is supported.
pip install "qai-hub-models[whisper-small-quantized]"Sign-in to Qualcomm® AI Hub Workbench with your
Qualcomm® ID. Once signed in navigate to Account -> Settings -> API Token.
With this API token, you can configure your client to run models on the cloud hosted devices.
qai-hub configure --api_token API_TOKENNavigate to docs for more information.
Run the following simple CLI demo to verify the model is working end to end:
python -m qai_hub_models.models.whisper_small_quantized.demoMore details on the CLI tool can be found with the --help option. See
demo.py for sample usage of the model including pre/post processing
scripts. Please refer to our general instructions on using
models for more usage instructions.
To run the model on Qualcomm® devices, you must export the model for use with an edge runtime such as TensorFlow Lite, ONNX Runtime, or Qualcomm AI Engine Direct. Use the following command to export the model:
qai-hub-models export whisper_small_quantized --target-runtime qnn_context_binary --precision w8a16 --device "Samsung Galaxy S25 (Family)"Additional options are documented with the --help option.
- The license for the original implementation of Whisper-Small-Quantized can be found here.
- 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.