Instructions to use moyangzhan/bge-base-zh-v1.5-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use moyangzhan/bge-base-zh-v1.5-onnx with sentence-transformers:
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] - Notebooks
- Google Colab
- Kaggle
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=0model_opt2_QInt8.onnx- QInt8 quantized version, with optimize=0
License
Apache 2.0
- Downloads last month
- 17
Model tree for moyangzhan/bge-base-zh-v1.5-onnx
Base model
BAAI/bge-base-zh-v1.5
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]