Model Card for Wolf Defender Threat Classifier Edge

Quantized ONNX builds of Wolf Defender Threat Classifier for local / edge inference.

This repository contains the size- and memory-optimized ONNX exports of the FP32 model. For intended uses, class definitions, training data, benchmarks, and limitations, see the main model card.

Variants

Variant Path Quantization
FP16 onnx/fp16/model.onnx FP16 weights
INT8 onnx/int8/model.onnx Post-training dynamic INT8 (MatMul/Gemm)
INT8 + INT4 embeddings onnx/int8_int4_embeddings/model.onnx Dynamic INT8 plus 4-bit weight-only token embeddings

The exact quantization parameters are recorded in onnx/quantization_manifest.json.

Benchmark

Quantization parity on the unified_v3 held-out test split (n = 2233; max_length 128, CPU):

Variant Accuracy F1 (macro) ฮ” F1 vs FP32
FP32 reference (main repo) 0.9579 0.9454 โ€”
FP16 0.9557 0.9429 -0.0025
INT8 0.9539 0.9410 -0.0044
INT8 + INT4 embeddings 0.9530 0.9384 -0.0070

Measured CPU latency (batch 64): ~18.97 ms/text for the INT8+INT4 build.

Full details in metrics/quant_bench.json.

Usage

from optimum.onnxruntime import ORTModelForSequenceClassification
from transformers import AutoTokenizer

model_id = "patronus-studio/wolf-defender-threat-classifier-edge"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = ORTModelForSequenceClassification.from_pretrained(model_id, subfolder="onnx/int8_int4_embeddings")

inputs = tokenizer("...", return_tensors="pt")
logits = model(**inputs).logits

Post-process the logits as described in the main model card (softmax over the logits, argmax).

License

Released under the Apache License 2.0; the full text is included as LICENSE. Derived from Wolf Defender Threat Classifier and ultimately from jhu-clsp/mmBERT-small (MIT License); upstream notices are retained.

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, including prompts, tools and documents, before it reaches your models.

Try it for free at patronus.studio.

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

Model tree for patronus-studio/wolf-defender-threat-classifier-edge

Quantized
(1)
this model

Collection including patronus-studio/wolf-defender-threat-classifier-edge