CoolFace
Modelpublic

RISys-Lab/RedSage-Qwen3-8B-Ins

sourceHugging Faceupdated 8mo agoView on Hugging Face
3likes653downloads
Model Card

RedSage-Qwen3-8B-Ins

<div align="center"> <img src="https://img.shields.io/badge/Task-Cybersecurity-red" alt="Cybersecurity"> <img src="https://img.shields.io/badge/Stage-SupervisedFineTuning-blue" alt="SFT"> </div>

<!-- datasets:

  • naufalso/redsage_conv
  • naufalso/smoltalk2nonthinking -->

Model Summary

RedSage-Qwen3-8B-Ins is the instruction-tuned variant of the RedSage cybersecurity LLM series. Unlike the base models, this model is optimized for chat interaction, question answering, and tool use.

It is fine-tuned on RedSage-Conv, a dataset of ~266K multi-turn cybersecurity dialogues generated via an agentic augmentation pipeline, alongside general instruction data to maintain broad capabilities.

Intended Use

This model is designed for:

  • Interactive Cybersecurity Assistance: Answering questions about frameworks (MITRE, OWASP), offensive techniques, and defense strategies.
  • Tool Usage & Explanation: Generating and explaining commands for tools like nmap, sqlmap, and metasploit.
  • Educational Support: Providing detailed explanations of vulnerabilities and remediation steps.

Note: While this model is instruction-tuned, it has not yet undergone Direct Preference Optimization (DPO). For the final aligned version, please see RedSage-Qwen3-8B-DPO.

Training Lineage

RedSage employs a multi-stage training pipeline. This model represents the output of Stage 3.

  1. 1.Stage 1: Continual Pre-Training (CPT) -> RedSage-Qwen3-8B-CFW
  2. 2.Stage 2: Targeted Pre-Training -> RedSage-Qwen3-8B-Base
  3. 3.Stage 3: Supervised Fine-Tuning (SFT) -> `RedSage-Qwen3-8B-Ins` (Current Model)
  4. 4.Data: RedSage-Conv (266K samples) + General SFT Data (SmolTalk2)
  5. 5.Stage 4: Direct Preference Optimization (DPO) -> RedSage-Qwen3-8B-DPO

Training Data

The model was trained on a mix of domain-specific and general instruction data:

  1. 1.RedSage-Conv (~266K samples): A high-quality dataset generated using an Agentic Augmentation Pipeline.
  2. 2.Source: Derived from the curated RedSage-Seed (MITRE, Write-ups, Manuals).
  3. 3.Method: A Planner Agent and Augmenter Agent transformed static knowledge into realistic, multi-turn roleplay scenarios (e.g., Junior Analyst vs. Senior Mentor, Red Team planning).
  4. 4.Coverage: Includes Knowledge (General/Frameworks), Skills (Offensive), and Tools (CLI/Kali).
  5. 5.SmolTalk2 (General Instructions): A curated subset (non-reasoning) of SmolTalk2 to ensure the model retains general instruction-following abilities (summarization, creative writing, etc.).

Performance

RedSage-Qwen3-8B-Ins achieves state-of-the-art results among 8B cybersecurity models, significantly outperforming general instruct models and prior domain-specific models.

RedSage-MCQ (0-shot Accuracy)

CategoryQwen3-8B (Non-reasoning)**RedSage-8B-Ins**
Macro Average81.8585.73
Knowledge (Gen)80.4684.20
Knowledge (Frameworks)78.8284.98
Skill (Offensive)86.1689.06
Tools (CLI)83.9286.80
Tools (Kali)75.5680.30

External Cybersecurity Benchmarks (0-shot)

BenchmarkQwen3-8B (Non-reasoning)**RedSage-8B-Ins**
Mean75.7181.30
CTI-Bench (MCQ)62.7670.56
CTI-Bench (RCM)54.0076.70
CyberMetric (500)88.6089.80
MMLU (Security)76.0078.00
SecBench (En)73.2679.91
SecEval (MCQ)65.4672.48
SECURE (CWET)88.1191.45
SECURE (KCV)87.4281.34
SECURE (MEAT)85.7591.47

OpenLLM Leaderboard (General Benchmark)

BenchmarkQwen3-8B (Non-reasoning)**RedSage-8B-Ins**
Mean65.9273.34
MMLU73.5977.38
ARC-C62.5469.62
GSM8K75.6686.05
HellaSwag56.7079.00
TruthfulQA45.2347.75
WinoGrande62.5173.64
IFEval85.2179.97

Usage

This model uses a standard ChatML-like format.

Prompt Template

<|im_start|>system
You are REDSAGE, a cybersecurity-tuned model developed by RISys-Lab. You are a helpful assistant.<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant

Inference Code

python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "RISys-Lab/RedSage-Qwen3-8B-Ins"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

messages = [
    {"role": "system", "content": "You are REDSAGE, a cybersecurity-tuned model developed by RISys-Lab. You are a helpful assistant."},
    {"role": "user", "content": "Explain how an SQL injection attack 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("cuda")

outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Training Procedure

The model was fine-tuned using Axolotl.

  • Epochs: 2
  • Learning Rate: 2.5e-5 (Cosine schedule)
  • Warmup Ratio: 0.01
  • Optimizer: AdamW
  • Chat Template: Jinja (ChatML format)

Ethics and Limitations

  • Offensive Content: This model has been trained on offensive security materials (exploits, attack vectors). It is provided for educational and defensive purposes (e.g., vulnerability assessment).
  • Accuracy: While highly capable, the model may still produce hallucinations or inaccurate commands. Always verify commands in a safe, isolated environment (sandbox) before execution.
  • Safety: Developers should implement additional safety layers (e.g., Guardrails) if deploying this model in user-facing applications to prevent misuse.

Citation

bibtex
@inproceedings{suryanto2026redsage,
  title={RedSage: A Cybersecurity Generalist LLM},
  author={Naufal Suryanto and Muzammal Naseer and Pengfei Li and Syed Talal Wasim and Jinhui Yi and Juergen Gall and Paolo Ceravolo and Ernesto Damiani},
  booktitle={The Fourteenth International Conference on Learning Representations},
  year={2026},
  url={[https://openreview.net/forum?id=W4FAenIrQ2](https://openreview.net/forum?id=W4FAenIrQ2)}
}