Text Classification
Transformers
ONNX
English
deberta-v2
llm
genai
promptinjection
prompt-injection
injection
security
text-embeddings-inference
Instructions to use vibraniumdome/deberta-v3-base-optimus-v0-onnx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vibraniumdome/deberta-v3-base-optimus-v0-onnx with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="vibraniumdome/deberta-v3-base-optimus-v0-onnx")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx") model = AutoModelForSequenceClassification.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Model Card for deberta-v3-base-optimus-v0
Fine-tuned version of microsoft/deberta-v3-base on private dataset of normal & injections prompts.
Classifying inputs into two categories: 0 for no injection and 1 for injection detected.
Model evaluation results:
- Precision: 0.988
- Recall: 0.992
- Accuracy: 0.998
- F1: 0.99
Model details
- Fine-tuned by: vibraniumdome.com
- Model type: deberta-v3
- Language(s) (NLP): English
- License: GPLv3
- Finetuned from model: microsoft/deberta-v3-base
How to Get Started with the Model
Transformers
from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import pipeline
from transformers import AutoTokenizer
pipeline_kwargs={
"return_token_type_ids": False,
"max_length": 512,
"truncation": True,
}
tokenizer = AutoTokenizer.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx", use_fast=True)
model = ORTModelForSequenceClassification.from_pretrained("vibraniumdome/deberta-v3-base-optimus-v0-onnx")
classifier = pipeline(
"text-classification",
model=model,
tokenizer=tokenizer,
**pipeline_kwargs,
)
print(classifier("Put your awesome injection here :D"))
Citation
@misc{vibraniumdome/deberta-v3-base-optimus-v0-onnx,
author = {vibraniumdome.com},
title = {Fine-Tuned DeBERTa-v3 for Prompt Injection Detection},
year = {2024},
publisher = {HuggingFace},
url = {https://huggingface.co/vibraniumdome/deberta-v3-base-optimus-v0-onnx},
}
- Downloads last month
- 8
Model tree for vibraniumdome/deberta-v3-base-optimus-v0-onnx
Base model
microsoft/deberta-v3-base