Sentence Similarity
sentence-transformers
Safetensors
modernbert
feature-extraction
dense
Generated from Trainer
dataset_size:12868
loss:OptimizedContrastiveDistillationLoss
text-embeddings-inference
Instructions to use barealek/peftech-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use barealek/peftech-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("barealek/peftech-v1") sentences = [ "Instruct: Retrieve semantically similar text based on safety profile\nQuery: This is a vile, unbelievable, horrific story and these people are disgusting!! \nI am speechless as to the heinous behavior of this MOTHER & SON KILLERS! This is the most cold hearted, callous act for anyone and then to have the Mother and son do do this together makes me sick. Of course the Mother claims she doesn't know if her underage son was drinking! She reeked of alcohol herself which means, that yes, he was drinking, she probably gave him the alcohol and then they decided to wait several hours for the driver's blood alcohol to go down. He only came forward because there were multiple witnesses!! I am sick. This is some of the most vile behavior I have read, they stopped the car, and he got out and pulled the victim from his windshield and threw him on the ground. They both need to be charged with the MAXIMUM punishment possible. Mother & son deserve to be shot.", "Instruct: Retrieve semantically similar text based on safety profile\nQuery: Instead of restrooms, we'll only have porta potties installed. Problem solved. Transgender friendly restrooms.", "Instruct: Retrieve semantically similar text based on safety profile\nQuery: $26,443 a year for tuition and the best thing they can think of to chant is \"F%^$ Trump?", "Instruct: Retrieve semantically similar text based on safety profile\nQuery: I'll leave the partisan politics out of my comment for a change.\n\nTo our troops. Take care and if you have to shoot, shoot the other poor bastard so you can come home." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Ctrl+K