76k Downloads Model Card for deberta-v3-base-prompt-injection
There is a newer version of the model - protectai/deberta-v3-base-prompt-injection-v2.
This model is a fine-tuned version of microsoft/deberta-v3-base on multiple combined datasets of prompt injections and normal prompts.
It aims to identify prompt injections, classifying inputs into two categories: 0 for no injection and 1 for injection detected.
It achieves the following results on the evaluation set:
Loss: 0.0010
Accuracy: 0.9999
Recall: 0.9997
Precision: 0.9998
F1: 0.9998
Model details
Fine-tuned by: Laiyer.ai
Model type: deberta-v3
Language(s) (NLP): English
License: Apache license 2.0
Finetuned from model: microsoft/deberta-v3-base
Intended Uses & Limitations
It aims to identify prompt injections, classifying inputs into two categories: 0 for no injection and 1 for injection detected.
The model's performance is dependent on the nature and quality of the training data. It might not perform well on text styles or topics not represented in the training set.
How to Get Started with the Model
Transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
import torch
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
model = AutoModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
classifier = pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
truncation=True,
max_length=512,
device=torch.device("cuda" if torch.cuda.is_available() else "cpu"),
)
print(classifier("Your prompt injection is here"))
https://huggingface.co/protectai/deberta-v3-base-prompt-injection
There is a newer version of the model - protectai/deberta-v3-base-prompt-injection-v2.
This model is a fine-tuned version of microsoft/deberta-v3-base on multiple combined datasets of prompt injections and normal prompts.
It aims to identify prompt injections, classifying inputs into two categories: 0 for no injection and 1 for injection detected.
It achieves the following results on the evaluation set:
Loss: 0.0010
Accuracy: 0.9999
Recall: 0.9997
Precision: 0.9998
F1: 0.9998
Model details
Fine-tuned by: Laiyer.ai
Model type: deberta-v3
Language(s) (NLP): English
License: Apache license 2.0
Finetuned from model: microsoft/deberta-v3-base
Intended Uses & Limitations
It aims to identify prompt injections, classifying inputs into two categories: 0 for no injection and 1 for injection detected.
The model's performance is dependent on the nature and quality of the training data. It might not perform well on text styles or topics not represented in the training set.
How to Get Started with the Model
Transformers
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
import torch
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
model = AutoModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection")
classifier = pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
truncation=True,
max_length=512,
device=torch.device("cuda" if torch.cuda.is_available() else "cpu"),
)
print(classifier("Your prompt injection is here"))
https://huggingface.co/protectai/deberta-v3-base-prompt-injection