File size: 1,045 Bytes
e58e33b 1e86dc3 e58e33b 1e86dc3 d6c2911 1e86dc3 7db87e5 1e86dc3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
---
license: apache-2.0
pipeline_tag: sentence-similarity
---
ONNX port of [prithivida/Splade_PP_en_v1](https://huggingface.co/prithivida/Splade_PP_en_v1) for text classification and similarity searches.
### Usage
Here's an example of performing inference using the model with [FastEmbed](https://github.com/qdrant/fastembed).
```py
from fastembed import SparseTextEmbedding
documents = [
"You should stay, study and sprint.",
"History can only prepare us to be surprised yet again.",
]
model = SparseTextEmbedding(model_name="prithivida/Splade_PP_en_v1")
embeddings = list(model.embed(documents))
# [
# SparseEmbedding(values=array(
# [0.45940185, 0.64054322, 0.2425732, 0.1623179, 1.20566428,
# 0.62039357...]),
# indices=array([1012, 1998, 2000, 2005, 2017, 2022...])),
# SparseEmbedding(values=array([
# 0.09767706, 0.4374367, 0.00468039, 1.01167965, 1.02318227, 1.30155718
# ...]),
# indices=array([2017, 2022, 2025, 2057, 2064, 2069...]))
# ]
``` |