Downloads · 30 days
677
0% of all-time downloads
lier007/xiaobu-embedding-v2
xiaobu-embedding-v2 is a machine learning model from lier007. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for sentence-transformers.
基于piccolo-embedding[1],主要改动如下: - 合成数据替换为xiaobu-embedding-v1[2]所积累数据 - 在circleloss[3]视角下统一处理CMTEB的6类问题,最大优势是可充分利用原始数据集中的多个正例,其次是可一定程度上避免考虑多个不同loss之间的权重问题
Downloads · 30 days
677
0% of all-time downloads
All-time downloads
2.2M
Public
Parameters
326M
3.9 GB on disk
Likes
61
Public
Click a slice to open those files.
.bin1.3 GB · 33%
From the Hugging Face model README
基于piccolo-embedding[1],主要改动如下:
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)