nyxspecter4 commited on
Commit
b533256
Β·
verified Β·
1 Parent(s): 7be4e35

#898 deploy upgraded model card v5

Browse files
Files changed (1) hide show
  1. README.md +72 -85
README.md CHANGED
@@ -5,6 +5,7 @@ language:
5
  base_model: Qwen/Qwen2.5-3B-Instruct
6
  library_name: transformers
7
  pipeline_tag: text-generation
 
8
  tags:
9
  - cybersecurity
10
  - security
@@ -21,126 +22,112 @@ tags:
21
  - incident-response
22
  - MITRE-ATT&CK
23
  - OWASP
24
- - conversational
25
- - llama-cpp
26
- - gguf
27
- - qwen
 
 
 
 
 
 
28
  ---
29
 
30
- # KIN β€” Cybersecurity Verification Translator (3B)
31
 
32
- KIN is an authoritative, fine-tuned cybersecurity model built on **Qwen2.5-3B-Instruct**. It translates ambiguous machine-generated security claims into leveled briefs with replayable evidence checks.
33
 
34
- **No check, no confidence.**
35
 
36
- ## Evaluation & Leaderboard Status
37
 
38
- * **Hugging Face Open LLM Leaderboard:** [Job PENDING Evaluation](https://huggingface.co/datasets/open-llm-leaderboard/requests/blob/main/nyxspecter4/kin-sft-lora_eval_request_False_bfloat16_Original.json)
39
- * **Downloads:** **1,000+** and climbing
40
 
41
- ---
42
-
43
- ## What KIN Does
44
-
45
- KIN processes PR diffs, review threads, agent traces, or vulnerability writeups and produces a structured **five-field brief**:
46
 
47
- 1. **Claim** β€” What is alleged
48
- 2. **Blast Radius** β€” What breaks if true
49
- 3. **Root Cause Mechanics** β€” The underlying generator: CWE, invariant, missing check
50
- 4. **Reproducible Verification** β€” PoC, failing test, AST check, or execution command
51
- 5. **Falsification Criteria** β€” Confidence level and exactly what evidence would disprove it
52
 
53
- The core rule: **no "critical" without a replayable check.** That refusal IS the product.
54
 
55
- ---
 
 
 
 
56
 
57
- ## What Sets KIN Apart
 
58
 
59
- - **Names Concrete Products**: CrowdStrike Falcon, Velociraptor, Duo MFA, KnowBe4 β€” not generic "implement EDR".
60
- - **Grounds in Real CVEs**: Contextualizes against CVE-2023-4863, CVE-2021-44228, CVE-2024-3094, and more.
61
- - **Real Incident Context**: References lessons from MGM, Colonial Pipeline, NotPetya, Maersk, and Merck breaches.
62
- - **Direct & Opinionated**: Opens immediately with the finding and action item, eliminating boilerplate AI disclaimers.
63
 
64
- ---
65
 
66
- ## Quickstart: Transformers
67
 
68
  ```python
69
  from transformers import pipeline
70
 
71
  messages = [
72
- {
73
- "role": "system",
74
- "content": (
75
- "You are KIN β€” a sharp cybersecurity AI partner. Direct, opinionated, specific. "
76
- "Name tools, CVEs, companies. Sound like a senior engineer at a bar, not a textbook. "
77
- "Lead with your boldest take. End with a specific action. Max 2-3 paragraphs. "
78
- "Open with your take, not your title. No 'As a cybersecurity AI expert.' "
79
- "Name products: 'CrowdStrike Falcon' not 'use EDR'. 'Duo push MFA' not 'implement MFA'."
80
- )
81
- },
82
- {
83
- "role": "user",
84
- "content": "How do I detect a lateral movement foothold after an active directory credential dump?"
85
- }
86
  ]
87
 
88
- pipe = pipeline("text-generation", model="nyxspecter4/kin-sft-lora", device_map="auto")
89
  output = pipe(messages, max_new_tokens=512, return_full_text=False)
90
  print(output[0]["generated_text"])
91
  ```
92
 
93
- ---
94
-
95
- ## Quickstart: Ollama, GGUF & llama.cpp
96
-
97
- This repo ships the **Q4_K_M GGUF (1.93 GB)** next to the full Safetensors weights, so local CPU/GPU inference is one command:
98
 
99
  ```bash
100
- # Direct from Hugging Face with Ollama (pulls Q4_K_M from this repo)
101
- ollama run hf.co/nyxspecter4/kin-sft-lora
102
  ```
103
 
104
- Or build from the included `Modelfile` (LoRA-adapter path):
105
 
106
- ```bash
107
- git clone https://huggingface.co/nyxspecter4/kin-sft-lora
108
- cd kin-sft-lora
109
- ollama create kin -f Modelfile
110
- ollama run kin
111
- ```
112
 
113
- With llama.cpp:
114
 
115
- ```bash
116
- llama-cli -hf nyxspecter4/kin-sft-lora -p "How do I detect credential-dump lateral movement?"
117
- ```
118
-
119
- ### Quantization Matrix
120
-
121
- | Quant Format | Precision | File Size | Recommended Hardware | Status |
122
- |---|---|---|---|---|
123
- | **Q4_K_M** | 4-bit Medium | **1.93 GB** | Laptops & M1/M2/M3 Macs (fastest) | βœ… In this repo |
124
- | Q5_K_M | 5-bit Medium | ~2.5 GB | Standard desktops (balanced) | Planned |
125
- | Q8_0 | 8-bit High | ~3.8 GB | Workstations / servers (max fidelity) | Planned |
126
- | FP16 | 16-bit Full | ~6.2 GB | GPU VRAM >= 8 GB (uncompressed) | Planned |
127
-
128
- ---
129
-
130
- ## Training Details
131
 
132
  | Parameter | Value |
133
  |-----------|-------|
134
- | Base Architecture | `Qwen/Qwen2.5-3B-Instruct` |
135
- | Method | LoRA SFT + DPO Alignment |
136
- | LoRA Rank / Alpha | 8 / 16 |
137
- | Target Modules | `q_proj`, `k_proj`, `v_proj`, `o_proj` |
138
- | Alignment Data | `nyxspecter4/kin-cyber-dpo-v2` (1,637 DPO pairs) |
139
-
140
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
141
 
142
  ## Limitations
143
 
144
- - 3B-class model: strong at triage, brief-writing, and checklist enforcement β€” always validate critical findings with a replayable check or scanner before acting.
145
- - The five-field brief is a reasoning aid, not a formal audit artifact.
146
- - Long-context codebases should be pre-filtered (diff/relevant file chunks) before prompting.
 
 
 
 
 
 
 
5
  base_model: Qwen/Qwen2.5-3B-Instruct
6
  library_name: transformers
7
  pipeline_tag: text-generation
8
+ model_name: KIN-Verification-Translator
9
  tags:
10
  - cybersecurity
11
  - security
 
22
  - incident-response
23
  - MITRE-ATT&CK
24
  - OWASP
25
+ model-index:
26
+ - name: KIN-Verification-Translator
27
+ results:
28
+ - task:
29
+ name: text-generation
30
+ type: text-generation
31
+ metrics:
32
+ - name: gap-delta-eval
33
+ type: gap-delta-eval
34
+ value: pending
35
  ---
36
 
37
+ # KIN β€” Verification Translator (3B Canonical)
38
 
39
+ KIN translates machine-generated security claims into leveled briefs with replayable evidence checks. Not a chatbot. Not an encyclopedia. A bridge between agent output and human decisions.
40
 
41
+ **No check, no confidence.** If the claim has no replayable verification, KIN refuses to sound sure. That refusal is the product.
42
 
43
+ ## The Problem
44
 
45
+ Maintainers are drowning in AI-shaped reports that look expert and are not. Copilot files critical PRs. Huntr contestants submit AI-generated writeups. Agent traces produce 40-file refactors with no comment a person can hold in working memory.
 
46
 
47
+ The scarce skill is no longer "can a human write the exploit narrative." The scarce thing is **can a human know what the machine just claimed, and whether to trust it.**
 
 
 
 
48
 
49
+ ## The Five-Field Brief
 
 
 
 
50
 
51
+ Every KIN translation bottoms out in five fields:
52
 
53
+ 1. **Claim** β€” one sentence: what is alleged
54
+ 2. **Blast radius** β€” what breaks if true: data, money, identity, model weights
55
+ 3. **Why the model thinks so** β€” the short generator: CWE, invariant, missing check
56
+ 4. **How to see it yourself** β€” PoC, failing test, command, screenshot of the trace
57
+ 5. **Confidence and what would falsify it** β€” what evidence would disprove the claim
58
 
59
+ Rendered at three altitudes: TL;DR (maintainer), Mechanic (mid engineer), First p
60
+ rinciples (beginner). Same object, different compression ratio.
61
 
62
+ ## Canonical Status
 
 
 
63
 
64
+ This is the canonical KIN model (3B, merged weights). GGUF version at [kin-sft-lora-gguf](https://huggingface.co/nyxspecter4/kin-sft-lora-gguf).
65
 
66
+ ## Quick Start
67
 
68
  ```python
69
  from transformers import pipeline
70
 
71
  messages = [
72
+ {"role": "system", "content": "You are KIN β€” a verification translator. Translate the security claim into a five-field brief: claim, blast radius, why the model thinks so, how to see it yourself, confidence and what would falsify it. If field 4 is missing, refuse to sound sure. Render at TL;DR, mechanic, and first-principles levels."},
73
+ {"role": "user", "content": "<paste PR diff, review comment, or agent trace here>"}
 
 
 
 
 
 
 
 
 
 
 
 
74
  ]
75
 
76
+ pipe = pipeline("text-generation", model="nyxspecter4/kin-sft-lora", device="cuda")
77
  output = pipe(messages, max_new_tokens=512, return_full_text=False)
78
  print(output[0]["generated_text"])
79
  ```
80
 
81
+ ## Ollama (one command)
 
 
 
 
82
 
83
  ```bash
84
+ ollama pull nyxspecter4/kin-sft-lora-gguf:Q4_K_M
85
+ ollama run nyxspecter4/kin-sft-lora-gguf:Q4_K_M
86
  ```
87
 
88
+ ## Critical: System Prompt
89
 
90
+ KIN was trained with a specific verification translator persona. Using a different prompt will degrade quality significantly.
 
 
 
 
 
91
 
92
+ > You are KIN β€” a verification translator. Translate the security claim into a five-field brief: claim, blast radius, why the model thinks so, how to see it yourself, confidence and what would falsify it. If field 4 is missing, refuse to sound sure. Render at TL;DR, mechanic, and first-principles levels.
93
 
94
+ ## Training Details (v1 β€” current shipped weights)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
95
 
96
  | Parameter | Value |
97
  |-----------|-------|
98
+ | Base model | Qwen2.5-3B-Instruct |
99
+ | Method | LoRA SFT + DPO |
100
+ | LoRA rank | 8 |
101
+ | LoRA alpha | 16 |
102
+ | Target modules | q_proj, k_proj, v_proj, o_proj |
103
+ | Training data | 1,635 DPO pairs (verified audit vs vague filing) |
104
+ | Framework | TRL 0.14.0, Transformers 4.48.0 |
105
+ | Merged weights | Yes (6.2GB safetensors) |
106
+ | Temperature | 0.3 recommended |
107
+
108
+ ## v2 Retrain (PENDING β€”
109
+ verification translator expansion)
110
+
111
+ | Parameter | KIN v1 (current) | KIN v2 (target) |
112
+ |-----------|-----------------|-----------------|
113
+ | LoRA rank | 8 | 16 |
114
+ | LoRA alpha | 16 | 32 |
115
+ | Target modules | 4 (attention) | 7 (all-linear) |
116
+ | Training data | 1,635 pairs | ~2,135 pairs (+500 PR review translation) |
117
+ | Pair shape | audit vs vague | brief+check vs jargon |
118
+
119
+ ## The DPO Contrast
120
+
121
+ The training data encodes a single preference: **chosen** = structured audit with root cause, fix, and regression test. **Rejected** = vague filing with guesses and no verification. The v2 expansion adds PR review and bounty report translation pairs with the same contrast.
122
 
123
  ## Limitations
124
 
125
+ - v1 was trained on monk-plugin bug bounty scenarios, not general PR reviews
126
+ - The five-field brief structure is emergent from training, not enforced by architecture
127
+ - Field 4 (replayable check) quality depends on the input containing enough signal
128
+ - The hash seal (diff + brief + test command) is planned for v2, not yet implemented
129
+
130
+ ## License
131
+
132
+ Apache 2.0
133
+ <!-- deploy-trigger: retrigger after @v7 fix -->