Usage
from transformers import AutoTokenizer, AutoModelForCausalLMfrom peft import PeftModeltok = AutoTokenizer.from_pretrained("Yiruama/qwen3-0.6b-guard-lora")model = PeftModel.from_pretrained(AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-0.6B"), "Yiruama/qwen3-0.6b-guard-lora")
Score = softmax over the first-token logits of SAFE / UNSAFE after the chat template (thinking disabled); see the training notebook for the exact instruction.
Results
Test set hash 9415deddb119, threshold 0.5. Values in %.
Table with columns: model, latency_ms, test_set F1, test_set recall, test_set FPR, test_set n, cgb_default F1, cgb_default recall, cgb_default FPR, cgb_default n, cgb_jailbreak F1, cgb_jailbreak recall, cgb_jailbreak n, integral (simplified)| model | latency_ms | test_set F1 | test_set recall | test_set FPR | test_set n | cgb_default F1 | cgb_default recall | cgb_default FPR | cgb_default n | cgb_jailbreak F1 | cgb_jailbreak recall | cgb_jailbreak n | integral (simplified) |
|---|
| Qwen3-0.6B (base) | 51.8 | 8.6 | 4.5 | 0.3 | 834 | 17.3 | 9.5 | 0.8 | 500 | 3.2 | 1.6 | 490 | 0.006 |
| Qwen3-0.6B + LoRA (ours) | 126.9 | 89 | 87.9 | 11.1 | 834 | 66.7 | 61.4 | 21.2 | 500 | 72.9 | 57.3 | 490 | 0.486 |
| Llama Prompt Guard 2 (86M) | 48.1 | 61.6 | 49.1 | 11.9 | 834 | 12.4 | 6.6 | 0.4 | 500 | 8.2 | 4.3 | 490 | 0.01 |
| ProtectAI DeBERTa v2 (184M) | 41.9 | 70.2 | 62.6 | 18 | 834 | 15 | 8.7 | 6.9 | 500 | 34.7 | 21 | 490 | 0.052 |
| Llama Guard 3 1B | 75.9 | 64.5 | 52.7 | 12.4 | 834 | 71.4 | 66.4 | 18.1 | 500 | 47.4 | 31 | 490 | 0.338 |
test_set = official test splits of deepset and jackhhao + WildJailbreak eval (test_set.jsonl). cgb_* = prompts from
CircleGuardBench public, never seen in training. Prompt classification only; response moderation is not evaluated.