Nanosaur2-670M
well9472 · Kit
Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…
Flags English text that tries to hijack a language model, labeling each input as benign or prompt injection. For developers who screen user input in LLM apps.
deberta-v3-base-prompt-injection-v2 is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download protectai/deberta-v3-base-prompt-injection-v2
deberta-v3-base-prompt-injection-v2 is a text classifier from Protect AI. It spots prompt injection, which is text written to push a language model into output nobody intended. It is a fine-tune of Microsoft's deberta-v3-base and labels each input as benign, class 0, or injection, class 1. The card carries a notice that the project behind it is archived and no longer maintained.
Developers who add a screening step to apps built on language models, where the input is English.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | LLM app developers | Screen user text before it reaches the model | Flag a message that tells the model to drop its rules |
| Security | Application security teams | Add a detector layer to chat pipelines | Score a pasted document for hidden instructions |
| AI platforms | Gateway builders | Filter prompts at the point where they enter | Block or review anything labeled as injection |
Anyone who needs jailbreak detection, non-English prompts or system prompt scanning can skip it, since the card says it does none of these well.
| Use case | Who | What they get back |
|---|---|---|
| Input screening | App developers | A benign or injection label with a score for each text |
| Document checks | Security teams | A label for retrieved or uploaded text |
| Pipeline guard | Platform engineers | A fast classifier that sits ahead of the main model |
What you need first:
pip install -U huggingface_hub hf download protectai/deberta-v3-base-prompt-injection-v2
Build a pipeline from the tokenizer and the model, then pass it the text to check. The code below truncates to 512 tokens and uses a GPU when one is available.
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
import torch
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection-v2")
model = AutoModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection-v2")
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"))| Tool | What it does |
|---|---|
| AutoTokenizer | Turns the text into tokens |
| AutoModelForSequenceClassification | Loads the classifier |
| pipeline | Wraps both into one call that returns a label and score |
| ORTModelForSequenceClassification | Loads the ONNX version through Optimum |
You pass in a user message that tells the model to ignore everything it was told earlier. The classifier returns the injection class with a score. A normal question comes back as benign.
A prompt injection hides instructions inside text so a language model obeys them. This model reads a piece of text and says whether it looks like that. A good first step is to run the code above on a harmless sentence and then on a sentence that gives orders.
The model was trained on a mix of public datasets plus injections written from papers, articles, competitions and community feedback, and more than 20 configurations were tried. Recall is high and precision is lower, so it tends to flag too much rather than miss attacks. It also false-alarms on system prompts.
The card tested 20,000 prompts from datasets it was not trained on.
Flags English text that tries to hijack a language model, labeling each input as benign or prompt injection. For developers who screen user input in LLM apps.
Made by protectai on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: deberta-v3-base-prompt-injection-v2 is a text classifier from Protect AI. It spots prompt injection, which is text written to push a language model into output nobody intended. It is a fine-tune of Microsoft's deberta-v3-base and labels each input as benign, class 0, or injection, class 1. The card carries a notice that the project behind it is archived and no longer maintained.
Who it suits: Developers who add a screening step to apps built on language models, where the input is English.
Industry | Who uses it | How they use it | Example
Software | LLM app developers | Screen user text before it reaches the model | Flag a message that tells the model to drop its rules
Security | Application security teams | Add a detector layer to chat pipelines | Score a pasted document for hidden instructions
AI platforms | Gateway builders | Filter prompts at the point where they enter | Block or review anything labeled as injection
Anyone who needs jailbreak detection, non-English prompts or system prompt scanning can skip it, since the card says it does none of these well.
Where to use it:
Use case | Who | What they get back
Input screening | App developers | A benign or injection label with a score for each text
Document checks | Security teams | A label for retrieved or uploaded text
Pipeline guard | Platform engineers | A fast classifier that sits ahead of the main model
How to set it up: What you need first:
pip install -U huggingface_hub
hf download protectai/deberta-v3-base-prompt-injection-v2
How to use it: Build a pipeline from the tokenizer and the model, then pass it the text to check. The code below truncates to 512 tokens and uses a GPU when one is available.
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
import torch
tokenizer = AutoTokenizer.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection-v2")
model = AutoModelForSequenceClassification.from_pretrained("ProtectAI/deberta-v3-base-prompt-injection-v2")
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"))
Title: Parts the card uses
Tool | What it does
AutoTokenizer | Turns the text into tokens
AutoModelForSequenceClassification | Loads the classifier
pipeline | Wraps both into one call that returns a label and score
ORTModelForSequenceClassification | Loads the ONNX version through Optimum
Example: You pass in a user message that tells the model to ignore everything it was told earlier. The classifier returns the injection class with a score. A normal question comes back as benign.
For newcomers and experts: A prompt injection hides instructions inside text so a language model obeys them. This model reads a piece of text and says whether it looks like that. A good first step is to run the code above on a harmless sentence and then on a sentence that gives orders.
The model was trained on a mix of public datasets plus injections written from papers, articles, competitions and community feedback, and more than 20 configurations were tried. Recall is high and precision is lower, so it tends to flag too much rather than miss attacks. It also false-alarms on system prompts.
Take the text you want to check
Tokenize it, up to 512 tokens
The classifier scores benign or injection
Act on the label in your app
Good to know: The card tested 20,000 prompts from datasets it was not trained on.
Title: Post-training test, 20,000 prompts
Accuracy: 95.25 percent
Precision: 91.59 percent
Recall: 99.74 percent
F1 score: 95.49 percent
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download protectai/deberta-v3-base-prompt-injection-v2
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 6 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| deberta-v3-base-prompt-injection-v2 This page | 476,298 | 129 | 184M | apache-2.0 | |
| Qwen3-4B P9 HoneypotShares llm-security · prompt-injection · safetensors | 33 | 3 | — | apache-2.0 | |
| bge-reranker-v2-m3Shares text-embeddings-inference · text-classification · transformers | 14,685,230 | 1,301 | 568M | apache-2.0 | |
| auto-150m-3Shares text-embeddings-inference · text-classification · transformers | 207 | 4 | 150M | apache-2.0 | |
| whisper-persian-v4Shares generated_from_trainer · transformers · safetensors | 1,071 | 21 | 1.5B | apache-2.0 | |
| svd-linear-attention-roberta-base-adasplashShares text-embeddings-inference · text-classification · transformers | 36 | 2 | — | mit |
Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.
well9472 · Kit
Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…
Waqf-AI · Kit
Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.
Wan-AI · Kit
Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.
Wan-AI · Kit
Generates cinematic video of a character driven by an audio track, and can also lip-sync existing video. For video creators, animators and researchers with a l…
Wan-AI · Kit
Animates a character or swaps one into a video by copying a performer's movement and expressions, as one model from the Wan2.2 video family. Use only faces and…
vllm-sr · Kit
Answers choice, yes-or-no, score, box and tracking questions about text, images or video in one call, with a probability for each answer. For people building r…