from sentence_transformers import SparseEncoder
# Download from the 🤗 Hub
model = SparseEncoder("CATIE-AQ/SPLADE_camembert-base_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, 32005]# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.1034, 0.1443],# [0.1034, 1.0000, 0.0588],# [0.1443, 0.0588, 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 SPLADE_camembert-base_STS on huggingface.co
34
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
22
30-day runs
More Information About SPLADE_camembert-base_STS huggingface.co Model
SPLADE_camembert-base_STS huggingface.co
SPLADE_camembert-base_STS huggingface.co is an AI model on huggingface.co that provides SPLADE_camembert-base_STS's model effect (), which can be used instantly with this CATIE-AQ SPLADE_camembert-base_STS model. huggingface.co supports a free trial of the SPLADE_camembert-base_STS model, and also provides paid use of the SPLADE_camembert-base_STS. Support call SPLADE_camembert-base_STS model through api, including Node.js, Python, http.
SPLADE_camembert-base_STS huggingface.co is an online trial and call api platform, which integrates SPLADE_camembert-base_STS's modeling effects, including api services, and provides a free online trial of SPLADE_camembert-base_STS, you can try SPLADE_camembert-base_STS online for free by clicking the link below.
CATIE-AQ SPLADE_camembert-base_STS online free url in huggingface.co:
SPLADE_camembert-base_STS is an open source model from GitHub that offers a free installation service, and any user can find SPLADE_camembert-base_STS on GitHub to install. At the same time, huggingface.co provides the effect of SPLADE_camembert-base_STS install, users can directly use SPLADE_camembert-base_STS installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
SPLADE_camembert-base_STS install url in huggingface.co: