Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

opensearch-project
/
opensearch-neural-sparse-encoding-v2-distill

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
Model card Files Files and versions
xet
Community
7

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 SentenceTransformer
    
    model = SentenceTransformer("opensearch-project/opensearch-neural-sparse-encoding-v2-distill")
    
    sentences = [
        "The weather is lovely today.",
        "It's so sunny outside!",
        "He drove to the stadium."
    ]
    embeddings = model.encode(sentences)
    
    similarities = model.similarity(embeddings, embeddings)
    print(similarities.shape)
    # [3, 3]
  • 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")
    # 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")
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
opensearch-neural-sparse-encoding-v2-distill
537 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 14 commits
zhichao-geng's picture
zhichao-geng
sentence_transformers_support (#7)
269e663 verified 11 months ago
  • 1_SpladePooling
    sentence_transformers_support (#7) 11 months ago
  • .gitattributes
    1.52 kB
    initial commit almost 2 years ago
  • README.md
    16.1 kB
    sentence_transformers_support (#7) 11 months ago
  • config.json
    592 Bytes
    Upload 6 files almost 2 years ago
  • config_sentence_transformers.json
    274 Bytes
    sentence_transformers_support (#7) 11 months ago
  • model.safetensors
    268 MB
    xet
    Adding `safetensors` variant of this model (#4) over 1 year ago
  • modules.json
    274 Bytes
    sentence_transformers_support (#7) 11 months ago
  • pytorch_model.bin

    Detected Pickle imports (3)

    • "torch._utils._rebuild_tensor_v2",
    • "collections.OrderedDict",
    • "torch.FloatStorage"

    What is a pickle import?

    268 MB
    xet
    Upload 6 files almost 2 years ago
  • sentence_bert_config.json
    57 Bytes
    sentence_transformers_support (#7) 11 months ago
  • special_tokens_map.json
    125 Bytes
    Upload 6 files almost 2 years ago
  • tokenizer.json
    711 kB
    Upload 6 files almost 2 years ago
  • tokenizer_config.json
    320 Bytes
    Use the DistilBertTokenizer for this DistilBERT-based model (#6) about 1 year ago
  • vocab.txt
    232 kB
    Upload 6 files almost 2 years ago