Text Generation
Transformers
Safetensors
GGUF
English
qwen2
cybersecurity
security
verification
code-review
bug-bounty
PR-review
agent-trace
vulnerability
CVE
SOC
DFIR
threat-intelligence
incident-response
MITRE-ATT&CK
OWASP
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use nyxspecter4/kin-cybersecurity-3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nyxspecter4/kin-cybersecurity-3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nyxspecter4/kin-cybersecurity-3b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nyxspecter4/kin-cybersecurity-3b") model = AutoModelForCausalLM.from_pretrained("nyxspecter4/kin-cybersecurity-3b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use nyxspecter4/kin-cybersecurity-3b 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 nyxspecter4/kin-cybersecurity-3b:Q4_K_M # Run inference directly in the terminal: llama cli -hf nyxspecter4/kin-cybersecurity-3b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf nyxspecter4/kin-cybersecurity-3b:Q4_K_M # Run inference directly in the terminal: llama cli -hf nyxspecter4/kin-cybersecurity-3b: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 nyxspecter4/kin-cybersecurity-3b:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf nyxspecter4/kin-cybersecurity-3b: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 nyxspecter4/kin-cybersecurity-3b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf nyxspecter4/kin-cybersecurity-3b:Q4_K_M
Use Docker
docker model run hf.co/nyxspecter4/kin-cybersecurity-3b:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use nyxspecter4/kin-cybersecurity-3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nyxspecter4/kin-cybersecurity-3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyxspecter4/kin-cybersecurity-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nyxspecter4/kin-cybersecurity-3b:Q4_K_M
- SGLang
How to use nyxspecter4/kin-cybersecurity-3b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "nyxspecter4/kin-cybersecurity-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyxspecter4/kin-cybersecurity-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "nyxspecter4/kin-cybersecurity-3b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyxspecter4/kin-cybersecurity-3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use nyxspecter4/kin-cybersecurity-3b with Ollama:
ollama run hf.co/nyxspecter4/kin-cybersecurity-3b:Q4_K_M
- Unsloth Desktop
- Pi
How to use nyxspecter4/kin-cybersecurity-3b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nyxspecter4/kin-cybersecurity-3b: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": "nyxspecter4/kin-cybersecurity-3b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use nyxspecter4/kin-cybersecurity-3b with Docker Model Runner:
docker model run hf.co/nyxspecter4/kin-cybersecurity-3b:Q4_K_M
- Lemonade
How to use nyxspecter4/kin-cybersecurity-3b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull nyxspecter4/kin-cybersecurity-3b:Q4_K_M
Run and chat with the model
lemonade run user.kin-cybersecurity-3b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use nyxspecter4/kin-cybersecurity-3b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nyxspecter4/kin-cybersecurity-3b: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 nyxspecter4/kin-cybersecurity-3b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use nyxspecter4/kin-cybersecurity-3b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf nyxspecter4/kin-cybersecurity-3b: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 "nyxspecter4/kin-cybersecurity-3b: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"
#898 deploy upgraded model card v5
Browse files
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 |
-
|
| 25 |
-
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
---
|
| 29 |
|
| 30 |
-
# KIN β
|
| 31 |
|
| 32 |
-
KIN
|
| 33 |
|
| 34 |
-
**No check, no confidence.**
|
| 35 |
|
| 36 |
-
##
|
| 37 |
|
| 38 |
-
|
| 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 |
-
|
| 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 |
-
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
-
|
| 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 |
-
##
|
| 67 |
|
| 68 |
```python
|
| 69 |
from transformers import pipeline
|
| 70 |
|
| 71 |
messages = [
|
| 72 |
-
{
|
| 73 |
-
|
| 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",
|
| 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 |
-
|
| 101 |
-
ollama run
|
| 102 |
```
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
-
|
| 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 |
-
|
| 114 |
|
| 115 |
-
|
| 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
|
| 135 |
-
| Method | LoRA SFT + DPO
|
| 136 |
-
| LoRA
|
| 137 |
-
|
|
| 138 |
-
|
|
| 139 |
-
|
| 140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
## Limitations
|
| 143 |
|
| 144 |
-
-
|
| 145 |
-
- The five-field brief is
|
| 146 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 -->
|