Downloads · 30 days
21
7% of all-time downloads
fangxq/XYZ-embedding-zh-v2
XYZ-embedding-zh-v2 is a machine learning model from fangxq. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
21
7% of all-time downloads
All-time downloads
310
Public
Repo size
2.6 GB
Likes
0
Public
Click a slice to open those files.
.bin1.3 GB · 100%
From the Hugging Face model README
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]