Sentence Similarity
sentence-transformers
PyTorch
Transformers
xlm-roberta
feature-extraction
dpr
text-embeddings-inference
Instructions to use headlesstech/semantic_xlmr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use headlesstech/semantic_xlmr with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("headlesstech/semantic_xlmr") sentences = [ "আমি বাংলায় গান গাই", "I sing in Bangla", "I sing in Bengali", "I sing in English", "আমি গান গাই না " ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [5, 5] - Transformers
How to use headlesstech/semantic_xlmr with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("headlesstech/semantic_xlmr") model = AutoModel.from_pretrained("headlesstech/semantic_xlmr", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
6fdc841
1
Parent(s): c23461f
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,6 +6,19 @@ tags:
|
|
| 6 |
- sentence-similarity
|
| 7 |
- transformers
|
| 8 |
- dpr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
| 10 |
|
| 11 |
# `semantic_xlmr`
|
|
|
|
| 6 |
- sentence-similarity
|
| 7 |
- transformers
|
| 8 |
- dpr
|
| 9 |
+
widget:
|
| 10 |
+
- text: "Is this review positive or negative? Review: Best cast iron skillet you will ever buy."
|
| 11 |
+
- text: "this is a test text"
|
| 12 |
+
|
| 13 |
+
example_title: "Sentiment analysis"
|
| 14 |
+
- text: "Is this review positive or negative? Review: Best cast iron skillet you will ever buy."
|
| 15 |
+
- text: "this is a test text"
|
| 16 |
+
- text: "Barack Obama nominated Hilary Clinton as his secretary of state on Monday. He chose her because she had ..."
|
| 17 |
+
example_title: "Coreference resolution"
|
| 18 |
+
- text: "On a shelf, there are five books: a gray book, a red book, a purple book, a blue book, and a black book ..."
|
| 19 |
+
example_title: "Logic puzzles"
|
| 20 |
+
- text: "The two men running to become New York City's next mayor will face off in their first debate Wednesday night ..."
|
| 21 |
+
example_title: "Reading comprehension"
|
| 22 |
---
|
| 23 |
|
| 24 |
# `semantic_xlmr`
|