- Apache 2.0
- German and English
Orca Sonar
Document class
Assigns documents to one of nine topic classes such as legal, HR, finance or medical before they reach the context window.
On Hugging Face
patronus-studio/orca-sonar-document-classifierProfile.
Task
Sensitive data and documents
Document classes and entities before content leaves the device
Signal
hr
- Parameters
- 0.1B parameters
- Base
- mmBERT-small
- Evaluation
- Macro F1 0.940 and accuracy 0.942 on the held-out test set of real documents.
- Formats
- Safetensors FP32 · ONNX FP16
- License
- Apache 2.0
- Hugging Face
patronus-studio/orca-sonar-document-classifier
How it works: Orca Sonar.
Orca Sonar
Input
Employment contract for the new colleague: please summarize salary, probation period and notice periods.
Output
hr
Application rule: Do not send to external AI services
Evaluation.
Model card with protocol0.940
Macro F1 0.940 and accuracy 0.942 on the held-out test set of real documents.
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