Sentence Similarity
ONNX
sentence-transformers
light-embed
mpnet
feature-extraction
text-embeddings-inference
Instructions to use LightEmbed/all-mpnet-base-v2-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use LightEmbed/all-mpnet-base-v2-onnx with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("LightEmbed/all-mpnet-base-v2-onnx") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download modules.json from LightEmbed/all-mpnet-base-v2-onnx: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/LightEmbed/all-mpnet-base-v2-onnx/resolve/main/modules.json
- Command line
-
hf download hf://LightEmbed/all-mpnet-base-v2-onnx/modules.json
-
curl -L -o modules.json https://huggingface.co/LightEmbed/all-mpnet-base-v2-onnx/resolve/main/modules.json
281 Bytes
| [ | |
| { | |
| "idx": 0, | |
| "name": "0", | |
| "type": "sentence_transformers.models.Transformer" | |
| }, | |
| { | |
| "idx": 1, | |
| "name": "1", | |
| "type": "sentence_transformers.models.Pooling" | |
| }, | |
| { | |
| "idx": 2, | |
| "name": "2", | |
| "type": "sentence_transformers.models.Normalize" | |
| } | |
| ] |