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 = "rasyosef/splade-tiny" # The splade model id
6model = SparseEncoder(model_id)
7
8repo_id = "rasyosef/natural_questions_3m_splade_index"
9
10# Load a SPLADE index from the Hugging Face model hub
11retriever = SPLADE.load_from_hub(repo_id, model=model)