from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("arthurbresnu/example-splade-cocondenser-ensembledistil-nli")
# Run inference
sentences = [
'A man is sitting in on the side of the street with brass pots.',
'A man is playing with the brass pots',
'A group of adults are swimming at the beach.',
]
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},
}
SparseMultipleNegativesRankingLoss
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
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-nli on huggingface.co
117
Total runs
-2
24-hour runs
-8
3-day runs
-4
7-day runs
25
30-day runs
More Information About example-splade-cocondenser-ensembledistil-nli huggingface.co Model
More example-splade-cocondenser-ensembledistil-nli license Visit here:
example-splade-cocondenser-ensembledistil-nli huggingface.co is an AI model on huggingface.co that provides example-splade-cocondenser-ensembledistil-nli's model effect (), which can be used instantly with this sparse-encoder example-splade-cocondenser-ensembledistil-nli model. huggingface.co supports a free trial of the example-splade-cocondenser-ensembledistil-nli model, and also provides paid use of the example-splade-cocondenser-ensembledistil-nli. Support call example-splade-cocondenser-ensembledistil-nli model through api, including Node.js, Python, http.
example-splade-cocondenser-ensembledistil-nli huggingface.co is an online trial and call api platform, which integrates example-splade-cocondenser-ensembledistil-nli's modeling effects, including api services, and provides a free online trial of example-splade-cocondenser-ensembledistil-nli, you can try example-splade-cocondenser-ensembledistil-nli online for free by clicking the link below.
sparse-encoder example-splade-cocondenser-ensembledistil-nli online free url in huggingface.co:
example-splade-cocondenser-ensembledistil-nli is an open source model from GitHub that offers a free installation service, and any user can find example-splade-cocondenser-ensembledistil-nli on GitHub to install. At the same time, huggingface.co provides the effect of example-splade-cocondenser-ensembledistil-nli install, users can directly use example-splade-cocondenser-ensembledistil-nli installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
example-splade-cocondenser-ensembledistil-nli install url in huggingface.co: