This is an index created with the
splade-index library (version
0.2.0)
1pip install "splade-index==0.2.0"
2
3# Include extra dependencies like stemmer
4pip install "splade-index[full]==0.2.0"
5
6# For huggingface hub usage
7pip install huggingface_hub
1from sentence_transformers import SparseEncoder
2from splade_index import SPLADE
3
4# Download the SPLADE model that was used to create the index from the HuggingFace Hub
5model_id = "naver/splade-v3-distilbert" # Enter the splade model id
6model = SparseEncoder(model_id)
7
8# Set your huggingface token if repo is private
9repo_id = "yosefw/msmarco_1M_splade_index"
10
11# Load a SPLADE index from the Hugging Face model hub
12retriever = SPLADE.load_from_hub(repo_id, model=model)