generall93 Anush008 commited on
Commit
efcd182
1 Parent(s): b73a084

Created model card (#2)

Browse files

- Created model card (1e86dc338a1f39aaed5132d35a898c901b283aba)
- Update README.md (7db87e514444e4ed0b3f090ac1c95c00b25be5d5)
- Update README.md (d6c2911beaa2fb3c8b3318795976c08a87b21228)


Co-authored-by: Anush Shetty <Anush008@users.noreply.huggingface.co>

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