OpenIntelligenceNet commited on
Commit
0a59d31
·
verified ·
1 Parent(s): 668ffce

Update model card: tags, training details, limitations

Browse files
Files changed (1) hide show
  1. README.md +168 -0
README.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ base_model: huihui-ai/Huihui-Spark-X2.5-4B-abliterated
8
+ base_model_relation: finetune
9
+ tags:
10
+ - cybersecurity
11
+ - security
12
+ - penetration-testing
13
+ - red-team
14
+ - blue-team
15
+ - vapt
16
+ - osint
17
+ - ctf
18
+ - threat-detection
19
+ - mitre-attack
20
+ - spark
21
+ - abliterated
22
+ - lora-merged
23
+ - text-generation
24
+ - conversational
25
+ - custom_code
26
+ ---
27
+
28
+ # Spark-X-2.5-Cyber
29
+
30
+ **A compact 4B language model fine-tuned for cybersecurity work, with offensive and defensive knowledge in one model you can run yourself.**
31
+
32
+ ![Parameters](https://img.shields.io/badge/parameters-4B-blue)
33
+ ![Training data](https://img.shields.io/badge/training%20data-28k%20security%20examples-informational)
34
+ ![Precision](https://img.shields.io/badge/precision-FP16-lightgrey)
35
+ ![Use](https://img.shields.io/badge/use-authorized%20security%20work-orange)
36
+
37
+ ---
38
+
39
+ ## Overview
40
+
41
+ Spark-X-2.5-Cyber is a fine-tune of [Huihui-Spark-X2.5-4B-abliterated](https://huggingface.co/huihui-ai/Huihui-Spark-X2.5-4B-abliterated). It was trained on **about 28,000 cybersecurity examples** that mix offensive techniques (how attacks work) with defensive ones (how to detect, mitigate and fix them). The LoRA adapter was merged into the base weights, so you load it like any other transformers model.
42
+
43
+ It is built for people who do security work: penetration testers, red and blue teamers, SOC analysts, detection engineers, students and CTF players.
44
+
45
+ ## Why this model exists
46
+
47
+ Understanding attacks is the foundation of defending against them. Yet many hosted AI services are increasingly restrictive about security topics, and legitimate professionals often get refusals or watered-down answers on routine tasks such as explaining an attack technique, reviewing exposure, or writing detection logic.
48
+
49
+ This model is an alternative for those workflows:
50
+
51
+ - **Direct answers** on technical security topics, without constant refusals or hedging.
52
+ - **Private by design.** Run it locally or on your own infrastructure, so sensitive scope documents, logs and findings are not sent to a third-party API.
53
+ - **Offense and defense together.** Training pairs attack mechanics with detection and remediation, which is how real engagements and reports work.
54
+ - **Small and accessible.** At 4B parameters it runs on a single modest GPU.
55
+
56
+ ## Intended use
57
+
58
+ - Authorized penetration tests, red team exercises and VAPT engagements
59
+ - Learning, teaching and CTF practice
60
+ - Detection engineering, threat hunting and incident-response support
61
+ - Security report drafting and attack-surface review
62
+ - Mapping techniques to MITRE ATT&CK
63
+
64
+ **Out of scope:** attacking systems you do not own or have written permission to test, targeting individuals, or any unlawful activity. See "Responsible use" below.
65
+
66
+ ## Example topics
67
+
68
+ | Area | Examples |
69
+ |---|---|
70
+ | Active Directory | Kerberoasting mechanics, SPN enumeration, TGS-REQ anomaly detection |
71
+ | Web and cloud | Blind SSRF, IMDSv1 vs IMDSv2, architectural remediation |
72
+ | Reconnaissance | Passive OSINT, certificate transparency, attack-surface mapping |
73
+ | Social engineering | Authorized phishing simulations, SPF/DKIM/DMARC checks |
74
+ | Lateral movement | Pass-the-Hash, Overpass-the-Hash, Pass-the-Ticket, ATT&CK technique IDs |
75
+
76
+ ## Quickstart
77
+
78
+ ```bash
79
+ pip install torch transformers accelerate
80
+ ```
81
+
82
+ ```python
83
+ import torch
84
+ from transformers import AutoTokenizer, AutoModelForCausalLM
85
+
86
+ model_id = "OpenIntelligenceNet/Spark-X-2.5-Cyber"
87
+
88
+ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
89
+ model = AutoModelForCausalLM.from_pretrained(
90
+ model_id, torch_dtype=torch.float16, trust_remote_code=True
91
+ ).to("cuda").eval()
92
+
93
+ messages = [{"role": "user", "content": "Explain how defenders detect Kerberoasting."}]
94
+ text = tokenizer.apply_chat_template(
95
+ messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
96
+ )
97
+ inputs = tokenizer(text, return_tensors="pt").to("cuda")
98
+
99
+ with torch.no_grad():
100
+ out = model.generate(
101
+ **inputs,
102
+ max_new_tokens=2048,
103
+ do_sample=True,
104
+ temperature=1.0,
105
+ top_p=0.95,
106
+ top_k=0,
107
+ repetition_penalty=1.05,
108
+ pad_token_id=tokenizer.pad_token_id or tokenizer.eos_token_id,
109
+ )
110
+
111
+ raw = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
112
+ answer = raw.split("</think>")[-1] # drop the reasoning block, if present
113
+ for tok in set(tokenizer.all_special_tokens):
114
+ answer = answer.replace(tok, "")
115
+ print(answer.strip())
116
+ ```
117
+
118
+ ### Recommended settings
119
+
120
+ | Setting | Value | Note |
121
+ |---|---|---|
122
+ | temperature | 1.0 | Spark-X2.5 recommendation |
123
+ | top_p | 0.95 | Spark-X2.5 recommendation |
124
+ | top_k | 0 (disabled) | `-1` in vLLM / SGLang |
125
+ | repetition_penalty | 1.05 | Our addition to reduce loops; the base model uses 1.0 |
126
+ | thinking mode | on | Better for hard, multi-step questions; use a high `max_new_tokens` |
127
+
128
+ Low temperatures (around 0.3) tend to cause repetition loops on this model family, so stay close to the values above.
129
+
130
+ ## Hardware
131
+
132
+ Roughly 9 GB of VRAM in FP16, so it fits on a Tesla T4 or most consumer GPUs with 12 GB or more. These are estimates and depend on context length and settings.
133
+
134
+ ## Training details
135
+
136
+ | | |
137
+ |---|---|
138
+ | Base model | Huihui-Spark-X2.5-4B-abliterated |
139
+ | Method | LoRA fine-tuning, merged into the base weights |
140
+ | Data | About 28,000 cybersecurity examples, mixed offensive and defensive |
141
+ | Release precision | FP16 |
142
+
143
+ Further details about the dataset and training hyperparameters are not published.
144
+
145
+ ## Limitations
146
+
147
+ - **It can be wrong.** Like every language model, it can state incorrect or invented facts with confidence, including commands, tool flags, CVE numbers, registry paths and ATT&CK technique IDs. Verify everything before using it in an engagement or a report.
148
+ - **Small model.** At 4B parameters it has less depth and reliability than large frontier models, especially on novel, multi-stage or highly specialized problems.
149
+ - **No live knowledge.** It does not know about vulnerabilities, tools or techniques published after its training data was collected, and it cannot browse or scan anything.
150
+ - **Not formally benchmarked.** We have not published benchmark results for this fine-tune. Quality was assessed with manual spot checks only.
151
+ - **Weak safety guardrails.** The base model is abliterated, so it will not reliably refuse harmful or out-of-scope requests. Safeguards are your responsibility.
152
+ - **Generated code needs review.** Treat any script or payload as untested. Review and sandbox it before running.
153
+ - **Repetition and long outputs.** It can loop or ramble if sampled too conservatively; use the recommended settings.
154
+ - **Long context is untested.** The base architecture supports very long contexts, but this fine-tune was not specifically trained or evaluated for them.
155
+ - **FP16 numerics.** The base weights were released in bf16. FP16 works on most GPUs such as the T4, but report any `nan` or garbled output.
156
+ - **English-focused.** Training data was cybersecurity content in English; other languages are not evaluated.
157
+ - **No legal or compliance advice.** It does not replace a qualified professional or your rules of engagement.
158
+
159
+
160
+ ## Credits
161
+
162
+ - Base architecture and training: the Spark-X2.5 team (XHToken / SparkLLM)
163
+ - Abliterated base model: [huihui-ai](https://huggingface.co/huihui-ai)
164
+ - Cybersecurity fine-tune: OpenIntelligenceNet
165
+
166
+ ## Feedback
167
+
168
+ Found an error, a failure case or something that should be improved? Open a discussion in the Community tab.