mtg-glove-embedding-commander

12
license:mit
by
nishtahir
Code Model
OTHER
New
12 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
Unknown
Mobile
Laptop
Server
Quick Summary

AI model with specialized capabilities.

Code Examples

Interactive Demotexttransformers
import torch
import torch.nn.functional as F
from transformers import AutoModel, AutoTokenizer

# Load model and tokenizer
model_id = "nishtahir/mtg-glove-embedding-commander"
model = AutoModel.from_pretrained(model_id, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)

def get_vector(card_name):
    card_id = tokenizer.convert_tokens_to_ids(card_name)
    if card_id == tokenizer.unk_token_id:
        raise ValueError(f"Card '{card_name}' not found in vocabulary.")
    
    with torch.no_grad():
        return model.get_combined_embeddings()[card_id]  # Uses (Center + Context) / 2

v_sol_ring = get_vector("Sol Ring")
print(f"Vector shape: {v_sol_ring.shape}") # torch.Size([128])

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.