ONNX 模型库
返回模型

说明文档

这是使用 DeepSparse Optimum 集成创建的 gte-small 嵌入模型的 ONNX 变体。

要复现 ONNX 导出,请运行:

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\"

# 加载模型并转换为 onnx
model = DeepSparseModelForFeatureExtraction.from_pretrained(model_id, export=True)
tokenizer = get_preprocessor(model_id)

# 保存 onnx 检查点和分词器
onnx_path = Path(\"gte-small-dense\")
model.save_pretrained(onnx_path)
tokenizer.save_pretrained(onnx_path)

zeroshot/gte-small-dense

作者 zeroshot

feature-extraction transformers
↓ 0 ♥ 0

创建时间: 2023-10-12 18:57:13+00:00

更新时间: 2023-10-12 19:00:19+00:00

在 Hugging Face 上查看

文件 (9)

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