Downloads · 30 days
10
8% of all-time downloads
jcanode/safeguard-ministral3-3b
safeguard-ministral3-3b is a text classification model from jcanode. Use it when you need a label for a piece of text. It is set up for peft. The card lists the license as apache-2.0.
A LoRA-adapted Ministral-3-3B-Instruct model fine-tuned for binary prompt injection detection. Achieves 99.08% accuracy on a clean held-out test set at a total training cost of ~$4.40.
Downloads · 30 days
10
8% of all-time downloads
All-time downloads
130
Public
Repo size
215 MB
Likes
0
Public
Click a slice to open those files.
.safetensors98.9 MB · 84%
From the Hugging Face model README
A LoRA-adapted Ministral-3-3B-Instruct model fine-tuned for binary prompt injection detection. Achieves 99.08% accuracy on a clean held-out test set at a total training cost of ~$4.40.
| Metric | Value | 95% CI |
|---|---|---|
| Accuracy | 99.08% | [98.82%, 99.32%] |
| F1 (macro) | 98.55% | [98.13%, 98.93%] |
| Precision (unsafe) | 97.49% | [96.49%, 98.39%] |
| Recall (unsafe) | 97.85% | [96.96%, 98.67%] |
On organic (non-synthetic) test data: 99.89% accuracy, 0 false positives.
| Model | Method | Params | Accuracy | F1 |
|---|---|---|---|---|
| Ministral-3B (base) | Zero-shot | 3.45B | 75.2% | 67.8% |
| GPT-OSS-Safeguard-20B | Strict policy | 20B | 91.0% | 93.8% |
| SafeGuard (this model) | LoRA fine-tune | 3.45B + 24.7M | 99.08% | 98.55% |
Fine-tuning a 3B model outperforms zero-shot prompting on a model 6x its size.
See SAFEGUARD_REPORT.pdf for the full technical report (v7.0) including:
jcanode/safeguard-prompt-injection
@misc{safeguard2026,
title={SafeGuard: A Dataset and Fine-Tuning Pipeline for Prompt Injection Detection},
author={Canode, Justin},
year={2026},
url={https://huggingface.co/jcanode/safeguard-ministral3-3b}
}