Zero-Shot Classification
Transformers
PyTorch
Safetensors
English
deberta-v2
text-classification
deberta-v3-base
deberta-v3
deberta
nli
natural-language-inference
multitask
multi-task
pipeline
extreme-multi-task
extreme-mtl
tasksource
zero-shot
rlhf
Eval Results
Inference Endpoints

onnxruntime error

#6
by gsasikiran - opened

: INVALID_ARGUMENT : Invalid Feed Input Name:token_type_ids

I am getting the above error of input as invalid argument, for this model. Please let me know how can I fix this!

Hi, can you paste some code to reproduce ? Thank you

from optimum.pipelines import pipeline
classifier = pipeline(task="zero-shot-classification", model="sileod/deberta-v3-base-tasksource-nli", accelerator="ort")

text = "Robot inspection"
labels = ["materials", "robots", "silicon"]
results = classifier(text.lower(),
candidate_labels=labels,
multi_label=False)

But if you change the model to "facebook/bart-large-mnli", the above code works fine. From my research, there is a difference between the onnx model input field and the input field created by the model.

Last version (optimum 1.13.1) says that zero shot NLI is not supported, so this seems to be a optimum problem

But isn't the other model that I provided, "facebook/bart-large-mnli" is also zero shot NLI?

Yes, but the underlying models are different (deberta vs bart), so they might have noticed that support was not good enough then marked it as not supported

Okay got it!

Please let me know if I can find any solution for that!

Thanks for your fast reply and the efficient models!

Sign up or log in to comment