How to use nickprock/xlmr-ted with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("nickprock/xlmr-ted") sentences = [ "Questa è una persona felice", "Questo è un cane felice", "Questa è una persona molto felice", "Oggi è una giornata di sole" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4]
How to use nickprock/xlmr-ted with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("nickprock/xlmr-ted") model = AutoModel.from_pretrained("nickprock/xlmr-ted")
The community tab is the place to discuss and collaborate with the HF community!