magic_embedder
13
—
by
CtrlAltDeplete
Embedding Model
OTHER
New
13 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary
AI model with specialized capabilities.
Code Examples
Usagebash
pip install -U sentence-transformersUsagepython
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
'name: krosan beast\nlayout: layout.normal\ncmc: 4.0\ncolor_identity: g\ncolors: g\nkeywords: threshold\nmana_cost: {3}{g}\noracle_text: threshold — this creature gets +7/+7 as long as seven or more cards are in your graveyard.\npower: 1\ntoughness: 1\ntype_line: creature — squirrel beast',
'name: the odd acorn gang\nlayout: layout.normal\ncmc: 5.0\ncolor_identity: b, g\ncolors: b, g\nkeywords: reach, trample, menace\nmana_cost: {3}{b}{g}\noracle_text: menace, trample, reach\nsquirrels you control have "{t}: target squirrel gets +2/+2 and gains trample until end of turn. activate only as a sorcery."\nwhenever one or more squirrels you control deal combat damage to a player, draw a card.\npower: 5\ntoughness: 5\ntype_line: legendary creature — squirrel warrior',
'name: obstinate familiar\nlayout: layout.normal\ncmc: 1.0\ncolor_identity: r\ncolors: r\nmana_cost: {r}\noracle_text: if you would draw a card, you may skip that draw instead.\npower: 1\ntoughness: 1\ntype_line: creature — lizard',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.9225, 0.7680],
# [0.9225, 1.0000, 0.7896],
# [0.7680, 0.7896, 1.0000]])Deploy This Model
Production-ready deployment in minutes
Together.ai
Instant API access to this model
Production-ready inference API. Start free, scale to millions.
Try Free APIReplicate
One-click model deployment
Run models in the cloud with simple API. No DevOps required.
Deploy NowDisclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.