Sentence Similarity
sentence-transformers
Core ML
Safetensors
feature-extraction
literary
semantic-search
multilingual
Instructions to use RafaelUI/literary-minilm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use RafaelUI/literary-minilm with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("RafaelUI/literary-minilm") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
File size: 277 Bytes
cafa2c9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | [
{
"idx": 0,
"name": "0",
"path": "",
"type": "sentence_transformers.base.modules.transformer.Transformer"
},
{
"idx": 1,
"name": "1",
"path": "1_Pooling",
"type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
}
] |