OpenSearch Neural Sparse Encoding Doc v3 GTE ONNX
This repository contains an ONNX export of
opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte,
converted by Qdrant for inference with
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.
1from fastembed import SparseTextEmbedding
2
3model = SparseTextEmbedding(
4 model_name="opensearch-project/opensearch-neural-sparse-encoding-doc-v3-gte"
5)
6
7queries = ["What's the weather in New York now?"]
8documents = ["Currently New York is rainy."]
9
10query_embeddings = list(model.query_embed(queries))
11document_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.
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.
License
This project is licensed under the
Apache v2.0 License.
Copyright
Copyright OpenSearch Contributors. See
NOTICE
for details.
Acknowledgments
The original model was developed by the OpenSearch project. The ONNX conversion
was performed by Qdrant for use with FastEmbed.