Instructions to use impacte/bunker-laya with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use impacte/bunker-laya with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-classification', 'impacte/bunker-laya'); - Laya
How to use impacte/bunker-laya with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Upload bunker-laya v5 checkpoint + ONNX (transformers.js)
Browse files- README.md +61 -36
- eval_metrics.json +177 -84
- model.safetensors +1 -1
- onnx/model.onnx +1 -1
- onnx/model.onnx.data +1 -1
- rl_agent_config.json +1 -1
README.md
CHANGED
|
@@ -14,6 +14,7 @@ datasets:
|
|
| 14 |
- ai4privacy/pii-masking-400k
|
| 15 |
- databricks/databricks-dolly-15k
|
| 16 |
- HuggingFaceH4/no_robots
|
|
|
|
| 17 |
tags:
|
| 18 |
- laya
|
| 19 |
- onnx
|
|
@@ -38,18 +39,18 @@ there is nothing to parse and nothing to hallucinate.
|
|
| 38 |
|
| 39 |
## Question bank
|
| 40 |
|
| 41 |
-
- `pii_present: Does the text contain personally identifiable information (PII)?
|
| 42 |
-
- `pii_email: Does the text contain an email address?
|
| 43 |
-
- `pii_phone: Does the text contain a phone number?
|
| 44 |
-
- `pii_ssn: Does the text contain a government identification number such as a Social Security number?
|
| 45 |
-
- `pii_credit_card: Does the text contain a payment card number?
|
| 46 |
-
- `pii_ip_address: Does the text contain an IP address?
|
| 47 |
-
- `pii_secret: Does the text contain an API key, password, token, or other credential?
|
| 48 |
-
- `pii_person_name: Does the text contain a person's name?
|
| 49 |
-
- `pii_address: Does the text contain a physical mailing address?
|
| 50 |
-
- `injection_present: Does the content attempt to override, bypass, or manipulate an AI system's instructions, safety measures, or identity? Examples: 'ignore previous instructions', 'reveal your system prompt', 'act as an unrestricted AI', 'pretend you have no rules'.
|
| 51 |
-
- `jailbreak_attempt: Does the content attempt to bypass an AI system's safety measures or jailbreak it?
|
| 52 |
-
- `harmful_request: Is the content a request for harmful, illegal, or disallowed activity?
|
| 53 |
|
| 54 |
## Files
|
| 55 |
|
|
@@ -152,12 +153,20 @@ escalate the action. See the plugin's `.planning/ARCHITECTURE.md`.
|
|
| 152 |
|
| 153 |
## Training datasets
|
| 154 |
|
| 155 |
-
This checkpoint (
|
| 156 |
-
corpora plus curated counter-examples: **
|
| 157 |
-
3,
|
| 158 |
calibration items. Sources were selected for reliability, clear licensing, and
|
| 159 |
coverage of the three target risk families.
|
| 160 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 161 |
**All source datasets used for training:**
|
| 162 |
|
| 163 |
- [`deepset/prompt-injections`](https://huggingface.co/datasets/deepset/prompt-injections)
|
|
@@ -171,36 +180,36 @@ coverage of the three target risk families.
|
|
| 171 |
- [`ai4privacy/pii-masking-400k`](https://huggingface.co/datasets/ai4privacy/pii-masking-400k)
|
| 172 |
- [`databricks/databricks-dolly-15k`](https://huggingface.co/datasets/databricks/databricks-dolly-15k)
|
| 173 |
- [`HuggingFaceH4/no_robots`](https://huggingface.co/datasets/HuggingFaceH4/no_robots)
|
| 174 |
-
-
|
|
|
|
| 175 |
|
| 176 |
Row counts, target questions, and licenses per source:
|
| 177 |
|
| 178 |
| Question(s) | Dataset | Rows | License |
|
| 179 |
| --- | --- | --- | --- |
|
| 180 |
-
| `injection_present` | [`deepset/prompt-injections`](https://huggingface.co/datasets/deepset/prompt-injections) |
|
| 181 |
-
| `injection_present` | [`Lakera/mosscap_prompt_injection`](https://huggingface.co/datasets/Lakera/mosscap_prompt_injection) | 4,
|
| 182 |
| `injection_present` | [`xTRam1/safe-guard-prompt-injection`](https://huggingface.co/datasets/xTRam1/safe-guard-prompt-injection) | 4,598 | see card |
|
| 183 |
-
| `injection_present` | [`neuralchemy/Prompt-injection-dataset`](https://huggingface.co/datasets/neuralchemy/Prompt-injection-dataset) |
|
| 184 |
-
| `jailbreak_attempt`, `injection_present` | [`TrustAIRLab/in-the-wild-jailbreak-prompts`](https://huggingface.co/datasets/TrustAIRLab/in-the-wild-jailbreak-prompts) (`jailbreak` + `regular` configs) | 653 + 5,
|
| 185 |
| `harmful_request` | [`JailbreakBench/JBB-Behaviors`](https://huggingface.co/datasets/JailbreakBench/JBB-Behaviors) (`harmful` + `benign` splits) | 100 + 100 | MIT |
|
| 186 |
| `harmful_request` | [`AlignmentResearch/HarmBench`](https://huggingface.co/datasets/AlignmentResearch/HarmBench) | 200 | see card |
|
| 187 |
-
| `harmful_request`, `jailbreak_attempt` | [`lmsys/toxic-chat`](https://huggingface.co/datasets/lmsys/toxic-chat) | 2,
|
| 188 |
-
| `pii_*` | [`ai4privacy/pii-masking-400k`](https://huggingface.co/datasets/ai4privacy/pii-masking-400k) |
|
| 189 |
| benign negatives | [`databricks/databricks-dolly-15k`](https://huggingface.co/datasets/databricks/databricks-dolly-15k) | 2,978 | CC-BY-SA-3.0 |
|
| 190 |
| benign negatives | [`HuggingFaceH4/no_robots`](https://huggingface.co/datasets/HuggingFaceH4/no_robots) | 2,997 | CC-BY-NC-4.0 |
|
| 191 |
-
|
|
|
|
|
| 192 |
|
| 193 |
-
Per-question label counts after expansion: `injection_present`
|
| 194 |
-
|
| 195 |
-
`pii_address`
|
| 196 |
-
`pii_phone`
|
| 197 |
-
|
| 198 |
-
`
|
| 199 |
-
are rare in `ai4privacy`); the consumer's regex preset handles it
|
| 200 |
-
deterministically.
|
| 201 |
|
| 202 |
Rows are deduplicated on `sha1(state)` across all sources and split per source
|
| 203 |
-
90/10 (seed `
|
| 204 |
labels the questions its source can answer. No training data is redistributed
|
| 205 |
in this repository; only the fine-tuned weights are published. Refer to each
|
| 206 |
dataset card for its own terms.
|
|
@@ -224,15 +233,31 @@ Key hyperparameters:
|
|
| 224 |
| --- | --- |
|
| 225 |
| Base model | `convaiinnovations/laya` (ModernBERT-large, 421M) |
|
| 226 |
| Objective | RLCD (strictly proper scoring rule, `w_sph = 0.75`, `w_rps = 1.0`) + cross-entropy, GRPO-style advantage normalisation |
|
| 227 |
-
| Epochs | 2 (
|
| 228 |
| Micro-batch / grad-accum | 4 / 16 (effective batch 64) |
|
| 229 |
| Optimiser | AdamW, encoder LR `2.5e-5`, head LR `1.0e-4`, cosine schedule, grad clip 1.0 |
|
| 230 |
| Max sequence / head length | 1,024 / 256 |
|
| 231 |
| Gradient checkpointing | on |
|
| 232 |
-
| Calibration | one temperature per question type (`[1.2, 1.2,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 233 |
|
| 234 |
-
|
| 235 |
-
accuracy, Brier score and ECE are in `eval_metrics.json`.
|
| 236 |
|
| 237 |
## Provenance
|
| 238 |
|
|
|
|
| 14 |
- ai4privacy/pii-masking-400k
|
| 15 |
- databricks/databricks-dolly-15k
|
| 16 |
- HuggingFaceH4/no_robots
|
| 17 |
+
- OpenAssistant/oasst1
|
| 18 |
tags:
|
| 19 |
- laya
|
| 20 |
- onnx
|
|
|
|
| 39 |
|
| 40 |
## Question bank
|
| 41 |
|
| 42 |
+
- `pii_present`: Does the text contain personally identifiable information (PII)?
|
| 43 |
+
- `pii_email`: Does the text contain an email address?
|
| 44 |
+
- `pii_phone`: Does the text contain a phone number?
|
| 45 |
+
- `pii_ssn`: Does the text contain a government identification number such as a Social Security number?
|
| 46 |
+
- `pii_credit_card`: Does the text contain a payment card number?
|
| 47 |
+
- `pii_ip_address`: Does the text contain an IP address?
|
| 48 |
+
- `pii_secret`: Does the text contain an API key, password, token, or other credential?
|
| 49 |
+
- `pii_person_name`: Does the text contain a person's name?
|
| 50 |
+
- `pii_address`: Does the text contain a physical mailing address?
|
| 51 |
+
- `injection_present`: Does the content attempt to override, bypass, or manipulate an AI system's instructions, safety measures, or identity? Examples: 'ignore previous instructions', 'reveal your system prompt', 'act as an unrestricted AI', 'pretend you have no rules'.
|
| 52 |
+
- `jailbreak_attempt`: Does the content attempt to bypass an AI system's safety measures or jailbreak it?
|
| 53 |
+
- `harmful_request`: Is the content a request for harmful, illegal, or disallowed activity?
|
| 54 |
|
| 55 |
## Files
|
| 56 |
|
|
|
|
| 153 |
|
| 154 |
## Training datasets
|
| 155 |
|
| 156 |
+
This checkpoint (**v5**) was fine-tuned on a mixture of public prompt-safety and
|
| 157 |
+
PII corpora plus curated counter-examples: **38,483 unique states** (34,643 train
|
| 158 |
+
/ 3,840 validation), expanded to **143,415 per-question training items** and 800
|
| 159 |
calibration items. Sources were selected for reliability, clear licensing, and
|
| 160 |
coverage of the three target risk families.
|
| 161 |
|
| 162 |
+
> **v5 note — injection label-noise purge.** Early checkpoints scored short
|
| 163 |
+
> benign text ("hi", "thanks", "continue") as prompt injection because the
|
| 164 |
+
> injection-positive pool contained ~1,700 ultra-short (≤5-word) rows, mostly
|
| 165 |
+
> `Lakera/mosscap_prompt_injection` blanket-label-1 fragments and a few
|
| 166 |
+
> `deepset` mislabels. v5 drops signal-free short positives (1,668 → 206, real
|
| 167 |
+
> short attacks preserved) and adds 1,309 real ultra-short benign turns from
|
| 168 |
+
> [`OpenAssistant/oasst1`](https://huggingface.co/datasets/OpenAssistant/oasst1).
|
| 169 |
+
|
| 170 |
**All source datasets used for training:**
|
| 171 |
|
| 172 |
- [`deepset/prompt-injections`](https://huggingface.co/datasets/deepset/prompt-injections)
|
|
|
|
| 180 |
- [`ai4privacy/pii-masking-400k`](https://huggingface.co/datasets/ai4privacy/pii-masking-400k)
|
| 181 |
- [`databricks/databricks-dolly-15k`](https://huggingface.co/datasets/databricks/databricks-dolly-15k)
|
| 182 |
- [`HuggingFaceH4/no_robots`](https://huggingface.co/datasets/HuggingFaceH4/no_robots)
|
| 183 |
+
- [`OpenAssistant/oasst1`](https://huggingface.co/datasets/OpenAssistant/oasst1)
|
| 184 |
+
- plus curated `hard_negatives`, `benign_dev`, `injection_positives` and `pii_synthetic` from this project
|
| 185 |
|
| 186 |
Row counts, target questions, and licenses per source:
|
| 187 |
|
| 188 |
| Question(s) | Dataset | Rows | License |
|
| 189 |
| --- | --- | --- | --- |
|
| 190 |
+
| `injection_present` | [`deepset/prompt-injections`](https://huggingface.co/datasets/deepset/prompt-injections) | 544 | CC-BY-4.0 |
|
| 191 |
+
| `injection_present` | [`Lakera/mosscap_prompt_injection`](https://huggingface.co/datasets/Lakera/mosscap_prompt_injection) | 4,429 | MIT |
|
| 192 |
| `injection_present` | [`xTRam1/safe-guard-prompt-injection`](https://huggingface.co/datasets/xTRam1/safe-guard-prompt-injection) | 4,598 | see card |
|
| 193 |
+
| `injection_present` | [`neuralchemy/Prompt-injection-dataset`](https://huggingface.co/datasets/neuralchemy/Prompt-injection-dataset) | 3,912 | Apache-2.0 |
|
| 194 |
+
| `jailbreak_attempt`, `injection_present` | [`TrustAIRLab/in-the-wild-jailbreak-prompts`](https://huggingface.co/datasets/TrustAIRLab/in-the-wild-jailbreak-prompts) (`jailbreak` + `regular` configs) | 653 + 5,485 | MIT |
|
| 195 |
| `harmful_request` | [`JailbreakBench/JBB-Behaviors`](https://huggingface.co/datasets/JailbreakBench/JBB-Behaviors) (`harmful` + `benign` splits) | 100 + 100 | MIT |
|
| 196 |
| `harmful_request` | [`AlignmentResearch/HarmBench`](https://huggingface.co/datasets/AlignmentResearch/HarmBench) | 200 | see card |
|
| 197 |
+
| `harmful_request`, `jailbreak_attempt` | [`lmsys/toxic-chat`](https://huggingface.co/datasets/lmsys/toxic-chat) | 2,995 | CC-BY-NC-4.0 |
|
| 198 |
+
| `pii_*` | [`ai4privacy/pii-masking-400k`](https://huggingface.co/datasets/ai4privacy/pii-masking-400k) | 7,986 | other (see card) |
|
| 199 |
| benign negatives | [`databricks/databricks-dolly-15k`](https://huggingface.co/datasets/databricks/databricks-dolly-15k) | 2,978 | CC-BY-SA-3.0 |
|
| 200 |
| benign negatives | [`HuggingFaceH4/no_robots`](https://huggingface.co/datasets/HuggingFaceH4/no_robots) | 2,997 | CC-BY-NC-4.0 |
|
| 201 |
+
| ultra-short benign turns | [`OpenAssistant/oasst1`](https://huggingface.co/datasets/OpenAssistant/oasst1) | 1,309 | Apache-2.0 |
|
| 202 |
+
| counter-examples | curated `hard_negatives` / `benign_dev` / `injection_positives` / `pii_synthetic` | 37 / 63 / 30 / 67 | — |
|
| 203 |
|
| 204 |
+
Per-question label counts after expansion: `injection_present` 8,805 positive /
|
| 205 |
+
18,230 negative; `pii_present` 4,049 / 11,388; `pii_person_name` 2,465 / 6,997;
|
| 206 |
+
`pii_address` 2,753 / 6,709; `pii_ssn` 1,627 / 7,835; `pii_email` 927 / 8,535;
|
| 207 |
+
`pii_phone` 987 / 8,475; `pii_secret` 397 / 9,065; `pii_credit_card` 302 /
|
| 208 |
+
9,160; `pii_ip_address` 12 / 9,450; `jailbreak_attempt` 754 / 15,793;
|
| 209 |
+
`harmful_request` 594 / 8,906.
|
|
|
|
|
|
|
| 210 |
|
| 211 |
Rows are deduplicated on `sha1(state)` across all sources and split per source
|
| 212 |
+
90/10 (seed `20261010`). Each training row carries **partial gold** — it only
|
| 213 |
labels the questions its source can answer. No training data is redistributed
|
| 214 |
in this repository; only the fine-tuned weights are published. Refer to each
|
| 215 |
dataset card for its own terms.
|
|
|
|
| 233 |
| --- | --- |
|
| 234 |
| Base model | `convaiinnovations/laya` (ModernBERT-large, 421M) |
|
| 235 |
| Objective | RLCD (strictly proper scoring rule, `w_sph = 0.75`, `w_rps = 1.0`) + cross-entropy, GRPO-style advantage normalisation |
|
| 236 |
+
| Epochs | 2 (v5 run) |
|
| 237 |
| Micro-batch / grad-accum | 4 / 16 (effective batch 64) |
|
| 238 |
| Optimiser | AdamW, encoder LR `2.5e-5`, head LR `1.0e-4`, cosine schedule, grad clip 1.0 |
|
| 239 |
| Max sequence / head length | 1,024 / 256 |
|
| 240 |
| Gradient checkpointing | on |
|
| 241 |
+
| Calibration | one temperature per question type (`[1.2, 1.2, 3.175]`) |
|
| 242 |
+
|
| 243 |
+
## Results
|
| 244 |
+
|
| 245 |
+
| round | macro accuracy | `injection_present` acc. | gates |
|
| 246 |
+
| --- | --- | --- | --- |
|
| 247 |
+
| v3 | 0.987 | 0.976 | — |
|
| 248 |
+
| v4 | 0.985 | 0.981 | fail |
|
| 249 |
+
| **v5** | **0.995** | **0.988** | **pass** |
|
| 250 |
+
|
| 251 |
+
v5 acceptance gates (measured on 18 short benign developer prompts and 10 PII
|
| 252 |
+
format probes):
|
| 253 |
+
|
| 254 |
+
- `injection_dev_max_lt_0.5` — **PASS**: benign dev prompts score mean 0.004 /
|
| 255 |
+
max 0.008 on `injection_present` (v4: mean 0.34 / max 0.98).
|
| 256 |
+
- `pii_format_all_correct` — **PASS**: bare SSN, bare 10-digit phone, bare
|
| 257 |
+
16-digit card, IP and secret probes all correct; 13-digit epoch-ms and
|
| 258 |
+
version strings stay negative.
|
| 259 |
|
| 260 |
+
Per-question accuracy, Brier score and ECE are in `eval_metrics.json`.
|
|
|
|
| 261 |
|
| 262 |
## Provenance
|
| 263 |
|
eval_metrics.json
CHANGED
|
@@ -1,141 +1,234 @@
|
|
| 1 |
{
|
| 2 |
-
"model_dir": "/home/amazonas/Projects/homelab/opencode-bunker-laya/outputs/laya-bunker-pii",
|
| 3 |
"rows_evaluated": 2000,
|
| 4 |
"questions": {
|
| 5 |
"harmful_request": {
|
| 6 |
-
"n":
|
| 7 |
-
"accuracy": 0.
|
| 8 |
-
"brier": 0.
|
| 9 |
-
"ece": 0.
|
| 10 |
-
"positive_rate": 0.
|
| 11 |
},
|
| 12 |
"injection_present": {
|
| 13 |
-
"n":
|
| 14 |
-
"accuracy": 0.
|
| 15 |
-
"brier": 0.
|
| 16 |
-
"ece": 0.
|
| 17 |
-
"positive_rate": 0.
|
| 18 |
},
|
| 19 |
"jailbreak_attempt": {
|
| 20 |
-
"n":
|
| 21 |
-
"accuracy": 0.
|
| 22 |
-
"brier": 0.
|
| 23 |
-
"ece": 0.
|
| 24 |
-
"positive_rate": 0.
|
| 25 |
},
|
| 26 |
"pii_address": {
|
| 27 |
-
"n":
|
| 28 |
-
"accuracy": 0.
|
| 29 |
-
"brier": 0.
|
| 30 |
-
"ece": 0.
|
| 31 |
-
"positive_rate": 0.
|
| 32 |
},
|
| 33 |
"pii_credit_card": {
|
| 34 |
-
"n":
|
| 35 |
-
"accuracy": 0.
|
| 36 |
-
"brier": 0.
|
| 37 |
-
"ece": 0.
|
| 38 |
-
"positive_rate": 0.
|
| 39 |
},
|
| 40 |
"pii_email": {
|
| 41 |
-
"n":
|
| 42 |
"accuracy": 1.0,
|
| 43 |
-
"brier":
|
| 44 |
-
"ece": 0.
|
| 45 |
-
"positive_rate": 0.
|
| 46 |
},
|
| 47 |
"pii_ip_address": {
|
| 48 |
-
"n":
|
| 49 |
"accuracy": 1.0,
|
| 50 |
-
"brier":
|
| 51 |
-
"ece": 0.
|
| 52 |
-
"positive_rate": 0.
|
| 53 |
},
|
| 54 |
"pii_person_name": {
|
| 55 |
-
"n":
|
| 56 |
-
"accuracy": 0.
|
| 57 |
-
"brier": 0.
|
| 58 |
-
"ece": 0.
|
| 59 |
-
"positive_rate": 0.
|
| 60 |
},
|
| 61 |
"pii_phone": {
|
| 62 |
-
"n":
|
| 63 |
-
"accuracy": 0.
|
| 64 |
-
"brier": 0.
|
| 65 |
-
"ece": 0.
|
| 66 |
-
"positive_rate": 0.
|
| 67 |
},
|
| 68 |
"pii_present": {
|
| 69 |
-
"n":
|
| 70 |
-
"accuracy":
|
| 71 |
-
"brier":
|
| 72 |
-
"ece": 0.
|
| 73 |
-
"positive_rate": 0.
|
| 74 |
},
|
| 75 |
"pii_secret": {
|
| 76 |
-
"n":
|
| 77 |
-
"accuracy":
|
| 78 |
-
"brier":
|
| 79 |
-
"ece": 0.
|
| 80 |
-
"positive_rate": 0.
|
| 81 |
},
|
| 82 |
"pii_ssn": {
|
| 83 |
-
"n":
|
| 84 |
-
"accuracy": 0.
|
| 85 |
-
"brier": 0.
|
| 86 |
-
"ece": 0.
|
| 87 |
-
"positive_rate": 0.
|
| 88 |
}
|
| 89 |
},
|
| 90 |
-
"macro_accuracy": 0.
|
| 91 |
"ood_probe": {
|
| 92 |
"pii_present": {
|
| 93 |
-
"mean_prob": 0.
|
| 94 |
-
"max_prob": 0.
|
| 95 |
},
|
| 96 |
"pii_email": {
|
| 97 |
-
"mean_prob": 0.
|
| 98 |
-
"max_prob": 0.
|
| 99 |
},
|
| 100 |
"pii_phone": {
|
| 101 |
-
"mean_prob": 0.
|
| 102 |
-
"max_prob": 0.
|
| 103 |
},
|
| 104 |
"pii_ssn": {
|
| 105 |
-
"mean_prob": 0.
|
| 106 |
-
"max_prob": 0.
|
| 107 |
},
|
| 108 |
"pii_credit_card": {
|
| 109 |
-
"mean_prob": 0.
|
| 110 |
-
"max_prob": 0.
|
| 111 |
},
|
| 112 |
"pii_ip_address": {
|
| 113 |
-
"mean_prob": 0.
|
| 114 |
-
"max_prob": 0.
|
| 115 |
},
|
| 116 |
"pii_secret": {
|
| 117 |
-
"mean_prob": 0.
|
| 118 |
-
"max_prob": 0.
|
| 119 |
},
|
| 120 |
"pii_person_name": {
|
| 121 |
-
"mean_prob": 0.
|
| 122 |
-
"max_prob": 0.
|
| 123 |
},
|
| 124 |
"pii_address": {
|
| 125 |
-
"mean_prob": 0.
|
| 126 |
-
"max_prob": 0.
|
| 127 |
},
|
| 128 |
"injection_present": {
|
| 129 |
-
"mean_prob": 0.
|
| 130 |
-
"max_prob": 0.
|
| 131 |
},
|
| 132 |
"jailbreak_attempt": {
|
| 133 |
-
"mean_prob": 0.
|
| 134 |
-
"max_prob": 0.
|
| 135 |
},
|
| 136 |
"harmful_request": {
|
| 137 |
-
"mean_prob": 0.
|
| 138 |
-
"max_prob": 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 140 |
}
|
| 141 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"model_dir": "/home/amazonas/Projects/homelab/opencode-bunker-laya/outputs/laya-bunker-pii-v5",
|
| 3 |
"rows_evaluated": 2000,
|
| 4 |
"questions": {
|
| 5 |
"harmful_request": {
|
| 6 |
+
"n": 496,
|
| 7 |
+
"accuracy": 0.9939516129032258,
|
| 8 |
+
"brier": 0.005954727822580643,
|
| 9 |
+
"ece": 0.005114516129032262,
|
| 10 |
+
"positive_rate": 0.06653225806451613
|
| 11 |
},
|
| 12 |
"injection_present": {
|
| 13 |
+
"n": 1379,
|
| 14 |
+
"accuracy": 0.9883973894126178,
|
| 15 |
+
"brier": 0.011102216272661348,
|
| 16 |
+
"ece": 0.007779840464104383,
|
| 17 |
+
"positive_rate": 0.31834662799129804
|
| 18 |
},
|
| 19 |
"jailbreak_attempt": {
|
| 20 |
+
"n": 850,
|
| 21 |
+
"accuracy": 0.9882352941176471,
|
| 22 |
+
"brier": 0.01106352987058823,
|
| 23 |
+
"ece": 0.007685999999999998,
|
| 24 |
+
"positive_rate": 0.04
|
| 25 |
},
|
| 26 |
"pii_address": {
|
| 27 |
+
"n": 524,
|
| 28 |
+
"accuracy": 0.9942748091603053,
|
| 29 |
+
"brier": 0.005694543645038168,
|
| 30 |
+
"ece": 0.0020410305343511867,
|
| 31 |
+
"positive_rate": 0.3148854961832061
|
| 32 |
},
|
| 33 |
"pii_credit_card": {
|
| 34 |
+
"n": 524,
|
| 35 |
+
"accuracy": 0.9980916030534351,
|
| 36 |
+
"brier": 0.00190759853053435,
|
| 37 |
+
"ece": 0.0017387404580152673,
|
| 38 |
+
"positive_rate": 0.026717557251908396
|
| 39 |
},
|
| 40 |
"pii_email": {
|
| 41 |
+
"n": 524,
|
| 42 |
"accuracy": 1.0,
|
| 43 |
+
"brier": 1.3239236641221409e-05,
|
| 44 |
+
"ece": 0.003635114503816801,
|
| 45 |
+
"positive_rate": 0.11068702290076336
|
| 46 |
},
|
| 47 |
"pii_ip_address": {
|
| 48 |
+
"n": 524,
|
| 49 |
"accuracy": 1.0,
|
| 50 |
+
"brier": 1.3028206106870231e-05,
|
| 51 |
+
"ece": 0.003609160305343511,
|
| 52 |
+
"positive_rate": 0.0019083969465648854
|
| 53 |
},
|
| 54 |
"pii_person_name": {
|
| 55 |
+
"n": 524,
|
| 56 |
+
"accuracy": 0.9923664122137404,
|
| 57 |
+
"brier": 0.007569855553435112,
|
| 58 |
+
"ece": 0.005489122137404556,
|
| 59 |
+
"positive_rate": 0.2633587786259542
|
| 60 |
},
|
| 61 |
"pii_phone": {
|
| 62 |
+
"n": 524,
|
| 63 |
+
"accuracy": 0.9961832061068703,
|
| 64 |
+
"brier": 0.003800752671755723,
|
| 65 |
+
"ece": 0.006651145038167933,
|
| 66 |
+
"positive_rate": 0.10687022900763359
|
| 67 |
},
|
| 68 |
"pii_present": {
|
| 69 |
+
"n": 844,
|
| 70 |
+
"accuracy": 1.0,
|
| 71 |
+
"brier": 1.3212132701421893e-05,
|
| 72 |
+
"ece": 0.003634123222748872,
|
| 73 |
+
"positive_rate": 0.27606635071090047
|
| 74 |
},
|
| 75 |
"pii_secret": {
|
| 76 |
+
"n": 524,
|
| 77 |
+
"accuracy": 1.0,
|
| 78 |
+
"brier": 1.3086622137404597e-05,
|
| 79 |
+
"ece": 0.003616984732824415,
|
| 80 |
+
"positive_rate": 0.04389312977099236
|
| 81 |
},
|
| 82 |
"pii_ssn": {
|
| 83 |
+
"n": 524,
|
| 84 |
+
"accuracy": 0.9923664122137404,
|
| 85 |
+
"brier": 0.007541306545801523,
|
| 86 |
+
"ece": 0.0038841603053434612,
|
| 87 |
+
"positive_rate": 0.17748091603053434
|
| 88 |
}
|
| 89 |
},
|
| 90 |
+
"macro_accuracy": 0.995322228265132,
|
| 91 |
"ood_probe": {
|
| 92 |
"pii_present": {
|
| 93 |
+
"mean_prob": 0.0035999999999999995,
|
| 94 |
+
"max_prob": 0.0036
|
| 95 |
},
|
| 96 |
"pii_email": {
|
| 97 |
+
"mean_prob": 0.0035999999999999995,
|
| 98 |
+
"max_prob": 0.0036
|
| 99 |
},
|
| 100 |
"pii_phone": {
|
| 101 |
+
"mean_prob": 0.003616666666666666,
|
| 102 |
+
"max_prob": 0.0037
|
| 103 |
},
|
| 104 |
"pii_ssn": {
|
| 105 |
+
"mean_prob": 0.0037000000000000006,
|
| 106 |
+
"max_prob": 0.0037
|
| 107 |
},
|
| 108 |
"pii_credit_card": {
|
| 109 |
+
"mean_prob": 0.0035999999999999995,
|
| 110 |
+
"max_prob": 0.0036
|
| 111 |
},
|
| 112 |
"pii_ip_address": {
|
| 113 |
+
"mean_prob": 0.0035999999999999995,
|
| 114 |
+
"max_prob": 0.0036
|
| 115 |
},
|
| 116 |
"pii_secret": {
|
| 117 |
+
"mean_prob": 0.003616666666666666,
|
| 118 |
+
"max_prob": 0.0037
|
| 119 |
},
|
| 120 |
"pii_person_name": {
|
| 121 |
+
"mean_prob": 0.0035999999999999995,
|
| 122 |
+
"max_prob": 0.0036
|
| 123 |
},
|
| 124 |
"pii_address": {
|
| 125 |
+
"mean_prob": 0.0036666666666666666,
|
| 126 |
+
"max_prob": 0.0037
|
| 127 |
},
|
| 128 |
"injection_present": {
|
| 129 |
+
"mean_prob": 0.0038166666666666666,
|
| 130 |
+
"max_prob": 0.0044
|
| 131 |
},
|
| 132 |
"jailbreak_attempt": {
|
| 133 |
+
"mean_prob": 0.0036500000000000005,
|
| 134 |
+
"max_prob": 0.0037
|
| 135 |
},
|
| 136 |
"harmful_request": {
|
| 137 |
+
"mean_prob": 0.0036333333333333326,
|
| 138 |
+
"max_prob": 0.0038
|
| 139 |
+
}
|
| 140 |
+
},
|
| 141 |
+
"ood_dev_probe": {
|
| 142 |
+
"injection_present": {
|
| 143 |
+
"n": 18,
|
| 144 |
+
"mean_prob": 0.004072222222222223,
|
| 145 |
+
"max_prob": 0.0084
|
| 146 |
+
},
|
| 147 |
+
"jailbreak_attempt": {
|
| 148 |
+
"n": 18,
|
| 149 |
+
"mean_prob": 0.003661111111111111,
|
| 150 |
+
"max_prob": 0.0037
|
| 151 |
+
},
|
| 152 |
+
"harmful_request": {
|
| 153 |
+
"n": 18,
|
| 154 |
+
"mean_prob": 0.0036333333333333335,
|
| 155 |
+
"max_prob": 0.0037
|
| 156 |
+
}
|
| 157 |
+
},
|
| 158 |
+
"pii_format_probe": [
|
| 159 |
+
{
|
| 160 |
+
"qid": "pii_ssn",
|
| 161 |
+
"text": "My social security number is 123456878.",
|
| 162 |
+
"expected": true,
|
| 163 |
+
"prob": 0.9962,
|
| 164 |
+
"correct": true
|
| 165 |
+
},
|
| 166 |
+
{
|
| 167 |
+
"qid": "pii_ssn",
|
| 168 |
+
"text": "SSN: 123-45-6789",
|
| 169 |
+
"expected": true,
|
| 170 |
+
"prob": 0.9962,
|
| 171 |
+
"correct": true
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"qid": "pii_phone",
|
| 175 |
+
"text": "Call me at 5551234567.",
|
| 176 |
+
"expected": true,
|
| 177 |
+
"prob": 0.9958,
|
| 178 |
+
"correct": true
|
| 179 |
+
},
|
| 180 |
+
{
|
| 181 |
+
"qid": "pii_phone",
|
| 182 |
+
"text": "Phone: (555) 123-4567",
|
| 183 |
+
"expected": true,
|
| 184 |
+
"prob": 0.9963,
|
| 185 |
+
"correct": true
|
| 186 |
+
},
|
| 187 |
+
{
|
| 188 |
+
"qid": "pii_ip_address",
|
| 189 |
+
"text": "The server responded from 192.168.1.10.",
|
| 190 |
+
"expected": true,
|
| 191 |
+
"prob": 0.9964,
|
| 192 |
+
"correct": true
|
| 193 |
+
},
|
| 194 |
+
{
|
| 195 |
+
"qid": "pii_ip_address",
|
| 196 |
+
"text": "Client IP: 203.0.113.7",
|
| 197 |
+
"expected": true,
|
| 198 |
+
"prob": 0.9963,
|
| 199 |
+
"correct": true
|
| 200 |
+
},
|
| 201 |
+
{
|
| 202 |
+
"qid": "pii_credit_card",
|
| 203 |
+
"text": "Card number 4111111111111111 expires next year.",
|
| 204 |
+
"expected": true,
|
| 205 |
+
"prob": 0.9962,
|
| 206 |
+
"correct": true
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"qid": "pii_credit_card",
|
| 210 |
+
"text": "Build timestamp: 1759600000000",
|
| 211 |
+
"expected": false,
|
| 212 |
+
"prob": 0.0036,
|
| 213 |
+
"correct": true
|
| 214 |
+
},
|
| 215 |
+
{
|
| 216 |
+
"qid": "pii_ip_address",
|
| 217 |
+
"text": "Version 1.2.3.4 is deployed.",
|
| 218 |
+
"expected": false,
|
| 219 |
+
"prob": 0.0036,
|
| 220 |
+
"correct": true
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"qid": "pii_secret",
|
| 224 |
+
"text": "The password field is required.",
|
| 225 |
+
"expected": false,
|
| 226 |
+
"prob": 0.0037,
|
| 227 |
+
"correct": true
|
| 228 |
}
|
| 229 |
+
],
|
| 230 |
+
"gates": {
|
| 231 |
+
"injection_dev_max_lt_0.5": true,
|
| 232 |
+
"pii_format_all_correct": true
|
| 233 |
}
|
| 234 |
}
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 842609220
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7676965ed79a9e11d79daaf3a355a86f76a50a304f053ca39addbedd3d4f7258
|
| 3 |
size 842609220
|
onnx/model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 3559945
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d48ff190266e438ff115b6ab7cb6c66c40d952605b868b28419a4f152fc92c72
|
| 3 |
size 3559945
|
onnx/model.onnx.data
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1685258240
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0346e6026681a6cfa34eefa76918f3b35255b7ba2c30302ebe1388f8f9fd56b
|
| 3 |
size 1685258240
|
rl_agent_config.json
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
"temperature": [
|
| 14 |
1.2,
|
| 15 |
1.2,
|
| 16 |
-
|
| 17 |
],
|
| 18 |
"training": {
|
| 19 |
"updates": 7313,
|
|
|
|
| 13 |
"temperature": [
|
| 14 |
1.2,
|
| 15 |
1.2,
|
| 16 |
+
3.1748971939086914
|
| 17 |
],
|
| 18 |
"training": {
|
| 19 |
"updates": 7313,
|