jmzzomg commited on
Commit
8ea969a
·
verified ·
1 Parent(s): f031a37

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -0
README.md CHANGED
@@ -1,3 +1,84 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ language:
4
+ - en
5
+ base_model:
6
+ - opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte
7
+ pipeline_tag: feature-extraction
8
+ tags:
9
+ - onnx
10
+ - fastembed
11
+ - sparse-encoder
12
+ - sparse-retrieval
13
+ - qdrant
14
+ - passage-retrieval
15
+ - asymmetric
16
  ---
17
+
18
+ # OpenSearch Neural Sparse Encoding Doc v3 GTE ONNX
19
+
20
+ This repository contains an ONNX export of
21
+ [`opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte`](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte),
22
+ converted by Qdrant for inference with
23
+ [FastEmbed](https://github.com/qdrant/fastembed).
24
+
25
+
26
+ ## Model Description
27
+
28
+ This is a learned sparse retrieval model.
29
+
30
+ It encodes documents into 30,522-dimensional sparse vectors. Queries are
31
+ encoded using a tokenizer and a weight lookup table. A non-zero dimension
32
+ represents the corresponding token in the vocabulary, and its value represents
33
+ the importance of that token.
34
+
35
+ The similarity score is the inner product of the query and document sparse
36
+ vectors.
37
+
38
+ ## Usage
39
+
40
+ This ONNX model is designed for use with FastEmbed.
41
+
42
+ ```python
43
+ from fastembed import SparseTextEmbedding
44
+
45
+ model = SparseTextEmbedding(
46
+ model_name="opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte"
47
+ )
48
+
49
+ queries = ["What's the weather in New York now?"]
50
+ documents = ["Currently New York is rainy."]
51
+
52
+ query_embeddings = list(model.query_embed(queries))
53
+ document_embeddings = list(model.embed(documents))
54
+ ```
55
+
56
+ Use `query_embed()` for queries and `embed()` for documents.
57
+
58
+ For the original PyTorch model and additional usage examples, refer to the
59
+ [original model repository](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte).
60
+
61
+ ## Performance
62
+
63
+ The original model card reports an average NDCG@10 of `0.546` and average FLOPS
64
+ of `1.7` on the evaluated subset of BEIR.
65
+
66
+ For detailed benchmark results, refer to the
67
+ [original model card](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte).
68
+
69
+ ## License
70
+
71
+ This project is licensed under the
72
+ [Apache v2.0 License](https://github.com/opensearch-project/neural-search/blob/main/LICENSE).
73
+
74
+ ## Copyright
75
+
76
+ Copyright OpenSearch Contributors. See
77
+ [NOTICE](https://github.com/opensearch-project/neural-search/blob/main/NOTICE)
78
+ for details.
79
+
80
+ ## Acknowledgments
81
+
82
+ The original model was developed by the OpenSearch project. The ONNX conversion
83
+ was performed by Qdrant for use with FastEmbed.
84
+