Sentence Similarity
sentence-transformers
Safetensors
nandi_encoder
embeddings
feature-extraction
mteb
retrieval
multilingual
indic
long-context
frontiersmind
nandi
custom_code
Instructions to use FrontiersMind/EmbeddingNandi-450M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use FrontiersMind/EmbeddingNandi-450M with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("FrontiersMind/EmbeddingNandi-450M", trust_remote_code=True) sentences = [ "task: sentence similarity | query: How do I return a damaged product?", "task: sentence similarity | query: खराब सामान वापस कैसे करें?", "task: sentence similarity | query: damaged product wapas kaise kare?", "task: sentence similarity | query: What is the weather like today?" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Clarify re-normalization after truncation for dot product vs cosine
Browse files
README.md
CHANGED
|
@@ -231,7 +231,7 @@ Scores at each size on a 28-task subset of the three benchmarks (13 English, 6 C
|
|
| 231 |
| 256 | 25% | 66.80 | 72.60 | 79.33 | 72.91 | -0.90 |
|
| 232 |
| 128 | 12.5% | 65.86 | 70.89 | 78.05 | 71.60 | -2.21 |
|
| 233 |
|
| 234 |
-
* **Re-normalize after truncating:**
|
| 235 |
* **Queries and documents must use the same size.**
|
| 236 |
|
| 237 |
Pass `truncate_dim` and `normalize_embeddings=True` to let Sentence Transformers do both:
|
|
|
|
| 231 |
| 256 | 25% | 66.80 | 72.60 | 79.33 | 72.91 | -0.90 |
|
| 232 |
| 128 | 12.5% | 65.86 | 70.89 | 78.05 | 71.60 | -2.21 |
|
| 233 |
|
| 234 |
+
* **Re-normalize after truncating when using dot product:** truncation changes the vector's norm. Re-normalizing the shortened vectors makes the dot product equivalent to cosine similarity. If you use cosine similarity directly, explicit re-normalization is not necessary.
|
| 235 |
* **Queries and documents must use the same size.**
|
| 236 |
|
| 237 |
Pass `truncate_dim` and `normalize_embeddings=True` to let Sentence Transformers do both:
|