Sentence Similarity
sentence-transformers
Safetensors
English
distilbert
feature-extraction
loss:Matryoshka2dLoss
loss:MatryoshkaLoss
loss:CoSENTLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use tomaarsen/distilbert-base-uncased-sts-2d-matryoshka with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use tomaarsen/distilbert-base-uncased-sts-2d-matryoshka with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("tomaarsen/distilbert-base-uncased-sts-2d-matryoshka") sentences = [ "A woman is reading.", "A woman is taking a picture.", "Breivik complains of 'ridicule'", "The small dog protects its owner." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Ctrl+K