from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("bourdoiscatie/SPLADE_camembert-large_STS")
# Run inference
sentences = [
"Oui, je peux vous dire d'après mon expérience personnelle qu'ils ont certainement sifflé.",
"Il est vrai que les bombes de la Seconde Guerre mondiale faisaient un bruit de sifflet lorsqu'elles tombaient.",
"J'envisage de dépenser les 48 dollars par mois pour le système GTD (Getting things done) annoncé par David Allen.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 4096]# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.3673, 0.2794],# [0.3673, 1.0000, 0.2023],# [0.2794, 0.2023, 1.0000]])
@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 CATIE-AQ CSR_Sparse_Encoder_camembert-large_STS on huggingface.co
28
Total runs
0
24-hour runs
-2
3-day runs
2
7-day runs
7
30-day runs
More Information About CSR_Sparse_Encoder_camembert-large_STS huggingface.co Model
CSR_Sparse_Encoder_camembert-large_STS huggingface.co is an AI model on huggingface.co that provides CSR_Sparse_Encoder_camembert-large_STS's model effect (), which can be used instantly with this CATIE-AQ CSR_Sparse_Encoder_camembert-large_STS model. huggingface.co supports a free trial of the CSR_Sparse_Encoder_camembert-large_STS model, and also provides paid use of the CSR_Sparse_Encoder_camembert-large_STS. Support call CSR_Sparse_Encoder_camembert-large_STS model through api, including Node.js, Python, http.
CSR_Sparse_Encoder_camembert-large_STS huggingface.co is an online trial and call api platform, which integrates CSR_Sparse_Encoder_camembert-large_STS's modeling effects, including api services, and provides a free online trial of CSR_Sparse_Encoder_camembert-large_STS, you can try CSR_Sparse_Encoder_camembert-large_STS online for free by clicking the link below.
CATIE-AQ CSR_Sparse_Encoder_camembert-large_STS online free url in huggingface.co:
CSR_Sparse_Encoder_camembert-large_STS is an open source model from GitHub that offers a free installation service, and any user can find CSR_Sparse_Encoder_camembert-large_STS on GitHub to install. At the same time, huggingface.co provides the effect of CSR_Sparse_Encoder_camembert-large_STS install, users can directly use CSR_Sparse_Encoder_camembert-large_STS installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
CSR_Sparse_Encoder_camembert-large_STS install url in huggingface.co: