Downloads · 30 days
50
3% of all-time downloads
pitangent-ds/deberta-v3-nli-onnx-quantized
deberta-v3-nli-onnx-quantized is a zero-shot classification model from pitangent-ds. Use it when you need labels you did not train the model on. It is set up for transformers. The card lists the license as apache-2.0.
This model has been quantized using the base model: sileod/deberta-v3-base-tasksource-nli, To use this model you need to have onnxruntime installed on your machine. To use this model, you can check out my Huggingface…
Downloads · 30 days
50
3% of all-time downloads
All-time downloads
1.8K
Public
Repo size
247 MB
Likes
0
Public
Click a slice to open those files.
.onnx244 MB · 96%
From the Hugging Face model README
This model has been quantized using the base model: sileod/deberta-v3-base-tasksource-nli, To use this model you need to have onnxruntime installed on your machine.
To use this model, you can check out my Huggingface Spaces.
The source code for the Huggingface Application can be found on GitHub.
To run this model on your machine use the following code. Note that this model is optimized for CPU with AVX2 support.
pip install transformers optimum[onnxruntime]
# load libraries
from transformers import AutoTokenizer
from optimum.onnxruntime import ORTModelForSequenceClassification
from optimum.pipelines import pipeline
# load model components
MODEL_ID = "pitangent-ds/deberta-v3-nli-onnx-quantized"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
model = ORTModelForSequenceClassification.from_pretrained(MODEL_ID)
# load the pipeline
classifier = pipeline("zero-shot-classification", tokenizer=tokenizer, model=model)
# inference
text = "The jacket that I bought is awesome"
candidate_labels = ["positive", "negative"]
results = classifier(text, candidate_labels)