ONNX Model Zoo

zeroshot/gte-small-dense

By zeroshot · ↓ 0 · ♥ 0 · Updated 2023-10-12

What's in this repo

This page lists the files in zeroshot/gte-small-dense, including model.onnx.

  • 1 ONNX models (.onnx files)
  • 9 files, including 5 .json, 1 .md, 1 .onnx, 1 .txt
  • Last updated 2023-10-12

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 gte-small embeddings model created with the DeepSparse Optimum integration.

To replicate 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 = "thenlper/gte-small"

# 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("gte-small-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
↓ 0 ♥ 0

Created: 2023-10-12

Updated: 2023-10-12

View on Hugging Face

Files (9)

.gitattributes
README.md
added_tokens.json
config.json
model.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.txt

Related models