Skip to main content

Package to pack setfit model to onnx format

Project description

SetFitONNX

Export the setfit model to ONNX format

Features

  • Mean Pooling Layer to ONNX Graph
  • Single ONNX Model combining both the sentence transformer & classification head

Installation

pip install setfitonnx

How to

from setfitonnx import convert_onnx

# Setfit Model directory
model_path = "/home/mysetfit-model"
# ONNX Output directory
output_dir = "/home/setfit-onnx-model"
# Convert to ONNX
convert_onnx(model_path=model_path,output_dir=output_dir)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

setfitonnx-0.1.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

setfitonnx-0.1.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page