Update README.md
Browse files
README.md
CHANGED
|
@@ -71,8 +71,8 @@ The model's performance is dependent on the nature and quality of the training d
|
|
| 71 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 72 |
import torch
|
| 73 |
|
| 74 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 75 |
-
model = AutoModelForSequenceClassification.from_pretrained("
|
| 76 |
|
| 77 |
classifier = pipeline(
|
| 78 |
"text-classification",
|
|
@@ -94,9 +94,9 @@ Loading the model requires the [🤗 Optimum](https://huggingface.co/docs/optimu
|
|
| 94 |
from optimum.onnxruntime import ORTModelForSequenceClassification
|
| 95 |
from transformers import AutoTokenizer, pipeline
|
| 96 |
|
| 97 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 98 |
tokenizer.model_input_names = ["input_ids", "attention_mask"]
|
| 99 |
-
model = ORTModelForSequenceClassification.from_pretrained("
|
| 100 |
|
| 101 |
classifier = pipeline(
|
| 102 |
task="text-classification",
|
|
@@ -162,10 +162,10 @@ get help for package usage or contributions, or engage in discussions about LLM
|
|
| 162 |
|
| 163 |
```
|
| 164 |
@misc{deberta-v3-base-prompt-injection,
|
| 165 |
-
author = {
|
| 166 |
title = {Fine-Tuned DeBERTa-v3 for Prompt Injection Detection},
|
| 167 |
year = {2023},
|
| 168 |
publisher = {HuggingFace},
|
| 169 |
-
url = {https://huggingface.co/
|
| 170 |
}
|
| 171 |
```
|
|
|
|
| 71 |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 72 |
import torch
|
| 73 |
|
| 74 |
+
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
|
| 75 |
+
model = AutoModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
|
| 76 |
|
| 77 |
classifier = pipeline(
|
| 78 |
"text-classification",
|
|
|
|
| 94 |
from optimum.onnxruntime import ORTModelForSequenceClassification
|
| 95 |
from transformers import AutoTokenizer, pipeline
|
| 96 |
|
| 97 |
+
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection", subfolder="onnx")
|
| 98 |
tokenizer.model_input_names = ["input_ids", "attention_mask"]
|
| 99 |
+
model = ORTModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection", export=False, subfolder="onnx")
|
| 100 |
|
| 101 |
classifier = pipeline(
|
| 102 |
task="text-classification",
|
|
|
|
| 162 |
|
| 163 |
```
|
| 164 |
@misc{deberta-v3-base-prompt-injection,
|
| 165 |
+
author = {ProtectAI.com},
|
| 166 |
title = {Fine-Tuned DeBERTa-v3 for Prompt Injection Detection},
|
| 167 |
year = {2023},
|
| 168 |
publisher = {HuggingFace},
|
| 169 |
+
url = {https://huggingface.co/ProtectAI/deberta-v3-base-prompt-injection},
|
| 170 |
}
|
| 171 |
```
|