asofter commited on
Commit
8696c48
1 Parent(s): e5c45f0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -0
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ datasets:
5
+ - mnli
6
+ - anli
7
+ - fever
8
+ - wanli
9
+ - ling
10
+ - amazonpolarity
11
+ - imdb
12
+ - appreviews
13
+ inference: false
14
+ pipeline_tag: zero-shot-classification
15
+ tags:
16
+ - NLI
17
+ - deberta-v3
18
+ license: mit
19
+ ---
20
+
21
+ # ONNX version of MoritzLaurer/deberta-v3-base-zeroshot-v1
22
+
23
+ **This model is a conversion of [MoritzLaurer/deberta-v3-base-zeroshot-v1](https://huggingface.co/MoritzLaurer/deberta-v3-base-zeroshot-v1) to ONNX** format using the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library.
24
+
25
+ `MoritzLaurer/deberta-v3-large-zeroshot-v1` is designed for zero-shot classification, capable of determining whether a hypothesis is `true` or `not_true` based on a text, a format based on Natural Language Inference (NLI).
26
+
27
+ ## Usage
28
+
29
+ Loading the model requires the [🤗 Optimum](https://huggingface.co/docs/optimum/index) library installed.
30
+
31
+ ```python
32
+ from optimum.onnxruntime import ORTModelForSequenceClassification
33
+ from transformers import AutoTokenizer, pipeline
34
+
35
+
36
+ tokenizer = AutoTokenizer.from_pretrained("laiyer/deberta-v3-base-zeroshot-v1-onnx")
37
+ model = ORTModelForSequenceClassification.from_pretrained("laiyer/deberta-v3-base-zeroshot-v1-onnx")
38
+ classifier = pipeline(
39
+ task="zero-shot-classification",
40
+ model=model,
41
+ tokenizer=tokenizer,
42
+ top_k=None,
43
+ )
44
+
45
+ classifier_output = classifier("Last week I upgraded my iOS version and ever since then my phone has been overheating whenever I use your app.", ["mobile", "website", "billing", "account access"])
46
+ print(classifier_output)
47
+ ```