This is an index created with the
splade-index library (version
0.1.2)
1pip install "splade-index==0.1.2"
2
3# Include extra dependencies like stemmer
4pip install "splade-index[full]==0.1.2"
5
6# For huggingface hub usage
7pip install huggingface_hub
1import os
2from sentence_transformers import SparseEncoder
3from splade_index import SPLADE
4
5# Download the SPLADE model that was used to create the index from the HuggingFace Hub
6model_id = "rasyosef/splade-mini" # The SPLADE model id
7model = SparseEncoder(model_id)
8
9repo_id = "rasyosef/msmarco_dev_1M_splade_index"
10# Load a SPLADE index from the Hugging Face model hub
11retriever = SPLADE.load_from_hub(repo_id, model=model)