--- inference: false license: gpl-3.0 base_model: microsoft/deberta-v3-base datasets: - Private language: - en tags: - llm - genai - promptinjection - prompt-injection - injection - security metrics: - accuracy - recall - precision - f1 pipeline_tag: text-classification model-index: - name: deberta-v3-base-optimus-v0 results: [] co2_eq_emissions: emissions: 0.99 source: code carbon training_type: fine-tuning --- # Model Card for deberta-v3-base-optimus-v0 Fine-tuned version of [microsoft/deberta-v3-base](https://huggingface.co/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](https://huggingface.co/microsoft/deberta-v3-base) ## How to Get Started with the Model ### Transformers ```python 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}, } ```