Sentence Similarity
sentence-transformers
Safetensors
feature-extraction
Generated from Trainer
dataset_size:49500
loss:MultipleNegativesRankingLoss
Instructions to use leafxyz/main_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use leafxyz/main_v2 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("leafxyz/main_v2") sentences = [ "Instruct: Given an Arabic e-commerce search query, retrieve the product that best matches it\nQuery: عناية بالفم", "تن ريقا بزيت الزيتون 160جم", "Foramen Denture Clean Box", "صبغة شعر L'Oréal Paris - 5.45 Excellence" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Download 1_Pooling/config.json from leafxyz/main_v2: direct link, hf CLI and curl.
- Browser
- Download file 96 Bytes
-
https://huggingface.co/leafxyz/main_v2/resolve/main/1_Pooling/config.json
- Command line
-
hf download hf://leafxyz/main_v2/1_Pooling/config.json
-
curl -L -o config.json https://huggingface.co/leafxyz/main_v2/resolve/main/1_Pooling/config.json
96 Bytes
| { | |
| "embedding_dimension": 1024, | |
| "pooling_mode": "lasttoken", | |
| "include_prompt": true | |
| } |