Model Card for Wolf Defender Prompt-Injection Detector Small Edge

Edge/quantized ONNX variant of 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 (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. 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 β€” a local AI firewall that secures every AI interaction (prompts, tools, documents) before it reaches your models. Try it for free at patronus.studio.

Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for patronus-studio/wolf-defender-prompt-injection-small-edge

Collection including patronus-studio/wolf-defender-prompt-injection-small-edge