MiniLM-v2: Optimized for Qualcomm Devices

All-MiniLM-L6-v2 maps sentences to a 384-dimensional dense vector space. Trained on 1B+ sentence pairs, it excels at semantic search, clustering, and sentence similarity tasks while being small enough to run on mobile devices.

This is based on the implementation of MiniLM-v2 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.50, ONNX Runtime 1.27.1 Download
ONNX w8a8 Universal QAIRT 2.50, ONNX Runtime 1.27.1 Download
QNN_DLC float Universal QAIRT 2.50 Download
QNN_DLC w8a8 Universal QAIRT 2.50 Download
TFLITE float Universal QAIRT 2.50 Download

For more device-specific assets and performance metrics, visit MiniLM-v2 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 MiniLM-v2 on GitHub for usage instructions.

Model Details

Model Type: Model_use_case.text_generation

Model Stats:

  • Embedding dimension: 384
  • Input resolution: 128 tokens
  • Model checkpoint: sentence-transformers/all-MiniLM-L6-v2
  • Model size (float): 86.7 MB
  • Number of parameters: 22.7M

Performance Summary

Model Runtime Precision Chipset Inference Time (ms) Peak Memory Range (MB) Primary Compute Unit
MiniLM-v2 ONNX float Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 0.588 ms 0 - 65 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Elite For Galaxy Mobile 0.738 ms 0 - 61 MB NPU
MiniLM-v2 ONNX float Snapdragon® X2 Elite 0.591 ms 1 - 1 MB NPU
MiniLM-v2 ONNX float Snapdragon® X Elite 1.582 ms 44 - 44 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Gen 3 Mobile 1.074 ms 0 - 107 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Gen 1 Mobile 2.271 ms 0 - 111 MB NPU
MiniLM-v2 ONNX float Qualcomm® Dragonwing™ IQ-8275 1.714 ms 0 - 4 MB NPU
MiniLM-v2 ONNX float Qualcomm® Dragonwing™ QCS8550 (Proxy) 1.532 ms 0 - 24 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS8450 2.271 ms 0 - 111 MB NPU
MiniLM-v2 ONNX float Qualcomm® Dragonwing™ IQ-9075 1.794 ms 0 - 3 MB NPU
MiniLM-v2 ONNX float Qualcomm® Dragonwing™ IQ-X7181 1.582 ms 44 - 44 MB NPU
MiniLM-v2 ONNX float Qualcomm® Dragonwing™ Q-8750 0.738 ms 0 - 61 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 0.668 ms 0 - 64 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Elite For Galaxy Mobile 0.841 ms 0 - 63 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® X2 Elite 0.681 ms 1 - 1 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® X Elite 1.782 ms 23 - 23 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Gen 3 Mobile 1.215 ms 0 - 91 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Gen 1 Mobile 1.94 ms 0 - 91 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ QCS6490 4.723 ms 0 - 3 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ IQ-8275 1.695 ms 0 - 4 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ QCS8550 (Proxy) 1.721 ms 0 - 26 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS8450 1.94 ms 0 - 91 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ IQ-9075 1.841 ms 0 - 3 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ IQ-X7181 1.782 ms 23 - 23 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ Q-6690 6.436 ms 0 - 65 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ Q-7790 1.798 ms 0 - 58 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® Dragonwing™ Q-8750 0.841 ms 0 - 63 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 7 Gen 4 Mobile 1.798 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 0.405 ms 0 - 62 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Elite For Galaxy Mobile 0.512 ms 0 - 62 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® X2 Elite 0.609 ms 0 - 0 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® X Elite 1.223 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Gen 3 Mobile 0.729 ms 0 - 98 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Gen 1 Mobile 1.804 ms 0 - 104 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® Dragonwing™ IQ-8275 1.262 ms 0 - 3 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® Dragonwing™ QCS8550 (Proxy) 1.039 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA8775P 1.415 ms 0 - 63 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA8650P 1.415 ms 0 - 63 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA8255P 1.415 ms 0 - 63 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS8450 1.804 ms 0 - 104 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® Dragonwing™ IQ-9075 1.309 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® Dragonwing™ IQ-X7181 1.223 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® Dragonwing™ Q-8750 0.512 ms 0 - 62 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA7255P 3.457 ms 0 - 62 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA8295P 2.071 ms 0 - 60 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 0.682 ms 0 - 55 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Elite For Galaxy Mobile 0.858 ms 0 - 53 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® X2 Elite 0.808 ms 0 - 0 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® X Elite 1.939 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Gen 3 Mobile 1.224 ms 0 - 75 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Gen 1 Mobile 1.965 ms 0 - 78 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ QCS6490 3.955 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ IQ-8275 1.679 ms 0 - 3 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ QCS8550 (Proxy) 1.752 ms 0 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA8775P 1.941 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA8650P 1.941 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA8255P 1.941 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS8450 1.965 ms 0 - 78 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ IQ-9075 1.855 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ IQ-X7181 1.939 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ Q-6690 6.245 ms 0 - 54 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ Q-7790 1.732 ms 0 - 52 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® Dragonwing™ Q-8750 0.858 ms 0 - 53 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA7255P 3.444 ms 0 - 54 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA8295P 2.31 ms 0 - 52 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 7 Gen 4 Mobile 1.732 ms 0 - 52 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Elite Gen 5 For Galaxy Mobile 0.433 ms 0 - 64 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Elite For Galaxy Mobile 0.538 ms 0 - 70 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Gen 3 Mobile 0.762 ms 0 - 108 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Gen 1 Mobile 1.899 ms 0 - 104 MB NPU
MiniLM-v2 TFLITE float Qualcomm® Dragonwing™ IQ-8275 1.303 ms 0 - 47 MB NPU
MiniLM-v2 TFLITE float Qualcomm® Dragonwing™ QCS8550 (Proxy) 1.061 ms 0 - 2 MB NPU
MiniLM-v2 TFLITE float Qualcomm® QCS8450 1.899 ms 0 - 104 MB NPU
MiniLM-v2 TFLITE float Qualcomm® Dragonwing™ IQ-9075 1.326 ms 0 - 46 MB NPU
MiniLM-v2 TFLITE float Qualcomm® Dragonwing™ Q-8750 0.538 ms 0 - 70 MB NPU
MiniLM-v2 TFLITE float Qualcomm® SA8295P 2.157 ms 0 - 59 MB NPU

License

  • The license for the original implementation of MiniLM-v2 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/MiniLM-v2