DexopT/Qwen3-4B-Cybersecurity
<div align="center">
<picture> <source media="(prefers-color-scheme: dark)" srcset="https://huggingface.co/datasets/Qwen/documentation-images/resolve/main/Qwen-logoWhite.png"> <source media="(prefers-color-scheme: light)" srcset="https://huggingface.co/datasets/Qwen/documentation-images/resolve/main/Qwen-logoBlack.png"> <img alt="Qwen Logo" src="https://huggingface.co/datasets/Qwen/documentation-images/resolve/main/Qwen-logo_Black.png" width="180"/> </picture>
Qwen3-4B-Cybersecurity
Qwen3-4B fine-tuned on 1.28M cybersecurity samples
    [](https://apache.org/licenses/LICENSE-2.0)
</div>
๐ช Abliterated (refusal-removed) version: DexopT/Qwen3-4B-Cybersecurity-Heretic-16bit
Model Description
Qwen3-4B-Cybersecurity is a fine-tuned version of Qwen3-4B-Instruct-2507 specialized in cybersecurity topics including offensive security, penetration testing, vulnerability analysis, malware analysis, and threat intelligence.
Trained with Unsloth SFT on a curated dataset of 1,284,369 samples covering:
- ๐ด Offensive Security โ SQL injection, XSS, buffer overflows, reverse shells
- ๐ต Defensive Security โ CVE analysis, incident response, hardening
- ๐ก Network Security โ MITM, ARP spoofing, DNS poisoning, DDoS
- ๐ข Active Directory โ Kerberoasting, Pass-the-Hash, Golden Ticket attacks
- โซ Malware Analysis โ Ransomware, rootkits, persistence techniques
- ๐ฃ Web Security โ SSRF, XXE, CSRF, LFI/RFI, deserialization
Model Family
Training Details
Datasets
Dataset sources include .jsonl, .json, .csv, .parquet, and .arrow formats from multiple cybersecurity repositories, converted to unified OpenAI messages format.
Usage
Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"DexopT/Qwen3-4B-Cybersecurity",
torch_dtype=torch.float16,
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("DexopT/Qwen3-4B-Cybersecurity")
messages = [
{"role": "system", "content": "You are an expert cybersecurity assistant."},
{"role": "user", "content": "Explain how SQL injection works and how to prevent it."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, top_p=0.8)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))MLX (Apple Silicon)
pip install mlx-lm
mlx_lm.convert \
--hf-path DexopT/Qwen3-4B-Cybersecurity \
--mlx-path ~/models/qwen3-cyber-mlx \
--quantize --q-bits 8
mlx_lm.chat --model ~/models/qwen3-cyber-mlxLM Studio / llama.cpp / Ollama
Use the GGUF version: DexopT/Qwen3-4B-Cybersecurity-GGUF
Refusal Behavior
This model retains some of the original refusal behavior from the base Qwen3 model. For a version with refusal directions removed via Heretic abliteration, see:
๐ช DexopT/Qwen3-4B-Cybersecurity-Heretic-16bit
โ ๏ธ Disclaimer
This model is intended for educational and research purposes only. Use responsibly and only on systems you have explicit permission to test. The authors are not responsible for any misuse.
