RedHatAI/bge-small-en-v1.5-dense
By RedHatAI · ↓ 6 · ♥ 0 · Updated 2023-11-13
What's in this repo
This page lists the files in RedHatAI/bge-small-en-v1.5-dense, including model.onnx.
- 1 ONNX models (.onnx files)
- 8 files, including 4 .json, 1 .md, 1 .onnx, 1 .txt
- Last updated 2023-11-13
ONNX files
| File | Size | Download |
|---|---|---|
| model.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
This is the ONNX variant of the bge-small-en-v1.5 embeddings model created with the DeepSparse Optimum integration.
For ONNX export, run:
pip install git+https://github.com/neuralmagic/optimum-deepsparse.git
from optimum.deepsparse import DeepSparseModelForFeatureExtraction
from transformers.onnx.utils import get_preprocessor
from pathlib import Path
model_id = "BAAI/bge-small-en-v1.5"
# load model and convert to onnx
model = DeepSparseModelForFeatureExtraction.from_pretrained(model_id, export=True)
tokenizer = get_preprocessor(model_id)
# save onnx checkpoint and tokenizer
onnx_path = Path("bge-small-en-v1.5-dense")
model.save_pretrained(onnx_path)
tokenizer.save_pretrained(onnx_path)
Model info
feature-extraction
transformers
transformers
onnx
bert
feature-extraction
en
license:mit
text-embeddings-inference
endpoints_compatible
region:us
↓ 6
♥ 0
Created: 2023-09-21
Updated: 2023-11-13
View on Hugging FaceFiles (8)
.gitattributes
README.md
config.json
model.onnx
ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt