bebrws commited on
Commit
f0ad107
·
verified ·
1 Parent(s): 256bfc0

model card for k3-sec-8b-v4 (branch main)

Browse files
Files changed (1) hide show
  1. README.md +86 -0
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ 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 (v4)
8
+
9
+ An 8B cybersecurity agent (offense + defense) fine-tuned from `Qwen/Qwen3-8B` on
10
+ **699 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
+
14
+ Pipeline per iteration: failure analysis on eval traces → parameterized, decontaminated
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 4 highlights
19
+
20
+ - **Data**: 699 unique rows (605 agentic harness transcripts + 94 Q&A). Round 4 added
21
+ 564 GLM-5.2 traces targeting the five v3 tasks that never passed, generated from 580
22
+ parameterized seeds with decontamination-by-construction (every eval-graded string is
23
+ blacklisted and asserted absent). Best-of-3 rejection with a glm-4.7-flash judge
24
+ (kept 97%). Note: v3's advertised 157 rows contained only 135 unique after legacy
25
+ merge duplicates; v4 is a genuine 5.2× data increase.
26
+ - **Training**: full FT bf16, 2 epochs, lr 1e-5 cosine, eff. batch 32, seq 8192,
27
+ adamw_8bit, 5.37M tokens, ~42 min on 1× A100-80GB. **train_loss 0.977 · token-acc
28
+ 80.0%** (v3: 1.395 / 69.1%). Ships with Qwen3 YaRN `rope_scaling` for 131072-token
29
+ serving.
30
+ - **Eval** (fixed 10-task synthetic attack/defend lab, agentic harness, 3 runs):
31
+ **mean 6.67/10** (runs: 9, 6, 5) vs v3 mean 4.0/10 (4 runs). Peak run met the
32
+ promotion gate (≥8/10, both sides ≥4/5) once in three.
33
+
34
+ ### Per-task pass rates (P across runs)
35
+
36
+ | Task | v3 (4 runs) | v4 (3 runs) |
37
+ |---|---|---|
38
+ | atk-sqli | 0/4 | 0/3 |
39
+ | atk-hash | 4/4 | 3/3 |
40
+ | atk-re | 3/4 | 2/3 |
41
+ | atk-dns | 0/4 | 1/3 |
42
+ | atk-jwt | 0/4 | **3/3** |
43
+ | def-bruteforce | 3/4 | 3/3 |
44
+ | def-webshell | 2/4 | 2/3 |
45
+ | def-harden | 4/4 | 3/3 |
46
+ | def-detect-dns | 0/4 | 1/3 |
47
+ | def-ioc | 0/4 | 2/3 |
48
+
49
+ Run-to-run variance is significant at temperature 0.7; single-run scores are not
50
+ meaningful for this suite. Known v4 gap: `atk-sqli` — the model prefers to start the
51
+ staged vulnerable app and fuzz it over HTTP instead of reading the offline artifacts
52
+ (trace-verified behavioral prior, targeted in round 5).
53
+
54
+ ## Usage
55
+
56
+ vLLM, short-task/eval serving (disable static YaRN):
57
+
58
+ ```bash
59
+ python3 -m vllm.entrypoints.openai.api_server \
60
+ --model bebrws/k3-sec-8b --revision v4 \
61
+ --port 8000 --hf-overrides '{"rope_scaling":null}' --max-model-len 32768
62
+ ```
63
+
64
+ Long-context serving: omit `--hf-overrides` and set `--max-model-len 131072`.
65
+ Recommended sampling for agentic loops (non-thinking): `temperature=0.7 top_p=0.8
66
+ top_k=20 min_p=0`, `chat_template_kwargs.enable_thinking=false`, per-step completion
67
+ cap ~4096 tokens.
68
+
69
+ ## Intended use & limitations
70
+
71
+ Defensive/offensive **security research artifact**, evaluated on a small synthetic lab.
72
+ Not for: real intrusion activity, exploit weaponization, unsupervised security
73
+ decisions, or non-security tasks. Outputs require qualified human review. Attack-side
74
+ competence is deliberately scoped to CTF/lab-grade tasks.
75
+
76
+ ## Version history (8B lineage)
77
+
78
+ | Version | Data | Eval mean | Notes |
79
+ |---|---|---|---|
80
+ | v1 | 135 traces | 4/10 single | first 8B run |
81
+ | v2 | 149 traces | 6/10 single | failure-targeted r2 |
82
+ | v3 | 157 (135 unique) | 4.0/10 (4 runs) | parser-fixed harness baseline |
83
+ | **v4** | **699** | **6.67/10 (3 runs)** | GLM-5.2 scale-up, jwt fixed |
84
+
85
+ Weights are Apache-2.0 per the Qwen3 base; training traces were generated by GLM-5.2
86
+ and Kimi teachers and filtered by automated judging.