from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("arthurbresnu/splade-cocondenser-ensembledistil-sts")
# Run inference
sentences = [
'While Queen may refer to both Queen regent (sovereign) or Queen consort, the King has always been the sovereign.',
'There is a very good reason not to refer to the Queen\'s spouse as "King" - because they aren\'t the King.',
'A man plays the guitar.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# (3, 30522)# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
GPU Model
: 1 x NVIDIA GeForce RTX 3070 Ti Laptop GPU
CPU Model
: AMD Ryzen 9 6900HX with Radeon Graphics
RAM Size
: 30.61 GB
Framework Versions
Python: 3.12.9
Sentence Transformers: 4.2.0.dev0
Transformers: 4.50.3
PyTorch: 2.6.0+cu124
Accelerate: 1.6.0
Datasets: 3.5.0
Tokenizers: 0.21.1
Citation
BibTeX
Sentence Transformers
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
SpladeLoss
@misc{formal2022distillationhardnegativesampling,
title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
year={2022},
eprint={2205.04733},
archivePrefix={arXiv},
primaryClass={cs.IR},
url={https://arxiv.org/abs/2205.04733},
}
FlopsLoss
@article{paria2020minimizing,
title={Minimizing flops to learn efficient sparse representations},
author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
journal={arXiv preprint arXiv:2004.05665},
year={2020}
}
Runs of sparse-encoder example-splade-cocondenser-ensembledistil-sts on huggingface.co
101
Total runs
4
24-hour runs
-14
3-day runs
-9
7-day runs
-17
30-day runs
More Information About example-splade-cocondenser-ensembledistil-sts huggingface.co Model
More example-splade-cocondenser-ensembledistil-sts license Visit here:
example-splade-cocondenser-ensembledistil-sts huggingface.co is an AI model on huggingface.co that provides example-splade-cocondenser-ensembledistil-sts's model effect (), which can be used instantly with this sparse-encoder example-splade-cocondenser-ensembledistil-sts model. huggingface.co supports a free trial of the example-splade-cocondenser-ensembledistil-sts model, and also provides paid use of the example-splade-cocondenser-ensembledistil-sts. Support call example-splade-cocondenser-ensembledistil-sts model through api, including Node.js, Python, http.
example-splade-cocondenser-ensembledistil-sts huggingface.co is an online trial and call api platform, which integrates example-splade-cocondenser-ensembledistil-sts's modeling effects, including api services, and provides a free online trial of example-splade-cocondenser-ensembledistil-sts, you can try example-splade-cocondenser-ensembledistil-sts online for free by clicking the link below.
sparse-encoder example-splade-cocondenser-ensembledistil-sts online free url in huggingface.co:
example-splade-cocondenser-ensembledistil-sts is an open source model from GitHub that offers a free installation service, and any user can find example-splade-cocondenser-ensembledistil-sts on GitHub to install. At the same time, huggingface.co provides the effect of example-splade-cocondenser-ensembledistil-sts install, users can directly use example-splade-cocondenser-ensembledistil-sts installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
example-splade-cocondenser-ensembledistil-sts install url in huggingface.co: