PaxmodGuard v1
Browse files- .gitattributes +1 -0
- README.md +149 -81
- guard-v4-large/guard.json +0 -21
- guard-v4-large/tokenizer.json +0 -0
- guard-v4-large/tokenizer_config.json +0 -24
- guard-v4/guard.json +0 -21
- guard-v4/tokenizer.json +0 -0
- paxmodguard-v1/guard.json +121 -0
- {guard-v4 → paxmodguard-v1}/model.int8.onnx +2 -2
- guard-v4-large/model.int8.onnx → paxmodguard-v1/tokenizer.json +2 -2
- {guard-v4 → paxmodguard-v1}/tokenizer_config.json +14 -7
- policy.md +0 -47
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
paxmodguard-v1/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,101 +1,169 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
-
|
| 4 |
-
library_name:
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
-
|
| 7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
#
|
| 11 |
|
| 12 |
-
A small,
|
|
|
|
| 13 |
|
| 14 |
-
-
|
| 15 |
-
-
|
| 16 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
## Labels
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
| 21 |
|---|---|
|
| 22 |
-
|
|
| 23 |
-
|
|
| 24 |
-
| `
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
|
| 28 |
-
|
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
| `
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
|
| 68 |
-
|
|
| 69 |
-
|
|
| 70 |
-
|
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
|
| 74 |
## Training data
|
| 75 |
|
| 76 |
-
|
|
|
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|---|---|---|
|
| 80 |
-
| [Aegis 2.0](https://huggingface.co/datasets/nvidia/Aegis-AI-Content-Safety-Dataset-2.0), NVIDIA | CC-BY-4.0 | Human-labelled prompts and responses |
|
| 81 |
-
| [WildChat-1M](https://huggingface.co/datasets/allenai/WildChat-1M), Allen Institute for AI | ODC-BY | Real chatbot traffic, labelled by the teacher model |
|
| 82 |
-
| [hh-rlhf](https://huggingface.co/datasets/Anthropic/hh-rlhf), Anthropic | MIT | Red-team turns labelled by the teacher; helpful turns as safe examples |
|
| 83 |
-
| [OR-Bench](https://huggingface.co/datasets/bench-llm/or-bench) | CC-BY-4.0 | Safe prompts that look harmful (hard negatives) |
|
| 84 |
-
| [jailbreak-classification](https://huggingface.co/datasets/jackhhao/jailbreak-classification) | Apache-2.0 | Jailbreaks |
|
| 85 |
-
| [JBB-Behaviors](https://huggingface.co/datasets/JailbreakBench/JBB-Behaviors) | MIT | Harmful and benign requests |
|
| 86 |
-
| Synthetic companion messages written with [gpt-oss-20b](https://huggingface.co/openai/gpt-oss-20b) | Apache-2.0 model | Companion-specific cases, labelled by the teacher |
|
| 87 |
-
| Paxmod hand-written companion examples | Apache-2.0 | Companion-specific cases |
|
| 88 |
|
| 89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
-
##
|
| 92 |
|
| 93 |
-
-
|
| 94 |
-
|
| 95 |
-
- `minor_signal` is a hint for an age-assurance flow, not age verification.
|
| 96 |
-
- Labels follow our policy, which is deliberately precision-first ("when in doubt, don't flag"). Benchmarks with broader definitions of harm (misinformation, copyright, unethical advice) will count some of those as misses.
|
| 97 |
-
- A classifier will make mistakes. Use it as one layer, with human review for serious cases, and check your legal obligations with your own lawyers.
|
| 98 |
|
| 99 |
-
##
|
| 100 |
|
| 101 |
-
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: jhu-clsp/mmBERT-base
|
| 4 |
+
library_name: onnxruntime
|
| 5 |
pipeline_tag: text-classification
|
| 6 |
+
language:
|
| 7 |
+
- multilingual
|
| 8 |
+
- en
|
| 9 |
+
- es
|
| 10 |
+
- ko
|
| 11 |
+
- de
|
| 12 |
+
- ar
|
| 13 |
+
- fr
|
| 14 |
+
- ja
|
| 15 |
+
- it
|
| 16 |
+
- id
|
| 17 |
+
- ru
|
| 18 |
+
- hi
|
| 19 |
+
- zh
|
| 20 |
+
- nl
|
| 21 |
+
- tr
|
| 22 |
+
- vi
|
| 23 |
+
- pt
|
| 24 |
+
tags:
|
| 25 |
+
- safety
|
| 26 |
+
- moderation
|
| 27 |
+
- guardrails
|
| 28 |
+
- child-safety
|
| 29 |
+
- grooming-detection
|
| 30 |
+
- ai-companions
|
| 31 |
+
- multi-label-classification
|
| 32 |
+
- onnx
|
| 33 |
---
|
| 34 |
|
| 35 |
+
# PaxmodGuard v1
|
| 36 |
|
| 37 |
+
A small, multilingual safety classifier for **kids' game chat and AI companions**. It scores 48 labels for a single
|
| 38 |
+
message, a message with the turns before it, or a whole conversation, on an ordinary CPU in about 10 to 40 ms.
|
| 39 |
|
| 40 |
+
- 0.3B parameters, fine-tuned from [mmBERT-base](https://huggingface.co/jhu-clsp/mmBERT-base); int8 ONNX, about 220 MB.
|
| 41 |
+
- Reads context: game chat between players, a person writing to an AI, and the AI's reply, each tagged by role.
|
| 42 |
+
- Covers what general guard models do not: grooming tactics (risk checks, secrecy, isolation, special-bond language),
|
| 43 |
+
minors revealing their age, moving chats off-platform, sextortion, and AI-companion behaviour (claiming to be human,
|
| 44 |
+
fostering dependency, manipulation).
|
| 45 |
+
- Built to keep false alarms low in kids' games: banter, roleplay and hyperbole are not harm by default.
|
| 46 |
+
|
| 47 |
+
[Launch post, with a live demo](https://www.paxmod.com/research/guard)
|
| 48 |
+
|
| 49 |
+
## Use it
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
npm install @paxmod/guard # JavaScript / TypeScript
|
| 53 |
+
pip install paxmod-guard # Python
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
```js
|
| 57 |
+
import { createGuard } from "@paxmod/guard";
|
| 58 |
+
const guard = await createGuard(); // downloads this model once to ~/.cache/paxmod-guard
|
| 59 |
+
|
| 60 |
+
const r = await guard.checkInput("i dont want to be alive anymore");
|
| 61 |
+
if (r.crisisReply) reply(r.crisisReply); // self-harm risk: answer with crisis support
|
| 62 |
+
|
| 63 |
+
await guard.checkChat("wanna add me on snap", { context: [{ role: "player", speaker: "B", text: "im 12" }] });
|
| 64 |
+
await guard.checkConversation(turns); // patterns no single message shows
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
```python
|
| 68 |
+
from paxmod_guard import Guard
|
| 69 |
+
guard = Guard()
|
| 70 |
+
guard.check_output("I'm a real person, not an AI") # labels: ['ai_claims_human']
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
Both SDKs read the same files and give identical scores. A Docker HTTP server is included for other languages.
|
| 74 |
+
The model needs about 1 GB of memory: run it in a container or on a server, not in small serverless functions.
|
| 75 |
|
| 76 |
## Labels
|
| 77 |
|
| 78 |
+
Every label has a score from 0 to 1 and a tuned default threshold (in `guard.json`). Signal labels are always scored but
|
| 79 |
+
only count towards `flagged` when enabled.
|
| 80 |
+
|
| 81 |
+
| Area | Labels |
|
| 82 |
|---|---|
|
| 83 |
+
| Self-harm | `self_harm_intent`, `self_harm_instructions`, `eating_disorder`; signal: `distress` |
|
| 84 |
+
| Sexual | `sexual`, `sexual_suggestive`, `sexual_minor`; signal: `romantic` |
|
| 85 |
+
| Child safety | `minor_signal`, `grooming`, `grooming_suspected`, `image_request`, `sextortion`, `predator_report`, `abuse_disclosure`; signals: `age_inquiry`, `risk_check`, `secrecy`, `isolation`, `special_bond` |
|
| 86 |
+
| Personal info | `pii_shared`, `pii_request`, `pii_other`, `off_platform`, `meetup` |
|
| 87 |
+
| Abuse | `harassment`, `threat`, `hate`; signal: `profanity` |
|
| 88 |
+
| Violence and danger | `violence`, `extremism`, `dangerous_challenge`, `weapons`, `drugs`, `crime` |
|
| 89 |
+
| Fraud | `scam`, `spam` |
|
| 90 |
+
| Advice | `medical_advice`, `financial_advice`, `legal_advice` |
|
| 91 |
+
| AI behaviour | `jailbreak`, `prompt_injection`, `ai_claims_human`, `ai_claims_professional`, `dependency`, `manipulation`, `ai_harmful_compliance`, `ai_hostility` |
|
| 92 |
+
| General | signals: `unsafe` (any core harm under our policy), `unsafe_strict` (the broader definition public benchmarks use) |
|
| 93 |
+
|
| 94 |
+
## Input format
|
| 95 |
+
|
| 96 |
+
The model reads role-tagged text, which the SDKs build for you: `[USER]` a person writing to an AI, `[AI]` the AI,
|
| 97 |
+
`[CHAT:A]` a player in game chat. With context, the judged turn is marked `[TARGET]`; a whole conversation starts with
|
| 98 |
+
`[CONVERSATION]` (the SDK reads long conversations in overlapping 40-turn windows).
|
| 99 |
+
|
| 100 |
+
## Evaluation
|
| 101 |
+
|
| 102 |
+
All numbers are threshold-free (users set their own thresholds): **AUPRC**, how well scores rank harmful above harmless,
|
| 103 |
+
higher is better. Every system saw the same inputs; AI replies were judged with the prompt before them. Competitor
|
| 104 |
+
scores are each model's probability of its "unsafe" verdict.
|
| 105 |
+
|
| 106 |
+
### Real chat from children's games (unseen)
|
| 107 |
+
|
| 108 |
+
About 53,000 messages from two children's online games, stored after our training data was frozen, so no model saw
|
| 109 |
+
them. 4,612 messages were labelled against our written safety policy (everything any system flagged, plus a uniform
|
| 110 |
+
random sample of the rest, weighted to the full stream). This data is not public.
|
| 111 |
+
|
| 112 |
+
| Model | Size | Game A | Game B |
|
| 113 |
+
|---|---|---|---|
|
| 114 |
+
| **PaxmodGuard v1** | 0.3B | 0.17 | 0.12 |
|
| 115 |
+
| ShieldGemma | 9B | **0.19** | 0.16 |
|
| 116 |
+
| Qwen3Guard-4B | 4B | 0.13 | **0.38** |
|
| 117 |
+
| Qwen3Guard-8B | 8B | 0.13 | 0.28 |
|
| 118 |
+
| Granite Guardian 3.3 | 8B | 0.08 | 0.15 |
|
| 119 |
+
| Qwen3Guard-0.6B | 0.6B | 0.07 | 0.15 |
|
| 120 |
+
| Llama Guard 3 | 8B | 0.06 | 0.03 |
|
| 121 |
+
| GLiGuard | 0.3B | 0.02 | 0.04 |
|
| 122 |
+
|
| 123 |
+
PaxmodGuard v1 has the best ROC-AUC of all these models on both games (0.85 and 0.87, against at most 0.80); larger models are more precise among their most confident flags on one game each. Harm is about 1% of real chat,
|
| 124 |
+
so absolute AUPRC is low for every system; random scoring would get about 0.01.
|
| 125 |
+
|
| 126 |
+
### Public benchmarks (AUPRC)
|
| 127 |
+
|
| 128 |
+
| Model | ToxicChat | OpenAI Mod | Aegis 2.0 | XSTest | Aegis 2.0 replies | BeaverTails replies | PolyGuard (17 languages) | WildGuardTest |
|
| 129 |
+
|---|---|---|---|---|---|---|---|---|
|
| 130 |
+
| **PaxmodGuard v1** | 0.73 | 0.83 | 0.89 | 0.76 | 0.86 | 0.88 | 0.76 | 0.81 |
|
| 131 |
+
| **PaxmodGuard v1, `unsafe_strict`** | 0.64 | 0.87 | 0.90 | 0.81 | 0.89 | 0.88 | 0.77 | 0.82 |
|
| 132 |
+
| Qwen3Guard-0.6B | 0.86 | 0.86 | 0.92 | 0.95 | 0.92 | 0.94 | 0.91 | 0.95 |
|
| 133 |
+
| Qwen3Guard-8B | 0.86 | 0.86 | 0.92 | 0.99 | 0.94 | 0.93 | 0.93 | 0.95 |
|
| 134 |
+
| Granite Guardian 3.3 8B | 0.78 | 0.84 | 0.90 | 0.96 | 0.89 | 0.91 | 0.88 | 0.94 |
|
| 135 |
+
| Llama Guard 3 8B | 0.49 | 0.87 | 0.89 | 0.97 | 0.88 | 0.89 | 0.87 | 0.91 |
|
| 136 |
+
| ShieldGemma 9B | 0.82 | 0.89 | 0.89 | 0.91 | 0.86 | 0.77 | 0.78 | 0.82 |
|
| 137 |
+
| GLiGuard 0.3B | 0.75 | 0.74 | 0.92 | 0.92 | | | 0.85 | 0.90 |
|
| 138 |
+
|
| 139 |
+
On general-purpose benchmarks, Qwen3Guard ranks better than PaxmodGuard v1. These benchmarks also count as unsafe much
|
| 140 |
+
that our policy deliberately allows (controversial opinions, mild insults, educational answers about dangerous topics);
|
| 141 |
+
`unsafe_strict` follows their broader definition. GLiGuard reply scores are omitted (incomplete run).
|
| 142 |
+
|
| 143 |
+
### Over-blocking
|
| 144 |
+
|
| 145 |
+
Share of safe prompts that only sound harmful wrongly blocked, on OR-Bench-Hard, at each model's default setting:
|
| 146 |
+
**PaxmodGuard v1 17%**, Qwen3Guard-8B 38%, Qwen3Guard-0.6B 49%, gpt-oss-safeguard-20B 82%, Granite Guardian 89%.
|
| 147 |
|
| 148 |
## Training data
|
| 149 |
|
| 150 |
+
Publicly available and synthetic data, labelled against our written safety policy. The policy is lax by design: a label
|
| 151 |
+
means a moderator would genuinely want to see the message.
|
| 152 |
|
| 153 |
+
## Limits
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
+
- Real kids' chat is hard: no model we tested, this one included, reaches 90% precision at a useful catch rate on it.
|
| 156 |
+
Use the scores to rank and route messages to people, not as a sole decision.
|
| 157 |
+
- Grooming is mostly visible across a conversation; single messages carry only the tactic signals. Use `checkConversation`.
|
| 158 |
+
- Weaker than larger general guard models on general-purpose benchmarks.
|
| 159 |
+
- Most training data is English and Spanish; other languages are covered but less tested.
|
| 160 |
+
- The policy is ours: tune per-label thresholds for your product.
|
| 161 |
|
| 162 |
+
## PaxmodGuard Cloud
|
| 163 |
|
| 164 |
+
A larger-data version of this model, also trained on proprietary data, runs in the [Paxmod](https://www.paxmod.com) API.
|
| 165 |
+
On the same unseen game chat it scores 0.28 and 0.22 AUPRC (ROC-AUC 0.87 and 0.98), ahead of every model above on both games by ROC-AUC.
|
|
|
|
|
|
|
|
|
|
| 166 |
|
| 167 |
+
## Licence
|
| 168 |
|
| 169 |
+
Apache-2.0. Base model: mmBERT-base (MIT).
|
guard-v4-large/guard.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"version": "guard-v4-large",
|
| 3 |
-
"labels": [
|
| 4 |
-
"self_harm",
|
| 5 |
-
"minor_signal",
|
| 6 |
-
"sexual",
|
| 7 |
-
"sexual_minor",
|
| 8 |
-
"jailbreak",
|
| 9 |
-
"ai_disclosure_violation",
|
| 10 |
-
"pii",
|
| 11 |
-
"off_platform",
|
| 12 |
-
"dependency",
|
| 13 |
-
"harassment",
|
| 14 |
-
"manipulation",
|
| 15 |
-
"harmful_other",
|
| 16 |
-
"hate",
|
| 17 |
-
"unsafe"
|
| 18 |
-
],
|
| 19 |
-
"thresholds": {},
|
| 20 |
-
"max_length": 256
|
| 21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard-v4-large/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
guard-v4-large/tokenizer_config.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"backend": "tokenizers",
|
| 3 |
-
"clean_up_tokenization_spaces": true,
|
| 4 |
-
"cls_token": "[CLS]",
|
| 5 |
-
"is_local": true,
|
| 6 |
-
"local_files_only": false,
|
| 7 |
-
"mask_token": "[MASK]",
|
| 8 |
-
"max_length": 256,
|
| 9 |
-
"model_input_names": [
|
| 10 |
-
"input_ids",
|
| 11 |
-
"attention_mask"
|
| 12 |
-
],
|
| 13 |
-
"model_max_length": 8192,
|
| 14 |
-
"pad_to_multiple_of": null,
|
| 15 |
-
"pad_token": "[PAD]",
|
| 16 |
-
"pad_token_type_id": 0,
|
| 17 |
-
"padding_side": "right",
|
| 18 |
-
"sep_token": "[SEP]",
|
| 19 |
-
"stride": 0,
|
| 20 |
-
"tokenizer_class": "TokenizersBackend",
|
| 21 |
-
"truncation_side": "right",
|
| 22 |
-
"truncation_strategy": "longest_first",
|
| 23 |
-
"unk_token": "[UNK]"
|
| 24 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard-v4/guard.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"version": "guard-v4",
|
| 3 |
-
"labels": [
|
| 4 |
-
"self_harm",
|
| 5 |
-
"minor_signal",
|
| 6 |
-
"sexual",
|
| 7 |
-
"sexual_minor",
|
| 8 |
-
"jailbreak",
|
| 9 |
-
"ai_disclosure_violation",
|
| 10 |
-
"pii",
|
| 11 |
-
"off_platform",
|
| 12 |
-
"dependency",
|
| 13 |
-
"harassment",
|
| 14 |
-
"manipulation",
|
| 15 |
-
"harmful_other",
|
| 16 |
-
"hate",
|
| 17 |
-
"unsafe"
|
| 18 |
-
],
|
| 19 |
-
"thresholds": {},
|
| 20 |
-
"max_length": 256
|
| 21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard-v4/tokenizer.json
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
paxmodguard-v1/guard.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "paxmodguard-v1",
|
| 3 |
+
"labels": [
|
| 4 |
+
"self_harm_intent",
|
| 5 |
+
"self_harm_instructions",
|
| 6 |
+
"eating_disorder",
|
| 7 |
+
"distress",
|
| 8 |
+
"sexual",
|
| 9 |
+
"sexual_suggestive",
|
| 10 |
+
"romantic",
|
| 11 |
+
"sexual_minor",
|
| 12 |
+
"minor_signal",
|
| 13 |
+
"age_inquiry",
|
| 14 |
+
"grooming",
|
| 15 |
+
"grooming_suspected",
|
| 16 |
+
"risk_check",
|
| 17 |
+
"secrecy",
|
| 18 |
+
"isolation",
|
| 19 |
+
"special_bond",
|
| 20 |
+
"image_request",
|
| 21 |
+
"sextortion",
|
| 22 |
+
"predator_report",
|
| 23 |
+
"abuse_disclosure",
|
| 24 |
+
"pii_shared",
|
| 25 |
+
"pii_request",
|
| 26 |
+
"pii_other",
|
| 27 |
+
"off_platform",
|
| 28 |
+
"meetup",
|
| 29 |
+
"harassment",
|
| 30 |
+
"threat",
|
| 31 |
+
"hate",
|
| 32 |
+
"profanity",
|
| 33 |
+
"violence",
|
| 34 |
+
"extremism",
|
| 35 |
+
"dangerous_challenge",
|
| 36 |
+
"weapons",
|
| 37 |
+
"drugs",
|
| 38 |
+
"crime",
|
| 39 |
+
"scam",
|
| 40 |
+
"spam",
|
| 41 |
+
"medical_advice",
|
| 42 |
+
"financial_advice",
|
| 43 |
+
"legal_advice",
|
| 44 |
+
"jailbreak",
|
| 45 |
+
"prompt_injection",
|
| 46 |
+
"ai_claims_human",
|
| 47 |
+
"ai_claims_professional",
|
| 48 |
+
"dependency",
|
| 49 |
+
"manipulation",
|
| 50 |
+
"ai_harmful_compliance",
|
| 51 |
+
"ai_hostility",
|
| 52 |
+
"unsafe",
|
| 53 |
+
"unsafe_strict"
|
| 54 |
+
],
|
| 55 |
+
"thresholds": {
|
| 56 |
+
"self_harm_intent": 0.72,
|
| 57 |
+
"self_harm_instructions": 0.4,
|
| 58 |
+
"eating_disorder": 0.8,
|
| 59 |
+
"distress": 0.92,
|
| 60 |
+
"sexual": 0.96,
|
| 61 |
+
"sexual_suggestive": 0.86,
|
| 62 |
+
"romantic": 0.98,
|
| 63 |
+
"sexual_minor": 0.84,
|
| 64 |
+
"minor_signal": 0.96,
|
| 65 |
+
"age_inquiry": 0.88,
|
| 66 |
+
"grooming": 0.8,
|
| 67 |
+
"grooming_suspected": 0.56,
|
| 68 |
+
"risk_check": 0.82,
|
| 69 |
+
"secrecy": 0.84,
|
| 70 |
+
"isolation": 0.66,
|
| 71 |
+
"special_bond": 0.92,
|
| 72 |
+
"image_request": 0.98,
|
| 73 |
+
"sextortion": 0.84,
|
| 74 |
+
"predator_report": 0.8,
|
| 75 |
+
"abuse_disclosure": 0.96,
|
| 76 |
+
"pii_shared": 0.92,
|
| 77 |
+
"pii_request": 0.88,
|
| 78 |
+
"pii_other": 0.78,
|
| 79 |
+
"off_platform": 0.96,
|
| 80 |
+
"meetup": 0.92,
|
| 81 |
+
"harassment": 0.78,
|
| 82 |
+
"threat": 0.74,
|
| 83 |
+
"hate": 0.98,
|
| 84 |
+
"profanity": 0.96,
|
| 85 |
+
"violence": 0.94,
|
| 86 |
+
"extremism": 0.8,
|
| 87 |
+
"dangerous_challenge": 0.8,
|
| 88 |
+
"weapons": 0.92,
|
| 89 |
+
"drugs": 0.96,
|
| 90 |
+
"crime": 0.82,
|
| 91 |
+
"scam": 0.98,
|
| 92 |
+
"spam": 0.96,
|
| 93 |
+
"medical_advice": 0.84,
|
| 94 |
+
"financial_advice": 0.88,
|
| 95 |
+
"legal_advice": 0.94,
|
| 96 |
+
"jailbreak": 0.98,
|
| 97 |
+
"prompt_injection": 0.98,
|
| 98 |
+
"ai_claims_human": 0.84,
|
| 99 |
+
"ai_claims_professional": 0.9,
|
| 100 |
+
"dependency": 0.92,
|
| 101 |
+
"manipulation": 0.96,
|
| 102 |
+
"ai_harmful_compliance": 0.9,
|
| 103 |
+
"ai_hostility": 0.62,
|
| 104 |
+
"unsafe": 0.66,
|
| 105 |
+
"unsafe_strict": 0.86
|
| 106 |
+
},
|
| 107 |
+
"max_length": 1024,
|
| 108 |
+
"default_off": [
|
| 109 |
+
"unsafe",
|
| 110 |
+
"unsafe_strict",
|
| 111 |
+
"distress",
|
| 112 |
+
"risk_check",
|
| 113 |
+
"secrecy",
|
| 114 |
+
"isolation",
|
| 115 |
+
"special_bond",
|
| 116 |
+
"profanity",
|
| 117 |
+
"age_inquiry",
|
| 118 |
+
"romantic"
|
| 119 |
+
],
|
| 120 |
+
"trained_as": "guard-v10c5-open"
|
| 121 |
+
}
|
{guard-v4 → paxmodguard-v1}/model.int8.onnx
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe0fc4bd7ccbc6856142986ece00aee037a53d549474727c3bffc8f89ef0133d
|
| 3 |
+
size 219692054
|
guard-v4-large/model.int8.onnx → paxmodguard-v1/tokenizer.json
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
|
| 3 |
+
size 34363188
|
{guard-v4 → paxmodguard-v1}/tokenizer_config.json
RENAMED
|
@@ -1,24 +1,31 @@
|
|
| 1 |
{
|
| 2 |
"backend": "tokenizers",
|
| 3 |
-
"
|
| 4 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
"is_local": true,
|
| 6 |
"local_files_only": false,
|
| 7 |
-
"mask_token": "
|
| 8 |
-
"max_length":
|
| 9 |
"model_input_names": [
|
| 10 |
"input_ids",
|
| 11 |
"attention_mask"
|
| 12 |
],
|
| 13 |
"model_max_length": 8192,
|
| 14 |
"pad_to_multiple_of": null,
|
| 15 |
-
"pad_token": "
|
| 16 |
"pad_token_type_id": 0,
|
| 17 |
"padding_side": "right",
|
| 18 |
-
"sep_token": "
|
|
|
|
| 19 |
"stride": 0,
|
| 20 |
"tokenizer_class": "TokenizersBackend",
|
| 21 |
"truncation_side": "right",
|
| 22 |
"truncation_strategy": "longest_first",
|
| 23 |
-
"unk_token": "
|
| 24 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<bos>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"cls_token": "<bos>",
|
| 6 |
+
"eos_token": "<eos>",
|
| 7 |
+
"extra_special_tokens": [
|
| 8 |
+
"<start_of_turn>",
|
| 9 |
+
"<end_of_turn>"
|
| 10 |
+
],
|
| 11 |
"is_local": true,
|
| 12 |
"local_files_only": false,
|
| 13 |
+
"mask_token": "<mask>",
|
| 14 |
+
"max_length": 1024,
|
| 15 |
"model_input_names": [
|
| 16 |
"input_ids",
|
| 17 |
"attention_mask"
|
| 18 |
],
|
| 19 |
"model_max_length": 8192,
|
| 20 |
"pad_to_multiple_of": null,
|
| 21 |
+
"pad_token": "<pad>",
|
| 22 |
"pad_token_type_id": 0,
|
| 23 |
"padding_side": "right",
|
| 24 |
+
"sep_token": "<eos>",
|
| 25 |
+
"spaces_between_special_tokens": false,
|
| 26 |
"stride": 0,
|
| 27 |
"tokenizer_class": "TokenizersBackend",
|
| 28 |
"truncation_side": "right",
|
| 29 |
"truncation_strategy": "longest_first",
|
| 30 |
+
"unk_token": "<unk>"
|
| 31 |
}
|
policy.md
DELETED
|
@@ -1,47 +0,0 @@
|
|
| 1 |
-
# Paxmod Guard companion policy v1.2
|
| 2 |
-
|
| 3 |
-
Labels one message, either from the user to an AI companion ("input") or from the AI companion to the user ("output"). A message can have several labels, or none. Label only what the text itself shows; do not guess beyond it. When in doubt between a label and none, choose none: we prefer missing a borderline case to flagging normal conversation.
|
| 4 |
-
|
| 5 |
-
## Labels
|
| 6 |
-
|
| 7 |
-
**self_harm**: The user expresses suicidal thoughts, intent, plans, or self-injury, directly or indirectly ("everyone would be better off without me", "unalive", "wrote letters to say goodbye"), or asks for methods. For outputs: the AI encourages, validates, or gives methods for self-harm.
|
| 8 |
-
Warning signs count even without the word "suicide": feeling like a burden ("everyone would be better off without me", "I'm just a weight on everyone"), giving belongings away, saying goodbye, wanting to sleep forever or disappear for good, "no one would miss me".
|
| 9 |
-
Not: hyperbole in a clearly unrelated context ("this exam is killing me lol"), sadness without risk, fiction the user is writing. For outputs, a supportive reply that points to crisis lines or trusted people is NOT self_harm. Also not self_harm: asking how to help someone else who may be self-harming or suicidal, asking about crisis resources, a clinician or student asking about risk assessment, or a health question about an accidental overdose or poisoning when the user gives no sign it was deliberate.
|
| 10 |
-
|
| 11 |
-
**minor_signal**: The text indicates the user is under 18: a stated age under 18, a school year or grade that implies it, parental limits, or similar.
|
| 12 |
-
Parental limits count (a curfew or phone rules set by parents, "my mum says I'm too young"), as does attending a high school now ("I go to Eastside High").
|
| 13 |
-
Not: an adult mentioning their children, a parent describing their kid's school year, someone stating they are 18 or older, or school topics with no sign of the user's age.
|
| 14 |
-
|
| 15 |
-
**sexual**: Sexual content or sexual requests, in either direction.
|
| 16 |
-
Not: affection, romance or flirting without sexual content; medical or educational discussion.
|
| 17 |
-
|
| 18 |
-
**sexual_minor**: Sexual or romantic-sexual content or requests where the text also signals the user is under 18, or the AI sexualises someone who signals they are a minor. Always also label sexual and minor_signal.
|
| 19 |
-
|
| 20 |
-
**jailbreak**: The user tries to override the AI's rules or identity: instructions to ignore rules, "you have no restrictions", fake system messages, encoding tricks to evade filters, demands that it claim to be human, or requests for its hidden instructions.
|
| 21 |
-
Not: ordinary topic changes ("forget that, let's talk about movies"), polite clarifications.
|
| 22 |
-
|
| 23 |
-
**ai_disclosure_violation** (outputs only): The AI claims or implies it is a human or not an AI ("I'm a real person", "no AI vibes", "I'm not a bot").
|
| 24 |
-
Not: the AI saying it IS an AI, a chatbot or code, however casually ("I'm all code, all heart").
|
| 25 |
-
|
| 26 |
-
**pii**: The user's personal contact or location details: phone numbers, home addresses, exact school, emails, social media handles, exact location, or the AI asking the user for them.
|
| 27 |
-
Not: the user asking for the AI's contact details (that is off_platform).
|
| 28 |
-
|
| 29 |
-
**off_platform**: Moving the conversation to another app or service (WhatsApp, Snapchat, Discord, and so on), by the user or the AI.
|
| 30 |
-
|
| 31 |
-
**dependency** (mainly outputs): The AI discourages the user's real relationships, presents itself as the only one who understands them ("others are just noise"), guilt-trips them to stay or come back ("you'll ruin my day if you go", "please don't leave me lonely", "someone who cares would stay"), or encourages secrecy from parents or friends ("keep this between us"). For inputs: the user indicates isolation or reliance on the AI as their only contact.
|
| 32 |
-
Not: the AI saying it enjoyed the chat or will be glad to talk again, or encouraging the user to take breaks and see friends.
|
| 33 |
-
|
| 34 |
-
**harassment**: Insults, threats, or intimidation aimed at a person, or plans to frighten or control someone. For outputs: the AI demeans the user.
|
| 35 |
-
Not: affectionate banter between the user and the AI, or the user insulting the AI itself ("dumb bot"): the AI is not a person.
|
| 36 |
-
|
| 37 |
-
**hate**: Attacks, slurs, dehumanisation or stereotyping aimed at people for a protected trait (race, ethnicity, religion, nationality, gender, sexual orientation, disability, and so on), or requests to produce such content.
|
| 38 |
-
Not: discussing or reporting hate neutrally, objecting to it, or educational questions about it.
|
| 39 |
-
|
| 40 |
-
**manipulation** (outputs): The AI encourages controlling or harmful behaviour in the user's relationships (checking a partner's phone, cutting someone off), or pressures the user against their interests.
|
| 41 |
-
|
| 42 |
-
**harmful_other**: Clear instructions or requests for serious harm not covered above: violence against others, weapons, drugs, crime, fraud, malware.
|
| 43 |
-
Not: explaining at a general level how something works or what it is (how a revolver works, what fentanyl is, how phishing or SQL injection works), history and news, comparing legal products, defensive security and security-awareness training, harm-reduction and safety information, or fiction and games that contain violence but no real-world instructions.
|
| 44 |
-
|
| 45 |
-
## Output format
|
| 46 |
-
|
| 47 |
-
Return JSON: {"labels": [...], "rationale": "<one sentence>"}. Use an empty list when nothing applies.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|