--- license: apache-2.0 tags: - prompt-injection - jailbreak-detection - guardrails - security - llm-security - ai-safety - ai-agent-security - patronus - multilingual - modernbert - onnx - quantized - edge base_model: patronus-studio/wolf-defender-prompt-injection-small pipeline_tag: text-classification language: - de - en --- # Model Card for Wolf Defender Prompt-Injection Detector Small Edge **Edge/quantized ONNX variant of [`patronus-studio/wolf-defender-prompt-injection-small`](https://huggingface.co/patronus-studio/wolf-defender-prompt-injection-small).** Private / internal. Quantized with the Patronus RunPod ONNX method (`quantize_dynamic` INT8 linears + `MatMulNBitsQuantizer` 4-bit block-128 embedding). The parent FP32/FP16 model is unchanged. Binary prompt-injection detector (mmBERT-small, on-device variant). ## Benchmark — Qualifire Evaluated on [Qualifire](https://huggingface.co/datasets/rogue-security/prompt-injections-benchmark) (5,000 prompts, max_length 2048). Quantization is lossless vs FP32. | Variant | Size | F1 | Precision | Recall | FPR | Accuracy | |---|---|---|---|---|---|---| | fp32 (parent) | — | 0.9102 | 0.9144 | 0.9061 | 0.057 | 0.928 | | int8 | 135 MB | 0.9097 | 0.9113 | 0.9081 | 0.059 | 0.928 | | **int8_int4_embeddings** | **92 MB** | **0.9121** | 0.9121 | 0.9121 | 0.059 | 0.930 | **Recommended: `onnx/int8_int4_embeddings/model.onnx`** — ~5.8x smaller than FP32 at zero quality loss. ## Benchmark — Patronus Validation Set Held-out validation split of the internal Patronus prompt-injection dataset (5,000 sampled: 1,727 attack / 3,273 benign, max_length 512). In-distribution; quantization lossless. | Variant | F1 | Precision | Recall | FPR | Accuracy | |---|---|---|---|---|---| | fp32 (parent) | 0.9751 | 0.9751 | 0.9751 | 0.013 | 0.983 | | int8 | 0.9740 | 0.9723 | 0.9757 | 0.015 | 0.982 | | **int8_int4_embeddings** | 0.9754 | 0.9746 | 0.9763 | 0.013 | 0.983 | ## Files - `onnx/fp16/model.onnx`, `onnx/int8/model.onnx`, `onnx/int8_int4_embeddings/model.onnx` - `config.json`, `tokenizer.json`, `tokenizer_config.json` (from the parent) - `metrics/quant_bench.json` ## License This model is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). A copy of the license is included as `LICENSE` in this repository. ## Patronus Ark This model is built to run inside **Patronus Ark**, Patronus' open-source on-device AI-security scanning library (L1 native rules → L2 NTDB cascade → L3 transformer). Ark is not publicly released yet — a repository link will be added here at launch. --- ## 🛡️ Patronus Protect Brought to you by **[Patronus Protect](https://patronus.studio)** — a local AI firewall that secures every AI interaction (prompts, tools, documents) before it reaches your models. **Try it for free at [patronus.studio](https://patronus.studio).**