Feature Extraction
sentence-transformers
PyTorch
Safetensors
Transformers
English
distilbert
fill-mask
learned sparse
opensearch
retrieval
passage-retrieval
query-expansion
document-expansion
bag-of-words
sparse-encoder
sparse
splade
text-embeddings-inference
Instructions to use opensearch-project/opensearch-neural-sparse-encoding-v2-distill with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use opensearch-project/opensearch-neural-sparse-encoding-v2-distill with sentence-transformers:
from sentence_transformers import SparseEncoder model = SparseEncoder("opensearch-project/opensearch-neural-sparse-encoding-v2-distill") queries = ["Which planet is known as the Red Planet?"] documents = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", ] query_embeddings = model.encode_query(queries) document_embeddings = model.encode_document(documents) similarities = model.similarity(query_embeddings, document_embeddings) print(similarities) - Transformers
How to use opensearch-project/opensearch-neural-sparse-encoding-v2-distill with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="opensearch-project/opensearch-neural-sparse-encoding-v2-distill")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("opensearch-project/opensearch-neural-sparse-encoding-v2-distill") model = AutoModelForMaskedLM.from_pretrained("opensearch-project/opensearch-neural-sparse-encoding-v2-distill", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download pytorch_model.bin from opensearch-project/opensearch-neural-sparse-encoding-v2-distill: direct link, hf CLI and curl.
- Browser
- Download file 268 MB
-
https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-v2-distill/resolve/main/pytorch_model.bin
- Command line
-
hf download hf://opensearch-project/opensearch-neural-sparse-encoding-v2-distill/pytorch_model.bin
-
curl -L -o pytorch_model.bin https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-v2-distill/resolve/main/pytorch_model.bin
268 MB
- Xet hash:
- 6b9abaca19fd2db1ea829c4f583ffee5a0ce2c1fc921f5c616dad1cf5d582966
- Size of remote file:
- 268 MB
- SHA256:
- 0ad751e73d26c21c92fa07a0cc913806b3c27884bb0a0bacae515543bde93db0
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.