How to use from the
Use from the
sentence-transformers library
from sentence_transformers import SentenceTransformer

model = SentenceTransformer("moyangzhan/bge-base-zh-v1.5-onnx")

sentences = [
    "那是 個快樂的人",
    "那是 條快樂的狗",
    "那是 個非常幸福的人",
    "今天是晴天"
]
embeddings = model.encode(sentences)

similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]

ONNX version of BAAI/bge-base-zh-v1.5

This is a sentence-transformers model: It maps sentences & paragraphs to a N dimensional dense vector space and can be used for tasks like clustering or semantic search.

The model conversion was made with onnx-convert tool with the following parameters:

python convert.py --model_id BAAI/bge-base-zh-v1.5 --quantize QInt8  --optimize 0 --opset=17  --skip_shape_inference

There are two versions of model available:

  • model.onnx - Float32 version, with optimize=0
  • model_opt2_QInt8.onnx - QInt8 quantized version, with optimize=0

License

Apache 2.0

Downloads last month
17
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for moyangzhan/bge-base-zh-v1.5-onnx

Quantized
(4)
this model