optimum/documentation-images
Viewer
β’
Updated
β’
15
β’
11.7k
β’
2
Accelerating DL
from optimum.onnxruntime import ORTModelForSequenceClassification
# Load the model from the hub and export it to the ONNX format
model_id = "distilbert-base-uncased-finetuned-sst-2-english"
model = ORTModelForSequenceClassification.from_pretrained(model_id, export=True)