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.45, ONNX Runtime 1.25.0 Download
ONNX w8a8 Universal QAIRT 2.45, ONNX Runtime 1.25.0 Download
QNN_DLC float Universal QAIRT 2.45 Download
QNN_DLC w8a8 Universal QAIRT 2.45 Download
TFLITE float Universal QAIRT 2.45 Download
TFLITE w8a8 Universal QAIRT 2.45 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:

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

Performance Summary

Model Runtime Precision Chipset Inference Time (ms) Peak Memory Range (MB) Primary Compute Unit
MiniLM-v2 ONNX float Snapdragon® X2 Elite 0.774 ms 212 - 212 MB NPU
MiniLM-v2 ONNX float Snapdragon® X Elite 1.769 ms 149 - 149 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Gen 3 Mobile 1.231 ms 0 - 93 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Gen 1 Mobile 2.535 ms 0 - 98 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS8550 (Proxy) 1.772 ms 0 - 3 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS8450 2.535 ms 0 - 98 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Elite Mobile 0.866 ms 0 - 62 MB NPU
MiniLM-v2 ONNX float Snapdragon® 8 Elite Gen 5 Mobile 0.698 ms 0 - 58 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS9075 2.964 ms 0 - 45 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS8750 0.866 ms 0 - 62 MB NPU
MiniLM-v2 ONNX float Qualcomm® QCS7181 1.769 ms 149 - 149 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® X2 Elite 0.669 ms 213 - 213 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® X Elite 1.788 ms 149 - 149 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Gen 3 Mobile 1.194 ms 0 - 78 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Gen 1 Mobile 1.98 ms 0 - 78 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS6490 4.839 ms 0 - 45 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS8550 (Proxy) 1.716 ms 0 - 27 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS8450 1.98 ms 0 - 78 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Elite Gen 5 Mobile 0.664 ms 0 - 56 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 7 Gen 4 Mobile 1.943 ms 0 - 51 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCM6690 6.704 ms 0 - 57 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS9075 1.871 ms 0 - 45 MB NPU
MiniLM-v2 ONNX w8a8 Snapdragon® 8 Elite Mobile 0.84 ms 0 - 56 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS7790 1.943 ms 0 - 51 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS8750 0.84 ms 0 - 56 MB NPU
MiniLM-v2 ONNX w8a8 Qualcomm® QCS7181 1.788 ms 149 - 149 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® X2 Elite 0.682 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® X Elite 1.302 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Gen 3 Mobile 0.795 ms 0 - 101 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Gen 1 Mobile 1.886 ms 0 - 100 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS8275 3.561 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS8550 (Proxy) 1.125 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS8450 1.886 ms 0 - 100 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Elite Mobile 0.567 ms 0 - 60 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA8295P 2.301 ms 0 - 56 MB NPU
MiniLM-v2 QNN_DLC float Snapdragon® 8 Elite Gen 5 Mobile 0.461 ms 0 - 60 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® SA7255P 3.561 ms 0 - 58 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS9075 1.451 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS8750 0.567 ms 0 - 60 MB NPU
MiniLM-v2 QNN_DLC float Qualcomm® QCS7181 1.302 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® X2 Elite 0.819 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® X Elite 1.912 ms 1 - 1 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Gen 3 Mobile 1.206 ms 0 - 69 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Gen 1 Mobile 1.952 ms 0 - 72 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS6490 3.699 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS8275 3.456 ms 0 - 48 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS8550 (Proxy) 1.715 ms 0 - 51 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS8450 1.952 ms 0 - 72 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Elite Gen 5 Mobile 0.681 ms 0 - 54 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 7 Gen 4 Mobile 1.694 ms 0 - 47 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCM6690 6.088 ms 2 - 52 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS9075 1.862 ms 0 - 2 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA7255P 3.456 ms 0 - 48 MB NPU
MiniLM-v2 QNN_DLC w8a8 Snapdragon® 8 Elite Mobile 0.839 ms 0 - 52 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® SA8295P 2.372 ms 0 - 46 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS7790 1.694 ms 0 - 47 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS8750 0.839 ms 0 - 52 MB NPU
MiniLM-v2 QNN_DLC w8a8 Qualcomm® QCS7181 1.912 ms 1 - 1 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Gen 3 Mobile 0.832 ms 0 - 102 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Gen 1 Mobile 1.932 ms 0 - 102 MB NPU
MiniLM-v2 TFLITE float Qualcomm® QCS8275 3.674 ms 0 - 63 MB NPU
MiniLM-v2 TFLITE float Qualcomm® QCS8550 (Proxy) 1.127 ms 0 - 2 MB NPU
MiniLM-v2 TFLITE float Qualcomm® SA8775P 12.459 ms 0 - 28 MB GPU
MiniLM-v2 TFLITE float Qualcomm® SA8650P 12.459 ms 0 - 28 MB GPU
MiniLM-v2 TFLITE float Qualcomm® SA8255P 12.459 ms 0 - 28 MB GPU
MiniLM-v2 TFLITE float Qualcomm® QCS8450 1.932 ms 0 - 102 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Elite Mobile 0.593 ms 0 - 65 MB NPU
MiniLM-v2 TFLITE float Qualcomm® SA8295P 2.366 ms 0 - 56 MB NPU
MiniLM-v2 TFLITE float Snapdragon® 8 Elite Gen 5 Mobile 0.482 ms 0 - 58 MB NPU
MiniLM-v2 TFLITE float Qualcomm® SA7255P 3.674 ms 0 - 63 MB NPU
MiniLM-v2 TFLITE float Qualcomm® QCS9075 1.501 ms 0 - 45 MB NPU
MiniLM-v2 TFLITE float Qualcomm® QCS8750 0.593 ms 0 - 65 MB NPU
MiniLM-v2 TFLITE w8a8 Snapdragon® 8 Gen 3 Mobile 1.672 ms 0 - 83 MB NPU
MiniLM-v2 TFLITE w8a8 Snapdragon® 8 Gen 1 Mobile 2.619 ms 0 - 80 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS6490 13.129 ms 0 - 31 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS8275 4.618 ms 0 - 55 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS8550 (Proxy) 2.366 ms 0 - 3 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® SA8775P 12.541 ms 0 - 30 MB GPU
MiniLM-v2 TFLITE w8a8 Qualcomm® SA8650P 12.541 ms 0 - 30 MB GPU
MiniLM-v2 TFLITE w8a8 Qualcomm® SA8255P 12.541 ms 0 - 30 MB GPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS8450 2.619 ms 0 - 80 MB NPU
MiniLM-v2 TFLITE w8a8 Snapdragon® 8 Elite Gen 5 Mobile 0.947 ms 0 - 54 MB NPU
MiniLM-v2 TFLITE w8a8 Snapdragon® 7 Gen 4 Mobile 5.123 ms 0 - 35 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCM6690 12.046 ms 0 - 35 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS9075 2.498 ms 0 - 24 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® SA7255P 4.618 ms 0 - 55 MB NPU
MiniLM-v2 TFLITE w8a8 Snapdragon® 8 Elite Mobile 1.134 ms 0 - 62 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® SA8295P 3.202 ms 0 - 48 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS7790 5.123 ms 0 - 35 MB NPU
MiniLM-v2 TFLITE w8a8 Qualcomm® QCS8750 1.134 ms 0 - 62 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