XYZ-embedding-zh-v2
Usage (Sentence Transformers)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("fangxq/XYZ-embedding-zh-v2")
# Run inference
sentences = [
'The weather is lovely today.',
"It's so sunny outside!",
'He drove to the stadium.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1792]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
Evaluation results
- cos_sim_pearson on MTEB AFQMCvalidation set self-reported55.518
- cos_sim_spearman on MTEB AFQMCvalidation set self-reported58.407
- manhattan_pearson on MTEB AFQMCvalidation set self-reported57.175
- manhattan_spearman on MTEB AFQMCvalidation set self-reported58.389
- euclidean_pearson on MTEB AFQMCvalidation set self-reported57.195
- euclidean_spearman on MTEB AFQMCvalidation set self-reported58.407
- main_score on MTEB AFQMCvalidation set self-reported58.407
- cos_sim_pearson on MTEB ATECtest set self-reported57.311
- cos_sim_spearman on MTEB ATECtest set self-reported57.598
- manhattan_pearson on MTEB ATECtest set self-reported62.525