File size: 2,430 Bytes
ba34df5
 
8ea969a
 
 
 
 
 
 
 
 
 
 
 
 
ba34df5
8ea969a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
---
license: apache-2.0
language:
- en
base_model:
- opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte
pipeline_tag: feature-extraction
tags:
- onnx
- fastembed
- sparse-encoder
- sparse-retrieval
- qdrant
- passage-retrieval
- asymmetric
---

# OpenSearch Neural Sparse Encoding Doc v3 GTE ONNX

This repository contains an ONNX export of
[`opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte`](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte),
converted by Qdrant for inference with
[FastEmbed](https://github.com/qdrant/fastembed).


## Model Description

This is a learned sparse retrieval model.

It encodes documents into 30,522-dimensional sparse vectors. Queries are
encoded using a tokenizer and a weight lookup table. A non-zero dimension
represents the corresponding token in the vocabulary, and its value represents
the importance of that token.

The similarity score is the inner product of the query and document sparse
vectors.

## Usage

This ONNX model is designed for use with FastEmbed.

```python
from fastembed import SparseTextEmbedding

model = SparseTextEmbedding(
    model_name="opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte"
)

queries = ["What's the weather in New York now?"]
documents = ["Currently New York is rainy."]

query_embeddings = list(model.query_embed(queries))
document_embeddings = list(model.embed(documents))
```

Use `query_embed()` for queries and `embed()` for documents.

For the original PyTorch model and additional usage examples, refer to the
[original model repository](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte).

## Performance

The original model card reports an average NDCG@10 of `0.546` and average FLOPS
of `1.7` on the evaluated subset of BEIR.

For detailed benchmark results, refer to the
[original model card](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte).

## License

This project is licensed under the
[Apache v2.0 License](https://github.com/opensearch-project/neural-search/blob/main/LICENSE).

## Copyright

Copyright OpenSearch Contributors. See
[NOTICE](https://github.com/opensearch-project/neural-search/blob/main/NOTICE)
for details.

## Acknowledgments

The original model was developed by the OpenSearch project. The ONNX conversion
was performed by Qdrant for use with FastEmbed.