Sentence Similarity
sentence-transformers
Safetensors
English
mpnet
feature-extraction
dataset_size:n<1K
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use davanstrien/code-prompt-similarity-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use davanstrien/code-prompt-similarity-model with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("davanstrien/code-prompt-similarity-model") sentences = [ "Write a Python function that counts the number of even numbers in a given list of integers or floats", "Write a Python function that returns the number of even numbers in a list.", "Create a Python function that adds up all the numbers in a given list. The function should support lists containing only positive integers.", "Write a Python function that converts a JSON string into a Python dictionary using the json module and returns it." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle