Sentence Similarity
sentence-transformers
PyTorch
Transformers
xlm-roberta
feature-extraction
word-similarity
text-embeddings-inference
Instructions to use pierluigic/xl-lexeme with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use pierluigic/xl-lexeme with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("pierluigic/xl-lexeme") sentences = [ "Provide a large table; this is a horizontal <t>plane</t>, and will represent the ground plane, viz.", "The President's <t>plane</t> landed at Goose Bay at 9:03 p.m.", "any line joining two points on a <t>plane</t> lies wholly on that plane", "the flight was delayed due to trouble with the <t>plane</t>" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use pierluigic/xl-lexeme with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("pierluigic/xl-lexeme") model = AutoModel.from_pretrained("pierluigic/xl-lexeme", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Ctrl+K