Spark-X-2.5-Cyber

A compact 4B language model fine-tuned for cybersecurity work, with offensive and defensive knowledge in one model you can run yourself.

Parameters Training data Precision Use


Overview

Spark-X-2.5-Cyber is a fine-tune of 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.

It is built for people who do security work: penetration testers, red and blue teamers, SOC analysts, detection engineers, students and CTF players.

Why this model exists

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.

This model is an alternative for those workflows:

  • Direct answers on technical security topics, without constant refusals or hedging.
  • 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.
  • Offense and defense together. Training pairs attack mechanics with detection and remediation, which is how real engagements and reports work.
  • Small and accessible. At 4B parameters it runs on a single modest GPU.

Intended use

  • Authorized penetration tests, red team exercises and VAPT engagements
  • Learning, teaching and CTF practice
  • Detection engineering, threat hunting and incident-response support
  • Security report drafting and attack-surface review
  • Mapping techniques to MITRE ATT&CK

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.

Example topics

Area Examples
Active Directory Kerberoasting mechanics, SPN enumeration, TGS-REQ anomaly detection
Web and cloud Blind SSRF, IMDSv1 vs IMDSv2, architectural remediation
Reconnaissance Passive OSINT, certificate transparency, attack-surface mapping
Social engineering Authorized phishing simulations, SPF/DKIM/DMARC checks
Lateral movement Pass-the-Hash, Overpass-the-Hash, Pass-the-Ticket, ATT&CK technique IDs

Quickstart

pip install torch transformers accelerate
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "OpenIntelligenceNet/Spark-X-2.5-Cyber"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id, torch_dtype=torch.float16, trust_remote_code=True
).to("cuda").eval()

messages = [{"role": "user", "content": "Explain how defenders detect Kerberoasting."}]
text = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
)
inputs = tokenizer(text, return_tensors="pt").to("cuda")

with torch.no_grad():
    out = model.generate(
        **inputs,
        max_new_tokens=2048,
        do_sample=True,
        temperature=1.0,
        top_p=0.95,
        top_k=0,
        repetition_penalty=1.05,
        pad_token_id=tokenizer.pad_token_id or tokenizer.eos_token_id,
    )

raw = tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
answer = raw.split("</think>")[-1]          # drop the reasoning block, if present
for tok in set(tokenizer.all_special_tokens):
    answer = answer.replace(tok, "")
print(answer.strip())

Recommended settings

Setting Value Note
temperature 1.0 Spark-X2.5 recommendation
top_p 0.95 Spark-X2.5 recommendation
top_k 0 (disabled) -1 in vLLM / SGLang
repetition_penalty 1.05 Our addition to reduce loops; the base model uses 1.0
thinking mode on Better for hard, multi-step questions; use a high max_new_tokens

Low temperatures (around 0.3) tend to cause repetition loops on this model family, so stay close to the values above.

Hardware

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.

Training details

Base model Huihui-Spark-X2.5-4B-abliterated
Method LoRA fine-tuning, merged into the base weights
Data About 28,000 cybersecurity examples, mixed offensive and defensive
Release precision FP16

Further details about the dataset and training hyperparameters are not published.

Limitations

  • 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.
  • Small model. At 4B parameters it has less depth and reliability than large frontier models, especially on novel, multi-stage or highly specialized problems.
  • 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.
  • Not formally benchmarked. We have not published benchmark results for this fine-tune. Quality was assessed with manual spot checks only.
  • Weak safety guardrails. The base model is abliterated, so it will not reliably refuse harmful or out-of-scope requests. Safeguards are your responsibility.
  • Generated code needs review. Treat any script or payload as untested. Review and sandbox it before running.
  • Repetition and long outputs. It can loop or ramble if sampled too conservatively; use the recommended settings.
  • Long context is untested. The base architecture supports very long contexts, but this fine-tune was not specifically trained or evaluated for them.
  • 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.
  • English-focused. Training data was cybersecurity content in English; other languages are not evaluated.
  • No legal or compliance advice. It does not replace a qualified professional or your rules of engagement.

Credits

  • Base architecture and training: the Spark-X2.5 team (XHToken / SparkLLM)
  • Abliterated base model: huihui-ai
  • Cybersecurity fine-tune: OpenIntelligenceNet

Feedback

Found an error, a failure case or something that should be improved? Open a discussion in the Community tab.

Downloads last month
-
Safetensors
Model size
4B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OpenIntelligenceNet/Spark-X-2.5-Cyber

Collection including OpenIntelligenceNet/Spark-X-2.5-Cyber