Qwen3.5-0.8B — Slips IDS Security Summarization
Model Description
A fine-tuned version of Qwen3.5-0.8B specialized for translating technical network security events from Slips IDS into clear, human-readable incident summaries with severity assessments.
Slips is a network intrusion detection system that generates DAG-structured alert logs — chains of related security events per source IP per time window. Raw Slips output is highly technical and difficult to interpret quickly. This model translates those logs into structured, concise summaries grouped by event type, with per-event severity labels (CRITICAL / HIGH / MEDIUM / LOW / INFO) and an overall severity breakdown.
This is the small-device version of stratosphere/qwen2.5-1.5b-slips-immune-summarization: same training data, same prompt and same hyperparameters, at about half the size. Under the same LLM-as-judge evaluation it scores on par with the 1.5B model, and it runs on a Raspberry Pi 5 at about one minute per incident summary (see Evaluation).
The model was fine-tuned using SFT (Supervised Fine-Tuning) with best-of-N response selection: for each training incident, the highest-scoring response (judged by an LLM-as-judge) among GPT-4o, GPT-4o-mini, Qwen2.5 3B, and Qwen2.5 1.5B was selected as ground truth.
Files
| File | Use |
|---|---|
model.safetensors-00001-of-00001.safetensors + config/tokenizer | Full-precision (BF16) weights for Transformers |
gguf/qwen3.5-0.8b-slips-immune-summarization-Q4_K_M.gguf | 529 MB — recommended for Raspberry Pi and other CPUs |
gguf/qwen3.5-0.8b-slips-immune-summarization-Q5_K_M.gguf | 578 MB |
gguf/qwen3.5-0.8b-slips-immune-summarization-Q8_0.gguf | 812 MB — avoids a rare repetition loop seen with Q4/Q5 (see Known Limitations) |
config.yaml | Training configuration |
The checkpoint keeps the base model's (untrained) vision encoder so it loads as a standard Qwen3.5 checkpoint; AutoModelForCausalLM loads only the 0.75B-parameter language model. The GGUF files contain the language model only.
Quick Start
llama.cpp (recommended for local and edge deployment)
hf download stratosphere/qwen3.5-0.8b-slips-immune-summarization \
gguf/qwen3.5-0.8b-slips-immune-summarization-Q4_K_M.gguf --local-dir .
llama-server -m gguf/qwen3.5-0.8b-slips-immune-summarization-Q4_K_M.gguf \
-c 8192 -n 1024 --temp 0 -fa off --port 8080
Then send the prompt below as a single user message to http://localhost:8080/v1/chat/completions. The chat template embedded in the GGUF adds the default system prompt automatically.
On CPU-only devices such as the Raspberry Pi 5, keep flash attention off (-fa off): with -fa auto (the default) llama.cpp enables it, and on the Pi's CPU it slows generation on long prompts.
Python (Transformers)
Requires a recent Transformers release with Qwen3.5 support (tested with 5.17). The prompt is a single user message with the instructions and the DAG combined, with the incident metadata (taken from the DAG header) filled in both in the metadata block and in the output-format header; the chat template adds the default Qwen system prompt (You are Qwen, created by Alibaba Cloud. You are a helpful assistant.), as during training and evaluation.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "stratosphere/qwen3.5-0.8b-slips-immune-summarization"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
dag_input = """
============================================================
Incident: abc123
Source IP: 192.168.1.100 | Timewindow: 5
Timeline: 2024-01-15 14:00:00 to 2024-01-15 15:00:00
Threat Level: 8.5 | Events: 42
...
""" # paste your Slips DAG analysis here
user_message = f"""You are a security analyst. Your task is to translate technical security events into clear, concise, human-readable summaries and assess their severity.
INCIDENT METADATA:
- Incident ID: abc123
- Source IP: 192.168.1.100
- Timewindow: 5
- Accumulated Threat Level: 8.5
- Time Range: 2024-01-15 14:00:00 to 2024-01-15 15:00:00
- Total Events: 42
RAW EVENTS (Time | Description):
{dag_input}
YOUR TASK:
1. Transform the technical event descriptions into clear, readable summaries using plain language
2. Group identical or very similar events (e.g., 24 identical connections → one summary line)
3. Assess the severity of each event/group based on security impact:
- CRITICAL: Active exploitation, data exfiltration, confirmed malware C2
- HIGH: Scanning, suspicious connections, potential threats
- MEDIUM: Anomalous but potentially benign behavior
- LOW: Minor issues, likely false positives
- INFO: Informational events, normal network behavior
4. Calculate the overall severity breakdown based on your assessments
OUTPUT FORMAT (match this structure exactly):
============================================================
Incident: abc123
Source IP: 192.168.1.100 | Timewindow: 5
Timeline: 2024-01-15 14:00:00 to 2024-01-15 15:00:00
Threat Level: 8.5 | Events: 42
• HH:MM-HH:MM - [Your clear grouped summary] [YOUR_ASSESSED_SEVERITY]
• HH:MM - [Your clear summary] [YOUR_ASSESSED_SEVERITY]
Total Evidence: 42 events
Severity breakdown: [Your calculated breakdown, e.g., "High: 5, Medium: 3, Info: 2"]
EXAMPLES OF GOOD SUMMARIZATION WITH SEVERITY ASSESSMENT:
- "Connection on port 0 from 0.0.0.0:0 to 224.0.0.1:0" → "IGMP multicast traffic to group address [INFO]"
- "Detected a horizontal port scan to port 443/TCP. 50 unique dst IPs" → "Port scanning 50 hosts on HTTPS port [HIGH]"
- "Connection to known C2 server 185.29.135.234:443" → "Direct connection to command & control server [CRITICAL]"
- "Connection without DNS resolution to CDN IP" → "Direct IP connection (likely CDN/API) [LOW]"
RULES:
- Group identical events into ONE line (don't list the same event 24 times)
- Use time ranges (HH:MM-HH:MM) when showing grouped events
- Assess severity based on security impact, not just event type
- Use severity levels: CRITICAL, HIGH, MEDIUM, LOW, INFO
- Keep descriptions clear and concise
- Just output the structured summary - no explanations or meta-commentary
- Do not include token counts or performance statistics"""
messages = [{"role": "user", "content": user_message}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True, return_dict=True).to(model.device)
output = model.generate(**inputs, max_new_tokens=1024, do_sample=False)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
For faster GPU inference, install the optional flash-linear-attention and causal-conv1d packages; without them Transformers uses slower reference kernels for Qwen3.5's linear-attention layers.
LoRA Adapter
The LoRA adapter itself (r=64, alpha 64, RSLoRA, ~41M parameters) is in lora_adapter/, for inspection or further fine-tuning. It was trained on unsloth/Qwen3.5-0.8B loaded in 4-bit (QLoRA). The published weights are this adapter merged into the dequantized 4-bit base; for this model, merging it into the original 16-bit base instead gives the same judge score within noise (BF16: 17.51 published vs 18.19).
Training Details
Dataset
The training data is publicly available at stratosphere/immune-summary-sft-dataset. It is the same data used for the Qwen2.5-1.5B model.
- Source: 532 incidents from real Slips IDS network captures
- Responses: 4 model responses per incident (GPT-4o, GPT-4o-mini, Qwen2.5 3B, Qwen2.5 1.5B) used as candidate labels, scored by an LLM-as-judge
- Selection: Best-of-N — highest-scoring response per incident used as training target
- Split: 461 train / 52 eval records; records longer than the 4096-token sequence length are dropped, leaving 299 / 34 used
Training Procedure
| Parameter | Value |
|---|---|
| Base model | unsloth/Qwen3.5-0.8B |
| Training method | SFT (Supervised Fine-Tuning) |
| Framework | Unsloth + TRL SFTTrainer |
LoRA rank (r) | 64 |
| LoRA alpha | 64 |
| LoRA dropout | 0.0 |
| RSLoRA | enabled (required at r=64) |
| LoRA targets | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, plus the linear-attention projections in_proj_qkv, in_proj_z, out_proj (18 of the 24 layers use linear attention) |
| Trainable parameters | 40.9M |
| Sequence length | 4096 |
| Batch size | 1 (effective: 16 via gradient accumulation) |
| Learning rate | 2e-5, cosine, 20 warmup steps |
| Weight decay | 0.01 |
| Epochs | 3 (57 steps) |
| Optimizer | adamw_8bit |
| Precision | BF16 |
| Quantization (training) | 4-bit (QLoRA) |
| Chat format | Qwen2.5 ChatML (no thinking tags) |
| Response masking | train_on_responses_only — loss computed on assistant turns only |
| Final eval loss | 0.178 (Qwen2.5-1.5B: 0.196) |
Merge. The LoRA adapter was trained on a 4-bit quantized base. The published weights merge it into the dequantized 4-bit base, i.e. the exact weights the adapter was trained against, rather than into the original 16-bit base. Which merge works better depends on the model: for this model both score the same in BF16 (17.51 dequantized vs 18.19 original), while for Qwen2.5-1.5B the dequantized merge is clearly better at full precision (21.94 vs 16.13).
Framework Versions
- Unsloth: 2026.10.8
- TRL: 1.15.0
- Transformers: 5.17.0
- PyTorch: 2.14.1
Evaluation
Evaluated on 47 held-out Slips IDS incidents (45 Malware, 2 Normal) with gpt-oss-120b as an independent LLM-as-judge, temperature 0. The judge scores each answer on its own (pointwise) against four criteria of 1–10 each: evidence coverage, severity assessment, grouping and conciseness, translation clarity (total out of 40). Summaries that leave template text unfilled (e.g. [YOUR_ASSESSED_SEVERITY]) are penalized.
Overall Results (out of 40)
| Model | Summary score |
|---|---|
| Qwen2.5-1.5B finetuned, dequantized merge, BF16 (not published) | 21.94 |
| GPT-4o-mini | 20.74 |
| GPT-4o | 19.53 |
| Qwen2.5-1.5B finetuned, GGUF Q8_0 | 19.02 |
| Qwen3.5-0.8B finetuned, GGUF Q8_0 | 17.91 |
| Qwen3.5-0.8B finetuned, GGUF Q4_K_M | 17.81 |
| Qwen3.5-0.8B finetuned, BF16 (these weights) | 17.51 |
| Qwen2.5-1.5B finetuned (4-bit adapter, as trained) | 17.49 |
| Qwen2.5-1.5B finetuned, GGUF Q5_K_M | 17.45 |
| Qwen3.5-0.8B finetuned (4-bit adapter, as trained) | 17.38 |
| Qwen3.5-0.8B finetuned, GGUF Q5_K_M | 16.79 |
| Qwen3.5-0.8B (base, untuned) | 15.96 |
| Qwen2.5-1.5B finetuned, GGUF Q4_K_M | 15.77 |
| Qwen2.5-1.5B (base, untuned) | 11.19 |
Once quantized, the 0.8B model is on par with the 1.5B model at half the size, and it is the more stable of the two across quantization levels (16.8–17.9 vs 15.8–19.0). It loses nothing to quantization: 17.51 in BF16 and 16.8–17.9 as GGUF. The 1.5B model scores higher at full precision (21.94 in BF16 with the dequantized merge) but loses up to 6 points when quantized for CPU deployment.
Per Criterion (mean, 1–10)
| Model | Evidence coverage | Severity assessment | Grouping & conciseness | Translation clarity |
|---|---|---|---|---|
| Qwen3.5-0.8B finetuned, Q4_K_M | 2.87 | 3.60 | 4.94 | 6.40 |
| Qwen3.5-0.8B (base, untuned) | 5.09 | 3.11 | 3.96 | 3.81 |
Fine-tuning trades some evidence coverage for much clearer, better grouped summaries with better severity labels; the base model tends to copy the raw events.
Speed on a Raspberry Pi 5
Raspberry Pi 5 (8 GB RAM, 4 Cortex-A76 cores, no GPU), 5 median-length incidents (~2,300 input tokens), 8,192-token context, temperature 0. Same GGUF files and identical prompts in both runtimes.
| Quantization | llama.cpp | Ollama 0.19 | Peak RAM (llama.cpp) |
|---|---|---|---|
| Q4_K_M | 66 s per summary (prompt 96 tok/s, generation 10.5 tok/s) | 151 s | 1.6 GB |
| Q5_K_M | 76 s | 163 s | 1.7 GB |
| Q8_0 | 60 s (prompt 117 tok/s, generation 8.1 tok/s) | 141 s | 2.1 GB |
llama.cpp was measured with its default -fa auto. Turning flash attention off (-fa off) raises generation speed on the Pi by about 15–20% for this model (llama-bench, 2,048-token context: 13.0 vs 11.2 tok/s).
Qwen3.5-0.8B uses a hybrid architecture where only 6 of its 24 layers keep a growing KV cache, so its speed drops very little on long incidents (13.7 → 13.0 tok/s from an empty context to 2,048 tokens), unlike Qwen3-0.6B (23.6 → 13.3 tok/s).
Known Limitations
- Repetition loop on very repetitive incidents: on one of the 47 test incidents (many near-identical reconnection events), the Q4_K_M and Q5_K_M builds repeat the same bullet until the 1,024-token limit; Q8_0 does not. Keep an output limit (
-n 1024/max_new_tokens). - Long incidents: training used a 4096-token sequence length; incidents with thousands of events produce DAGs that exceed this, and quality drops on them. Inference works up to 8,192 tokens, but very long incidents take several minutes on a Raspberry Pi.
- Normal traffic: only 2 Normal incidents in the test set — results for that category are not statistically reliable.
Intended Use
- Automated triage of Slips IDS alerts for security analysts
- First-pass summarization of network incident logs on edge devices (Raspberry Pi, small servers)
- Input to downstream reporting or ticketing workflows
Out-of-Scope Use
- General-purpose chat or instruction following
- Image or video input (the vision encoder was not trained)
- Security domains outside network IDS (malware analysis, vulnerability scanning, etc.)
- Non-English inputs
Citation
@misc{qwen3.5-0.8b-slips-immune-summarization,
title = {Qwen3.5-0.8B fine-tuned for Slips IDS security summarization},
author = {Stratosphere Laboratory, CTU Prague},
year = {2026},
howpublished = {\url{https://huggingface.co/stratosphere/qwen3.5-0.8b-slips-immune-summarization}}
}
Acknowledgments
This work was supported by the NLnet Foundation as part of the IMMUNE project. NLnet Foundation promotes open internet standards and open source software.
Model Details
- Model size: 0.8B params (0.75B language model + untrained vision encoder)
- Tensor type: BF16 (GGUF: Q4_K_M, Q5_K_M, Q8_0)
- License: Apache-2.0
- Tags: Text Generation, Transformers, Safetensors, GGUF, Network Security, IDS, SLIPS, Summarization, Cybersecurity, LoRA, SFT, TRL, Unsloth