from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("tomaarsen/all-mpnet-base-v2-sts")
# Run inference
sentences = [
'The gate is yellow.',
'The gate is blue.',
'US spends $50m on carp invasion',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings)
print(similarities.shape)
# [3, 3]
@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",
}
Runs of tomaarsen all-mpnet-base-v2-sts on huggingface.co
7
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
4
30-day runs
More Information About all-mpnet-base-v2-sts huggingface.co Model
all-mpnet-base-v2-sts huggingface.co
all-mpnet-base-v2-sts huggingface.co is an AI model on huggingface.co that provides all-mpnet-base-v2-sts's model effect (), which can be used instantly with this tomaarsen all-mpnet-base-v2-sts model. huggingface.co supports a free trial of the all-mpnet-base-v2-sts model, and also provides paid use of the all-mpnet-base-v2-sts. Support call all-mpnet-base-v2-sts model through api, including Node.js, Python, http.
all-mpnet-base-v2-sts huggingface.co is an online trial and call api platform, which integrates all-mpnet-base-v2-sts's modeling effects, including api services, and provides a free online trial of all-mpnet-base-v2-sts, you can try all-mpnet-base-v2-sts online for free by clicking the link below.
tomaarsen all-mpnet-base-v2-sts online free url in huggingface.co:
all-mpnet-base-v2-sts is an open source model from GitHub that offers a free installation service, and any user can find all-mpnet-base-v2-sts on GitHub to install. At the same time, huggingface.co provides the effect of all-mpnet-base-v2-sts install, users can directly use all-mpnet-base-v2-sts installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
all-mpnet-base-v2-sts install url in huggingface.co: