xiaobu-embedding-v2

基于piccolo-embedding[1],主要改动如下:

  • 合成数据替换为xiaobu-embedding-v1[2]所积累数据
  • 在circle_loss[3]视角下统一处理CMTEB的6类问题,最大优势是可充分利用原始数据集中的多个正例,其次是可一定程度上避免考虑多个不同loss之间的权重问题

Usage (Sentence-Transformers)

pip install -U sentence-transformers

相似度计算:

from sentence_transformers import SentenceTransformer
sentences_1 = ["样例数据-1", "样例数据-2"]
sentences_2 = ["样例数据-3", "样例数据-4"]
model = SentenceTransformer('lier007/xiaobu-embedding-v2')
embeddings_1 = model.encode(sentences_1, normalize_embeddings=True)
embeddings_2 = model.encode(sentences_2, normalize_embeddings=True)
similarity = embeddings_1 @ embeddings_2.T
print(similarity)

Reference

  1. https://github.com/hjq133/piccolo-embedding
  2. https://huggingface.co/lier007/xiaobu-embedding
  3. https://arxiv.org/abs/2002.10857
Downloads last month
16,659
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for lier007/xiaobu-embedding-v2

Quantizations
2 models

Spaces using lier007/xiaobu-embedding-v2 3

Evaluation results