Model Details of jina-embeddings-v2-base-code-mbpp
SentenceTransformer based on jinaai/jina-embeddings-v2-base-code
This is a
sentence-transformers
model finetuned from
jinaai/jina-embeddings-v2-base-code
. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("Nutanix/jina-embeddings-v2-base-code-mbpp")
# Run inference
sentences = [
'Write a function to find sum and average of first n natural numbers.',
'def sum_average(number):\r\n total = 0\r\n for value in range(1, number + 1):\r\n total = total + value\r\n average = total / number\r\n return (total,average)',
'def long_words(n, str):\r\n word_len = []\r\n txt = str.split(" ")\r\n for x in txt:\r\n if len(x) > n:\r\n word_len.append(x)\r\n return word_len\t',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, 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",
}
TripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
Runs of Nutanix jina-embeddings-v2-base-code-mbpp on huggingface.co
89
Total runs
0
24-hour runs
1
3-day runs
-2
7-day runs
-1
30-day runs
More Information About jina-embeddings-v2-base-code-mbpp huggingface.co Model
jina-embeddings-v2-base-code-mbpp huggingface.co
jina-embeddings-v2-base-code-mbpp huggingface.co is an AI model on huggingface.co that provides jina-embeddings-v2-base-code-mbpp's model effect (), which can be used instantly with this Nutanix jina-embeddings-v2-base-code-mbpp model. huggingface.co supports a free trial of the jina-embeddings-v2-base-code-mbpp model, and also provides paid use of the jina-embeddings-v2-base-code-mbpp. Support call jina-embeddings-v2-base-code-mbpp model through api, including Node.js, Python, http.
jina-embeddings-v2-base-code-mbpp huggingface.co is an online trial and call api platform, which integrates jina-embeddings-v2-base-code-mbpp's modeling effects, including api services, and provides a free online trial of jina-embeddings-v2-base-code-mbpp, you can try jina-embeddings-v2-base-code-mbpp online for free by clicking the link below.
Nutanix jina-embeddings-v2-base-code-mbpp online free url in huggingface.co:
jina-embeddings-v2-base-code-mbpp is an open source model from GitHub that offers a free installation service, and any user can find jina-embeddings-v2-base-code-mbpp on GitHub to install. At the same time, huggingface.co provides the effect of jina-embeddings-v2-base-code-mbpp install, users can directly use jina-embeddings-v2-base-code-mbpp installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
jina-embeddings-v2-base-code-mbpp install url in huggingface.co: