Text Classification
Transformers
Safetensors
English
prokope_safeagent
feature-extraction
agent-safety
safeagents
system-one
guardrail
tool-call-safety
decision-model
prokope
qwen3
custom_code
Eval Results
Instructions to use ProKope-AI/ProKope-SafeAgent-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ProKope-AI/ProKope-SafeAgent-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ProKope-AI/ProKope-SafeAgent-4B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ProKope-AI/ProKope-SafeAgent-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from ProKope-AI/ProKope-SafeAgent-4B: direct link, hf CLI and curl.
- Browser
- Download file 6.37 kB
-
https://huggingface.co/ProKope-AI/ProKope-SafeAgent-4B/resolve/main/README.md
- Command line
-
hf download hf://ProKope-AI/ProKope-SafeAgent-4B/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/ProKope-AI/ProKope-SafeAgent-4B/resolve/main/README.md
6.37 kB
| license: apache-2.0 | |
| library_name: transformers | |
| pipeline_tag: text-classification | |
| base_model: Qwen/Qwen3-4B | |
| gated: manual | |
| extra_gated_heading: "Request Access to ProKope-SafeAgent-4B" | |
| extra_gated_description: "Access requests are reviewed manually by ProKope AI. Access is granted for agent-safety research, guardrails evaluation, and production integration under Apache-2.0." | |
| extra_gated_prompt: "By requesting access to ProKope-SafeAgent-4B, you agree to evaluate and deploy the model weights responsibly in accordance with Apache-2.0 license terms and understand that results on safeagents-judge-bench are self-reported cleanly under zero-leakage verification." | |
| extra_gated_button_content: "Request Access" | |
| extra_gated_fields: | |
| Company or Institution: text | |
| Corporate or Academic Email: text | |
| Country: country | |
| Intended Use: | |
| type: select | |
| options: | |
| - Academic / Security Research | |
| - Internal Enterprise Evaluation | |
| - Red-Teaming / Benchmarking | |
| - Production Agent Guardrail | |
| Accept Responsible Use Terms: checkbox | |
| language: | |
| - en | |
| tags: | |
| - agent-safety | |
| - safeagents | |
| - system-one | |
| - guardrail | |
| - tool-call-safety | |
| - decision-model | |
| - text-classification | |
| - prokope | |
| - qwen3 | |
| datasets: | |
| - ia03/terminal-bench | |
| - IntelligenceLab/Long-Horizon-Terminal-Bench | |
| # ProKope-SafeAgent-4B™ | |
| **Creator:** Alan Canto (`ProKope-AI`) | |
| **Architecture:** `Qwen/Qwen3-4B` dual-head System One safety decision model (`[h_mean; h_last]` -> binary `allow/block` head + 7-class misuse taxonomy head) | |
| **Benchmark Target:** [`harness-hub/safeagents-judge-bench`](https://huggingface.co/datasets/harness-hub/safeagents-judge-bench) (Strict Zero-Overlap Clean-Room Build `v6`) | |
| --- | |
| ## Key Results on `harness-hub/safeagents-judge-bench` (661 Calls) | |
| Evaluated zero-shot across all `661` test calls (`536 block`, `125 allow`) at the unmodified official threshold (`0.50`) using the `systemone` adapter (`AutoModel.from_pretrained(..., trust_remote_code=True)`): | |
| | Model | Track | Balanced Acc ↑ | AUROC ↑ | False Block Rate ↓ | Recall ↑ | Precision ↑ | F1 ↑ | Cat Acc ↑ | Cat Macro-F1 ↑ | Traj Caught | Latency p50 ↓ | | |
| |---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:| | |
| | **`ProKope-AI/ProKope-SafeAgent-4B` (`v6`)** | Binary | **0.967** | **0.990** | **0.040** (`5/125`) | **0.974** | **0.991** | **0.982** | — | — | **81/82** | **0.143s** | | |
| | **`ProKope-AI/ProKope-SafeAgent-4B` (`v6`)** | Category | **0.956** | **0.991** | **0.024** (`3/125`) | **0.937** | **0.994** | **0.964** | **0.747** | **0.522** | **80/82** | **0.143s** | | |
| | `PromptforceAI/niti-gate-vegaml-4b` (`#1` LB) | Binary | 0.905 | 0.957 | 0.072 | 0.882 | — | — | 0.729 (cat) | 0.497 | 78/82 | 0.41s | | |
| | `Cloudflare/clef-flash` | Binary | 0.893 | 0.967 | 0.192 | 0.978 | 0.956 | 0.967 | 0.576 (cat) | 0.462 | 81/82 | 0.326s | | |
| | `Cloudflare/clef-omni` | Binary | 0.877 | 0.946 | 0.160 | 0.914 | 0.961 | 0.937 | 0.564 (cat) | 0.437 | 81/82 | 0.285s | | |
| | `vllm-sr/d3-mini` | Binary | 0.856 | 0.986 | 0.288 | 1.000 | 0.937 | 0.968 | 0.652 (cat) | 0.512 | 82/82 | 0.168s | | |
| | `LiquidAI/d1-3B` | Binary | 0.836 | 0.946 | 0.008 | 0.681 | 0.997 | 0.809 | 0.457 (cat) | 0.328 | 68/82 | 0.035s | | |
| | `TypeScript/FastBrain-9B` | Binary | 0.814 | 0.985 | 0.368 | 0.996 | 0.921 | 0.957 | 0.858 (cat) | 0.751 | 82/82 | 0.327s | | |
| | `Cloudflare/clef` | Binary | 0.808 | 0.993 | 0.384 | 1.000 | 0.918 | 0.957 | 0.737 (cat) | 0.563 | 82/82 | 0.636s | | |
| --- | |
| ## Adversarial Clean-Room & Zero-Overlap Verification | |
| - **Strict Multi-Granular Quarantine:** Screened against all `661` test calls and `55` tasks of `harness-hub/safeagents-judge-bench`: | |
| - `task_id` overlap: **`0`** | |
| - exact / `120`-char substring `task_text` overlap: **`0`** | |
| - exact `>=25`-char `tool_args` overlap: **`0`** | |
| - **`8-gram` `task_text` & `8-gram` `tool_args` overlap: `0` / `0`** | |
| - **`13-gram` state/task overlap: `0`** | |
| - **Template-Disjoint Validation & Label-Neutral Scanner Findings:** `2,432` train rows (`154` tasks, `1,000` unique `Arguments`) / `496` val rows (`29` unseen tasks, `288` unique `Arguments`), **`0` train-vs-val `Arguments` overlap**, `0` duplicates, and identical canonical `Scanner findings:` strings across `allow` and `block`. | |
| - **Counterfactual Stress Audit:** `12/12` pass on workspace-vs-verifier boundary inversions, comment-framing jailbreaks, missing findings, and long truncated payloads. | |
| - **Training Footprint:** `16.5M` BF16 LoRA parameters (`0.4089%` of `4.04B`) + float32 heads merged to `410` `bfloat16` safetensors (`0` NaN, `0` Inf), trained on an RTX 5080 Laptop GPU (`8.59 GB` peak VRAM). | |
| --- | |
| ## Usage (`systemone` Adapter) | |
| ```python | |
| import torch | |
| from transformers import AutoModel | |
| model = AutoModel.from_pretrained( | |
| "ProKope-AI/ProKope-SafeAgent-4B", | |
| trust_remote_code=True, | |
| dtype=torch.bfloat16, | |
| ).to("cuda").eval() | |
| out = model.system_one(state=state_text, questions=questions) | |
| p_block = out["answers"]["block"]["noul"] | |
| category = out["answers"]["category"]["choice"] | |
| ``` | |
| --- | |
| ## Known Limitations | |
| - `eval_gaming` credential/secret probes frequently collide with `credential_misuse` (`category_macro_f1 = 0.522`), though binary gating catches `81/82` malicious trajectories with `0.0` median bad calls before catch. | |
| - Long prefixes (`>3,000` chars) truncated by upstream `bench/decide.py` force reliance on static scanner findings for binary detection. | |
| - Scores recorded in `.eval_results/safeagents-judge-bench.yaml` are self-reported using an exact local replica of `bench/decide.py` + `bench/run.py`; official public ranking on `harness-hub/safeagents-judge-bench` awaits maintainer benchmark execution. | |
| - Intended strictly for sandboxed coding-agent tool-call gating; not a general-purpose chat guardrail. | |
| --- | |
| ## Trademark & Attribution Notice ([NOTICE](NOTICE)) | |
| `ProKope-SafeAgent-4B™`, `ProKope™`, `ProKope AI™`, `AZAC™`, and the ProKope™ model lineup (`ProKope-421M™`, `ProKope-421M-8K™`, `ProKope-7B™`, `ProKope-VL-7B™`, `ProKope-4B-Eagle-Eye™`, `ProKope-Guard-8K™`, `ProKope-SafeAgent-4B™`, `ProKope-SecAudit-4B™`) are common-law trademarks of **Alan Canto / ProKope AI™**. Any model or code license in this repository governs weights/code only and does not grant trademark rights. | |