Sentence Similarity
sentence-transformers
Safetensors
German
bert
feature-extraction
loss:MatryoshkaLoss
custom_code
text-embeddings-inference
Instructions to use aari1995/German_Semantic_V3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use aari1995/German_Semantic_V3b with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("aari1995/German_Semantic_V3b", trust_remote_code=True) sentences = [ "Ein Mann übt Boxen", "Ein Affe praktiziert Kampfsportarten.", "Eine Person faltet ein Blatt Papier.", "Eine Frau geht mit ihrem Hund spazieren." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
I found that obtaining text similarity is very slow. Are there any faster methods?
#3
by caochengchen - opened
This comment has been hidden (marked as Resolved)
Hi, so if you keep the model in memory and do not do "model = SentenceTransformer..." every time you encode something, it will be alot faster. Or what do you mean?
This comment has been hidden (marked as Resolved)
This comment has been hidden (marked as Resolved)