Team Ai
Modelpublic

qualcomm/MiniLM-v2

sourceHugging Faceapache-2.0updated 3d agoView on Hugging Face
0likes
Model Card

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.

RuntimePrecisionChipsetSDK VersionsDownload
ONNXfloatUniversalQAIRT 2.50, ONNX Runtime 1.30.0Download
ONNXw8a8UniversalQAIRT 2.50, ONNX Runtime 1.30.0Download
QNN_DLCfloatUniversalQAIRT 2.50Download
QNN_DLCw8a8UniversalQAIRT 2.50Download
TFLITEfloatUniversalQAIRT 2.50Download
TFLITEw8a8UniversalQAIRT 2.50Download

For more device-specific assets and performance metrics, visit [MiniLM-v2 on Qualcomm® AI Hub](https://aihub.qualcomm.com/models/minilm_v2).

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: Modelusecase.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

ModelRuntimePrecisionChipsetInference Time (ms)Peak Memory Range (MB)Primary Compute Unit
MiniLM-v2ONNXfloatSnapdragon® 8 Elite Gen 5 For Galaxy Mobile0.407 ms0 - 67 MBNPU
MiniLM-v2ONNXfloatSnapdragon® 8 Elite For Galaxy Mobile0.508 ms0 - 64 MBNPU
MiniLM-v2ONNXfloatSnapdragon® X2 Elite0.42 ms1 - 1 MBNPU
MiniLM-v2ONNXfloatSnapdragon® X Elite1.056 ms44 - 44 MBNPU
MiniLM-v2ONNXfloatSnapdragon® 8 Gen 3 Mobile0.743 ms0 - 104 MBNPU
MiniLM-v2ONNXfloatSnapdragon® 8 Gen 1 Mobile1.812 ms0 - 107 MBNPU
MiniLM-v2ONNXfloatQualcomm® Dragonwing™ IQ-82751.29 ms0 - 4 MBNPU
MiniLM-v2ONNXfloatQualcomm® Dragonwing™ QCS8550 (Proxy)1.039 ms0 - 2 MBNPU
MiniLM-v2ONNXfloatQualcomm® QCS84501.812 ms0 - 107 MBNPU
MiniLM-v2ONNXfloatQualcomm® Dragonwing™ IQ-90751.302 ms0 - 3 MBNPU
MiniLM-v2ONNXfloatQualcomm® Dragonwing™ IQ-X71811.056 ms44 - 44 MBNPU
MiniLM-v2ONNXfloatQualcomm® Dragonwing™ Q-87500.508 ms0 - 64 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® 8 Elite Gen 5 For Galaxy Mobile0.659 ms0 - 61 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® 8 Elite For Galaxy Mobile0.829 ms0 - 57 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® X2 Elite0.649 ms1 - 1 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® X Elite1.774 ms23 - 23 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® 8 Gen 3 Mobile1.205 ms0 - 90 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® 8 Gen 1 Mobile1.91 ms0 - 88 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ QCS64904.412 ms0 - 3 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ IQ-82751.661 ms0 - 4 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ QCS8550 (Proxy)1.694 ms0 - 2 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® QCS84501.91 ms0 - 88 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ IQ-90751.809 ms0 - 3 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ IQ-X71811.774 ms23 - 23 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ Q-66906.357 ms0 - 64 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ Q-77901.77 ms0 - 57 MBNPU
MiniLM-v2ONNXw8a8Qualcomm® Dragonwing™ Q-87500.829 ms0 - 57 MBNPU
MiniLM-v2ONNXw8a8Snapdragon® 7 Gen 4 Mobile1.77 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® 8 Elite Gen 5 For Galaxy Mobile0.4 ms0 - 62 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® 8 Elite For Galaxy Mobile0.507 ms0 - 64 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® X2 Elite0.619 ms0 - 0 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® X Elite1.205 ms1 - 1 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® 8 Gen 3 Mobile0.733 ms0 - 104 MBNPU
MiniLM-v2QNN_DLCfloatSnapdragon® 8 Gen 1 Mobile1.807 ms0 - 104 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® Dragonwing™ IQ-82751.255 ms0 - 3 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® Dragonwing™ QCS8550 (Proxy)1.026 ms0 - 58 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® SA8775P1.41 ms0 - 63 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® SA8650P1.41 ms0 - 63 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® SA8255P1.41 ms0 - 63 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® QCS84501.807 ms0 - 104 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® Dragonwing™ IQ-90751.309 ms0 - 2 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® Dragonwing™ IQ-X71811.205 ms1 - 1 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® Dragonwing™ Q-87500.507 ms0 - 64 MBNPU
MiniLM-v2QNN_DLCfloatQualcomm® SA8295P2.062 ms0 - 60 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® 8 Elite Gen 5 For Galaxy Mobile0.68 ms0 - 55 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® 8 Elite For Galaxy Mobile0.849 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® X2 Elite0.805 ms0 - 0 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® X Elite1.916 ms1 - 1 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® 8 Gen 3 Mobile1.211 ms0 - 74 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® 8 Gen 1 Mobile1.934 ms0 - 75 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ QCS64903.76 ms0 - 2 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ IQ-82751.648 ms0 - 3 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ QCS8550 (Proxy)1.722 ms0 - 2 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® SA8775P1.926 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® SA8650P1.926 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® SA8255P1.926 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® QCS84501.934 ms0 - 75 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ IQ-90751.82 ms0 - 2 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ IQ-X71811.916 ms1 - 1 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ Q-66906.14 ms0 - 54 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ Q-77901.709 ms0 - 52 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® Dragonwing™ Q-87500.849 ms0 - 57 MBNPU
MiniLM-v2QNN_DLCw8a8Qualcomm® SA8295P2.251 ms0 - 52 MBNPU
MiniLM-v2QNN_DLCw8a8Snapdragon® 7 Gen 4 Mobile1.709 ms0 - 52 MBNPU
MiniLM-v2TFLITEfloatSnapdragon® 8 Elite Gen 5 For Galaxy Mobile0.437 ms0 - 62 MBNPU
MiniLM-v2TFLITEfloatSnapdragon® 8 Elite For Galaxy Mobile0.539 ms0 - 71 MBNPU
MiniLM-v2TFLITEfloatSnapdragon® 8 Gen 3 Mobile0.772 ms0 - 107 MBNPU
MiniLM-v2TFLITEfloatSnapdragon® 8 Gen 1 Mobile1.89 ms0 - 105 MBNPU
MiniLM-v2TFLITEfloatQualcomm® Dragonwing™ IQ-82751.305 ms0 - 47 MBNPU
MiniLM-v2TFLITEfloatQualcomm® Dragonwing™ QCS8550 (Proxy)1.056 ms0 - 3 MBNPU
MiniLM-v2TFLITEfloatQualcomm® SA8775P1.457 ms0 - 66 MBNPU
MiniLM-v2TFLITEfloatQualcomm® SA8650P1.457 ms0 - 66 MBNPU
MiniLM-v2TFLITEfloatQualcomm® SA8255P1.457 ms0 - 66 MBNPU
MiniLM-v2TFLITEfloatQualcomm® QCS84501.89 ms0 - 105 MBNPU
MiniLM-v2TFLITEfloatQualcomm® Dragonwing™ IQ-90751.323 ms0 - 46 MBNPU
MiniLM-v2TFLITEfloatQualcomm® Dragonwing™ Q-87500.539 ms0 - 71 MBNPU
MiniLM-v2TFLITEfloatQualcomm® SA8295P2.141 ms0 - 59 MBNPU
MiniLM-v2TFLITEw8a8Snapdragon® 8 Elite Gen 5 For Galaxy Mobile0.849 ms0 - 56 MBNPU
MiniLM-v2TFLITEw8a8Snapdragon® 8 Elite For Galaxy Mobile1.074 ms0 - 57 MBNPU
MiniLM-v2TFLITEw8a8Snapdragon® 8 Gen 3 Mobile1.524 ms0 - 77 MBNPU
MiniLM-v2TFLITEw8a8Snapdragon® 8 Gen 1 Mobile2.352 ms0 - 84 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ QCS649016.469 ms0 - 32 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ IQ-82752.065 ms0 - 25 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ QCS8550 (Proxy)2.151 ms0 - 2 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® SA8775P2.415 ms0 - 61 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® SA8650P2.415 ms0 - 61 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® SA8255P2.415 ms0 - 61 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® QCS84502.352 ms0 - 84 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ IQ-90752.28 ms0 - 24 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ Q-669012.133 ms0 - 50 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ Q-77905.375 ms0 - 38 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® Dragonwing™ Q-87501.074 ms0 - 57 MBNPU
MiniLM-v2TFLITEw8a8Qualcomm® SA8295P2.848 ms0 - 52 MBNPU
MiniLM-v2TFLITEw8a8Snapdragon® 7 Gen 4 Mobile5.375 ms0 - 38 MBNPU

License

  • —The license for the original implementation of MiniLM-v2 can be found here.

References

Community