Sentence Similarity
sentence-transformers
Safetensors
Transformers
xlm-roberta
feature-extraction
text-retrieval
semantic-search
amharic
text-embedding-inference
Eval Results (legacy)
text-embeddings-inference
Instructions to use abdulmunimjemal/xlm-r-retrieval-am-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use abdulmunimjemal/xlm-r-retrieval-am-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("abdulmunimjemal/xlm-r-retrieval-am-v1") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use abdulmunimjemal/xlm-r-retrieval-am-v1 with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("abdulmunimjemal/xlm-r-retrieval-am-v1") model = AutoModelForMultimodalLM.from_pretrained("abdulmunimjemal/xlm-r-retrieval-am-v1") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,7 +87,7 @@ To use the model in your own project:
|
|
| 87 |
"አየር በምድር ዙሪያ ያለ ነው።"
|
| 88 |
]
|
| 89 |
embeddings = model.encode(sentences)
|
| 90 |
-
print(embeddings.shape) # Expected output: (
|
| 91 |
```
|
| 92 |
|
| 93 |
3. **Compute Similarity:**
|
|
@@ -95,7 +95,7 @@ To use the model in your own project:
|
|
| 95 |
```python
|
| 96 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 97 |
similarities = cosine_similarity(embeddings, embeddings)
|
| 98 |
-
print(similarities.shape) # Expected output: (
|
| 99 |
```
|
| 100 |
|
| 101 |
## Model Architecture
|
|
|
|
| 87 |
"አየር በምድር ዙሪያ ያለ ነው።"
|
| 88 |
]
|
| 89 |
embeddings = model.encode(sentences)
|
| 90 |
+
print(embeddings.shape) # Expected output: (5, 768)
|
| 91 |
```
|
| 92 |
|
| 93 |
3. **Compute Similarity:**
|
|
|
|
| 95 |
```python
|
| 96 |
from sklearn.metrics.pairwise import cosine_similarity
|
| 97 |
similarities = cosine_similarity(embeddings, embeddings)
|
| 98 |
+
print(similarities.shape) # Expected output: (5, 5)
|
| 99 |
```
|
| 100 |
|
| 101 |
## Model Architecture
|