Downloads · 30 days
36.7K
67% of all-time downloads
IEITYuan/Yuan-embedding-2.0-zh
Yuan-embedding-2.0-zh is a machine learning model from IEITYuan. 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. The card lists the license as apache-2.0.
<h2 align="left"Yuan-embedding-2.0-zh</h2
Downloads · 30 days
36.7K
67% of all-time downloads
All-time downloads
54.8K
Public
Parameters
326M
2.6 GB on disk
Likes
3
Public
Click a slice to open those files.
.bin1.3 GB · 50%
From the Hugging Face model README
Yuan-embedding-2.0-zh 是专门为中文文本检索任务设计的嵌入模型。我们在Yuan-embedding-1.0的基础上,针对Retrieval任务与Reranking任务进行了进一步优化。主要工作如下:
pip install -U sentence-transformers==3.4.1
使用示例:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("IEITYuan/Yuan-embedding-2.0-zh")
sentences_1 = ["样例数据-1", "样例数据-2"]
sentences_2 = ["样例数据-3", "样例数据-4"]
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)