RedSage employs a multi-stage training pipeline. This model represents the output of Stage 4.
The model was aligned using the following high-quality preference dataset to ensure robust instruction following and general reasoning:
Use the standard chat template for inference.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "RISys-Lab/RedSage-Qwen3-8B-DPO"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto"
11)
12
13# Define the chat messages
14messages = [
15 {"role": "system", "content": "You are RedSage, a helpful cybersecurity assistant."},
16 {"role": "user", "content": "Analyze the following log entry for potential indicators of compromise: 'POST /cgi-bin/test-cgi?* HTTP/1.1'"}
17]
18
19# Apply chat template
20text = tokenizer.apply_chat_template(
21 messages,
22 tokenize=False,
23 add_generation_prompt=True
24)
25
26inputs = tokenizer(text, return_tensors="pt").to(model.device)
27
28outputs = model.generate(**inputs, max_new_tokens=512)
29print(tokenizer.decode(outputs[0], skip_special_tokens=True))
1@inproceedings{suryanto2026redsage,
2 title={RedSage: A Cybersecurity Generalist {LLM}},
3 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},
4 booktitle={The Fourteenth International Conference on Learning Representations},
5 year={2026},
6 url={https://openreview.net/forum?id=W4FAenIrQ2}
7}