Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:2132917
loss:MultipleNegativesRankingLoss
text-embeddings-inference
Instructions to use philipp-zettl/all-MiniLM-L6-v2-mtg-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use philipp-zettl/all-MiniLM-L6-v2-mtg-v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("philipp-zettl/all-MiniLM-L6-v2-mtg-v2") sentences = [ "instant", "Title: Flash Foliage\nCost: {2}{G}\nColors: G\nType: Instant\nDesc: Cast this spell only during combat after blockers are declared.\nCreate a 1/1 green Saproling creature token that's blocking target creature attacking you.\nDraw a card.", "Title: Security Rhox\nCost: {2}{R}{G}\nColors: G, R\nType: Creature — Rhino Warrior\nDesc: You may pay {R}{G} rather than pay this spell's mana cost. Spend only mana produced by Treasures to cast it this way.", "Title: Circle of Protection: Red\nCost: {1}{W}\nColors: W\nType: Enchantment\nDesc: {1}: The next time a red source of your choice would deal damage to you this turn, prevent that damage." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!