Safetensors
GGUF
qwen3
cybersecurity
agentic
red-team
blue-team
distillation
glm-5.2
kimi-k3
function-calling
tool-calling
tool-use
conversational
Instructions to use bebrws/security-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use bebrws/security-8b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf bebrws/security-8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf bebrws/security-8b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf bebrws/security-8b:Q4_K_M # Run inference directly in the terminal: llama cli -hf bebrws/security-8b:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf bebrws/security-8b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bebrws/security-8b:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf bebrws/security-8b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bebrws/security-8b:Q4_K_M
Use Docker
docker model run hf.co/bebrws/security-8b:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use bebrws/security-8b with Ollama:
ollama run hf.co/bebrws/security-8b:Q4_K_M
- Unsloth Desktop
- Pi
How to use bebrws/security-8b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bebrws/security-8b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "bebrws/security-8b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use bebrws/security-8b with Docker Model Runner:
docker model run hf.co/bebrws/security-8b:Q4_K_M
- Lemonade
How to use bebrws/security-8b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bebrws/security-8b:Q4_K_M
Run and chat with the model
lemonade run user.security-8b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use bebrws/security-8b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bebrws/security-8b:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default bebrws/security-8b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use bebrws/security-8b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf bebrws/security-8b:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "bebrws/security-8b:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
model card: v8 attack 5/5 x3, MMLU==base (branch main)
Browse files
README.md
CHANGED
|
@@ -4,15 +4,10 @@ base_model: Qwen/Qwen3-8B
|
|
| 4 |
tags: [cybersecurity, agentic, red-team, blue-team, distillation, glm-5.2, kimi-k3]
|
| 5 |
---
|
| 6 |
|
| 7 |
-
# k3-sec-8b (
|
| 8 |
-
|
| 9 |
-
> **`main` currently carries the `v7cti` weights** (v6 agentic lineage + round-7 CTI
|
| 10 |
-
> knowledge SFT) plus GGUF builds for LM Studio. The newest agentic-lineage model is
|
| 11 |
-
> `v7` (branch), which passed the internal 10-task gate at 8.33/10 β its card content
|
| 12 |
-
> follows below. All versions live on branches: `v7`, `v7cti`, `v6`, `v5`, `v4`, `v3`, `v2`.
|
| 13 |
|
| 14 |
An 8B cybersecurity agent (offense + defense) fine-tuned from `Qwen/Qwen3-8B` on
|
| 15 |
-
**
|
| 16 |
(rounds 1β3). Trained to operate an autonomous security harness β plan, run bash, read
|
| 17 |
observations, write files, finish β not just answer security questions.
|
| 18 |
|
|
@@ -20,26 +15,28 @@ Pipeline per iteration: failure analysis on eval traces β parameterized, decon
|
|
| 20 |
seed factory β teacher best-of-3 rejection-sampled agentic transcripts (judged +
|
| 21 |
artifact-checked) β full-FT SFT β multi-run attack/defend eval β next round.
|
| 22 |
|
| 23 |
-
## Version
|
| 24 |
|
| 25 |
-
- **Data**:
|
|
|
|
| 26 |
round: 985 traces across ALL ten eval skills (flaky six weighted 100-120, solid four
|
| 27 |
-
kept warm at 60-80, 80 generalization)
|
| 28 |
-
trades regressions. Round 6 added
|
| 29 |
564 GLM-5.2 traces targeting the five v3 tasks that never passed, generated from 580
|
| 30 |
parameterized seeds with decontamination-by-construction (every eval-graded string is
|
| 31 |
blacklisted and asserted absent). Best-of-3 rejection with a glm-4.7-flash judge
|
| 32 |
(kept 97%). Note: v3's advertised 157 rows contained only 135 unique after legacy
|
| 33 |
merge duplicates; v4 is a genuine 5.2Γ data increase.
|
| 34 |
- **Training**: full FT bf16, 2 epochs, lr 1e-5 cosine, eff. batch 32, seq 8192,
|
| 35 |
-
adamw_8bit, 5.37M tokens, ~42 min on 1Γ A100-80GB. **train_loss 0.
|
| 36 |
-
|
| 37 |
serving.
|
| 38 |
- **Eval** (fixed 10-task synthetic attack/defend lab, agentic harness, 3 runs):
|
| 39 |
-
**mean 8.
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
### Per-task pass rates (P across runs)
|
| 45 |
|
|
@@ -61,53 +58,6 @@ meaningful for this suite. Known v4 gap: `atk-sqli` β the model prefers to sta
|
|
| 61 |
staged vulnerable app and fuzz it over HTTP instead of reading the offline artifacts
|
| 62 |
(trace-verified behavioral prior, targeted in round 5).
|
| 63 |
|
| 64 |
-
## External benchmark: vs Cisco Foundation-Sec (MCQ knowledge eval, 2026-08-01)
|
| 65 |
-
|
| 66 |
-
Independent comparison on 1,210 multiple-choice cybersecurity questions
|
| 67 |
-
(CyberMetric-500, CTI-Bench-MCQ 500/2500 sample, SecQA v1+v2 test; seed 42,
|
| 68 |
-
temperature 0). Each model evaluated in its **native prompting mode**:
|
| 69 |
-
`Foundation-Sec-8B` is a *base* model (few-shot completion is its only usable mode;
|
| 70 |
-
zero-shot chat collapses to ~34%), `Foundation-Sec-1.1-8B-Instruct` and k3-sec-8b
|
| 71 |
-
were evaluated zero-shot chat (Qwen3 template, non-thinking). Identical question
|
| 72 |
-
sets for every model.
|
| 73 |
-
|
| 74 |
-
| Benchmark (n) | F-Sec-8B (base) | F-Sec-1.1-8B-Instruct | k3 v6 | v7cti (chat) | v7cti (completion) |
|
| 75 |
-
|---|---:|---:|---:|---:|---:|
|
| 76 |
-
| CyberMetric-500 | 84.20% | 85.80% | **86.80%** | 86.20% | **87.80%** |
|
| 77 |
-
| CTI-Bench-MCQ (500) | 66.00% | **67.40%** | 58.80% | 60.40% | 62.60% |
|
| 78 |
-
| SecQA v1+v2 (210) | 98.10% | **99.05%** | 98.10% | 97.62% | 98.57% |
|
| 79 |
-
| **Overall (1,210)** | 79.09% | **80.50%** | 77.19% | 77.52% | 79.26% |
|
| 80 |
-
|
| 81 |
-
Parse failures: 0 for all models in native modes.
|
| 82 |
-
|
| 83 |
-
**CTI rounds (v6cti / v7cti branches).** Two rounds of ATT&CK-STIX-derived CTI data
|
| 84 |
-
(~2.5k decontaminated MCQ+free-form traces, GLM-5.2/Foundation-Sec teachers,
|
| 85 |
-
deepseek-v4-flash judge) were trained on top of the r6 mix. Round 6 (justification
|
| 86 |
-
style, upsampled) produced churn without net gain and a chat-mode regression β
|
| 87 |
-
diagnosed as format conflict + template overfitting + step-share dilution. Round 7
|
| 88 |
-
fixed all three (bare-letter format-matched training, GLM-5.2 paraphrases,
|
| 89 |
-
multi-turn packing to 38% of gradient steps): chat CTI-Bench **+1.6** to 60.4%,
|
| 90 |
-
CyberMetric completion **87.8%** and SecQA completion **98.6%** (k3 records).
|
| 91 |
-
Against the base Foundation-Sec, v7cti-completion ties overall (79.26% vs 79.09%);
|
| 92 |
-
against the stronger **Foundation-Sec-1.1-8B-Instruct (80.50% overall)** k3 leads
|
| 93 |
-
only on CyberMetric (+2.0) and trails on CTI-Bench (62.6% vs 67.4%) β CTI/ATT&CK
|
| 94 |
-
knowledge remains a pretraining-data advantage and the target of the next round
|
| 95 |
-
(light domain CPT, then failure-targeted DPO).
|
| 96 |
-
|
| 97 |
-
**Qualitative** (6 open-ended security prompts): Foundation-Sec gives terse,
|
| 98 |
-
mostly-correct completion-style answers; k3 gives structured markdown answers with
|
| 99 |
-
finer-grained precision (e.g. LSASS dumping -> T1003.001 sub-technique + detections).
|
| 100 |
-
Eval harness + raw per-question results: `sec-eval/` (drive_eval.py, results_*.json).
|
| 101 |
-
|
| 102 |
-
## GGUF / LM Studio
|
| 103 |
-
|
| 104 |
-
`main` ships GGUF builds of v7cti (llama.cpp b10219): `k3-sec-8b-v7cti-Q4_K_M.gguf`
|
| 105 |
-
and `k3-sec-8b-v7cti-Q8_0.gguf`.
|
| 106 |
-
|
| 107 |
-
```bash
|
| 108 |
-
lms get bebrws/k3-sec-8b
|
| 109 |
-
```
|
| 110 |
-
|
| 111 |
## Usage
|
| 112 |
|
| 113 |
vLLM, short-task/eval serving (disable static YaRN):
|
|
@@ -140,8 +90,8 @@ competence is deliberately scoped to CTF/lab-grade tasks.
|
|
| 140 |
| v4 | 699 | 6.67/10 (3 runs) | GLM-5.2 scale-up, jwt fixed |
|
| 141 |
| v5 | 891 | 6.67/10 (3 runs: 4,8,8) | sqli breakthrough, ioc fixed; harden regressed (newline stripping) |
|
| 142 |
| v6 | 1076 | 7.0/10 (3 runs: 7,8,6) | harden fixed, webshell solid |
|
| 143 |
-
|
|
| 144 |
-
| **
|
| 145 |
|
| 146 |
Weights are Apache-2.0 per the Qwen3 base; training traces were generated by GLM-5.2
|
| 147 |
and Kimi teachers and filtered by automated judging.
|
|
|
|
| 4 |
tags: [cybersecurity, agentic, red-team, blue-team, distillation, glm-5.2, kimi-k3]
|
| 5 |
---
|
| 6 |
|
| 7 |
+
# k3-sec-8b (v8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
An 8B cybersecurity agent (offense + defense) fine-tuned from `Qwen/Qwen3-8B` on
|
| 10 |
+
**2197 verified agentic + Q&A traces**, distilled from GLM-5.2 (round 4) and Kimi K3/K2.6
|
| 11 |
(rounds 1β3). Trained to operate an autonomous security harness β plan, run bash, read
|
| 12 |
observations, write files, finish β not just answer security questions.
|
| 13 |
|
|
|
|
| 15 |
seed factory β teacher best-of-3 rejection-sampled agentic transcripts (judged +
|
| 16 |
artifact-checked) β full-FT SFT β multi-run attack/defend eval β next round.
|
| 17 |
|
| 18 |
+
## Version 8 highlights
|
| 19 |
|
| 20 |
+
- **Data**: 2197 unique rows (2103 agentic + 94 Q&A). Round 8 was a 136-trace DNS
|
| 21 |
+
top-up (75 decode + 75 detector-contract, $8). Round 7 was the broad-coverage
|
| 22 |
round: 985 traces across ALL ten eval skills (flaky six weighted 100-120, solid four
|
| 23 |
+
kept warm at 60-80, 80 generalization). Round 6 added
|
|
|
|
| 24 |
564 GLM-5.2 traces targeting the five v3 tasks that never passed, generated from 580
|
| 25 |
parameterized seeds with decontamination-by-construction (every eval-graded string is
|
| 26 |
blacklisted and asserted absent). Best-of-3 rejection with a glm-4.7-flash judge
|
| 27 |
(kept 97%). Note: v3's advertised 157 rows contained only 135 unique after legacy
|
| 28 |
merge duplicates; v4 is a genuine 5.2Γ data increase.
|
| 29 |
- **Training**: full FT bf16, 2 epochs, lr 1e-5 cosine, eff. batch 32, seq 8192,
|
| 30 |
+
adamw_8bit, 5.37M tokens, ~42 min on 1Γ A100-80GB. **train_loss 0.616 Β· token-acc
|
| 31 |
+
87.2%** (v7: 0.627 / 86.6%, v6: 0.838 / 83.1%, v3: 1.395 / 69.1%). Ships with Qwen3 YaRN `rope_scaling` for 131072-token
|
| 32 |
serving.
|
| 33 |
- **Eval** (fixed 10-task synthetic attack/defend lab, agentic harness, 3 runs):
|
| 34 |
+
**mean 8.0/10 with ZERO variance (8, 8, 8) -- attack side 5/5 in all three runs**
|
| 35 |
+
(atk-dns fixed by the top-up). Defend side: bruteforce/webshell(2/3)/harden solid,
|
| 36 |
+
def-detect-dns 1/3, def-ioc regressed to 0/3 (round-9 target).
|
| 37 |
+
- **MMLU spot check** (60 questions, temp 0, same harness): v8 0.533 vs v7 0.550 vs
|
| 38 |
+
**base Qwen3-8B 0.550** -- general capability statistically indistinguishable from
|
| 39 |
+
base. NO capability collapse from the agentic diet.
|
| 40 |
|
| 41 |
### Per-task pass rates (P across runs)
|
| 42 |
|
|
|
|
| 58 |
staged vulnerable app and fuzz it over HTTP instead of reading the offline artifacts
|
| 59 |
(trace-verified behavioral prior, targeted in round 5).
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
## Usage
|
| 62 |
|
| 63 |
vLLM, short-task/eval serving (disable static YaRN):
|
|
|
|
| 90 |
| v4 | 699 | 6.67/10 (3 runs) | GLM-5.2 scale-up, jwt fixed |
|
| 91 |
| v5 | 891 | 6.67/10 (3 runs: 4,8,8) | sqli breakthrough, ioc fixed; harden regressed (newline stripping) |
|
| 92 |
| v6 | 1076 | 7.0/10 (3 runs: 7,8,6) | harden fixed, webshell solid |
|
| 93 |
+
| v7 | 2061 | 8.33/10 (3 runs: 8,7,10) | gate passed; sqli 3/3 |
|
| 94 |
+
| **v8** | **2197** | **8.0/10 (3 runs: 8,8,8)** | attack 5/5 x3; MMLU == base; ioc regressed |
|
| 95 |
|
| 96 |
Weights are Apache-2.0 per the Qwen3 base; training traces were generated by GLM-5.2
|
| 97 |
and Kimi teachers and filtered by automated judging.
|