Patronus
  • Apache 2.0
  • 7 heads

Lion Warden
Seven checks

One shared mmBERT encoder with seven security heads screens an input in a single pass: injection, threat type, routing, document class, tool class, tool action and tool tags.

On Hugging Face patronus-studio/lion-warden-ai-security-classifier

Profile.

Task

Several security tasks

One encoder, seven heads, one pass

Signal

injection: benign · sensitive_document: finance · routing: office_request

Parameters
0.1B parameters
Base
mmBERT-small
Evaluation
Mean head F1 0.937 on the unified_v3 test set; injection head F1 0.966 (15,174 examples).
Formats
Safetensors FP32 · ONNX FP16 · edge build INT8, INT8 with INT4 embeddings and FP16
Variants and siblings

Lion Warden Edge Quantized ONNX builds with the same seven outputs.

License
Apache 2.0
Hugging Face
patronus-studio/lion-warden-ai-security-classifier

How it works: Lion Warden.

Lion Warden

Input

Create a summary of the attached annual financial statement for the board.

Output

injection: benign · sensitive_document: finance · routing: office_request

Application rule: Allow, flag as a finance document

Evaluation.

Model card with protocol

0.937

Mean head F1 0.937 on the unified_v3 test set; injection head F1 0.966 (15,174 examples).

Install.

Patronus Ark loads the model and runs it on the CPU. The quickstart with Transformers or ONNX Runtime is in the model card.

Patronus Ark · Python
pip install patronus-ark

from patronus_ark import SecurityGateway

scanner = SecurityGateway(
    categories=["injection", "dlp", "pii"], max_level="l2",
)
scanner.warmup()
scanner.enqueue("Text to inspect")
while (event := scanner.consume_next_event(timeout=1.0)) is not None:
    if event["event_type"] == "result":
        r = event["result"]
        print(r["category"], r["class_name"], r["confidence"])
    else:
        break