Views
No views yet
naver/splade-v3.| MRR@10 (MS MARCO dev) | avg nDCG@10 (BEIR-13) | |
|---|---|---|
naver/splade-v3-distilbert | 38.7 | 50.0 |
SparseEncoder(
(0): MLMTransformer({'max_seq_length': 512, 'do_lower_case': False}) with MLMTransformer model: BertForMaskedLM
(1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30522})
)pip install -U sentence-transformers1from sentence_transformers import SparseEncoder
2
3# Download from the 🤗 Hub
4model = SparseEncoder("naver/splade-v3-distilbert")
5# Run inference
6queries = ["what causes aging fast"]
7documents = [
8 "UV-A light, specifically, is what mainly causes tanning, skin aging, and cataracts, UV-B causes sunburn, skin aging and skin cancer, and UV-C is the strongest, and therefore most effective at killing microorganisms. Again â\x80\x93 single words and multiple bullets.",
9 "Answers from Ronald Petersen, M.D. Yes, Alzheimer's disease usually worsens slowly. But its speed of progression varies, depending on a person's genetic makeup, environmental factors, age at diagnosis and other medical conditions. Still, anyone diagnosed with Alzheimer's whose symptoms seem to be progressing quickly â\x80\x94 or who experiences a sudden decline â\x80\x94 should see his or her doctor.",
10 "Bell's palsy and Extreme tiredness and Extreme fatigue (2 causes) Bell's palsy and Extreme tiredness and Hepatitis (2 causes) Bell's palsy and Extreme tiredness and Liver pain (2 causes) Bell's palsy and Extreme tiredness and Lymph node swelling in children (2 causes)",
11]
12query_embeddings = model.encode_query(queries)
13document_embeddings = model.encode_document(documents)
14print(query_embeddings.shape, document_embeddings.shape)
15# [1, 30522] [3, 30522]
16
17# Get the similarity scores for the embeddings
18similarities = model.similarity(query_embeddings, document_embeddings)
19print(similarities)
20# tensor([[14.4726, 9.4432, 5.6896]])
21@misc{lassance2024spladev3,
title={SPLADE-v3: New baselines for SPLADE},
author={Carlos Lassance and Hervé Déjean and Thibault Formal and Stéphane Clinchant},
year={2024},
eprint={2403.06789},
archivePrefix={arXiv},
primaryClass={cs.IR},
copyright = {Creative Commons Attribution Non Commercial Share Alike 4.0 International}
}