/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
1,5 млрд
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-1.5B-Instruct
Библиотека
transformers
Опубликована
22 апр 2026

qwen2.5-1.5b-slips-immune-risk

Генерация текстаТекст → текст3 профессии
136скачиваний за 30 дней0лайковвеса обновлены4 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Дообученная Qwen2.5 модель анализирует журналы Slips IDS, объясняет вероятные причины сетевых инцидентов и оценивает их риск и приоритет расследования.

Модель stratosphere/qwen2.5-1.5b-slips-immune-risk разработана для анализа инцидентов сетевой безопасности, зарегистрированных системой обнаружения вторжений Slips IDS. Это дообученная методом supervised fine-tuning модель Qwen2.5-1.5B-Instruct с архитектурой Qwen2 и 1,5 млрд параметров; опубликованные веса FP16 содержат объединённый LoRA-адаптер. Модель принимает журналы событий Slips в виде DAG и формирует анализ вероятной причины инцидента с альтернативными гипотезами, а также оценку риска, влияния на бизнес и приоритета расследования.

Модель предназначена для помощи аналитикам при разборе и приоритизации сетевых инцидентов, а также для подготовки данных для отчётов и тикетов. Обучение проводилось на 826 инцидентах Slips IDS с отбором ответов по оценкам LLM-судьи; датасет включает примеры анализа причин и рисков. Поддерживаются только англоязычные входные данные. Метаданные указывают контекст до 32 768 токенов, однако обучение проходило с длиной последовательности 4 096 токенов, а рекомендуемые настройки Ollama ограничивают контекст 8 192 токенами.

Качество снижается на очень длинных инцидентах, а результаты для нормального трафика ненадёжны из-за малого числа таких примеров в тестовой выборке. Модель не предназначена для общего чата и анализа других областей кибербезопасности. Лицензия — Apache-2.0.

Сценарии применения

  • анализ причин срабатываний Slips IDS
  • оценка риска сетевых инцидентов
  • приоритизация расследования IDS-оповещений
  • подготовка аналитических сводок по инцидентам
  • формирование данных для тикетов по сетевой безопасности

Ограничения

Качество снижается на длинных инцидентах, особенно когда журналы превышают использованную при обучении длину последовательности; обработка очень длинных случаев может быть медленной. Результаты для нормального трафика статистически ненадёжны из-за малого числа таких примеров в тесте; модель не предназначена для неанглоязычных входов, общего чата или иных задач кибербезопасности.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen2.5-1.5B — Slips IDS Cause Analysis & Risk Assessment

Model Description

A fine-tuned version of Qwen2.5-1.5B-Instruct specialized for dual-task analysis of network security incidents from Slips IDS:

  1. Cause Analysis — identifying the most likely cause of the incident (malicious activity, misconfiguration, or legitimate behavior) with structured reasoning and alternative hypotheses
  2. Risk Assessment — producing a calibrated risk level, business impact statement, likelihood of malicious activity, and investigation priority

Slips is a network intrusion detection system that generates DAG-structured alert logs — chains of related security events per source IP per time window. This model takes those raw DAG logs and produces two complementary analyses that help analysts understand why an incident occurred and how urgently it should be investigated.

The model was fine-tuned using SFT (Supervised Fine-Tuning) on a combined cause+risk dataset with best-of-N response selection: for each training incident, the highest-scoring response among GPT-4o, GPT-4o-mini, Qwen2.5 3B, and Qwen2.5 1.5B (judged by an LLM-as-judge) was selected as ground truth. A single LoRA adapter handles both task types.

A smaller version with the same training data, stratosphere/qwen3.5-0.8b-slips-immune-risk, scores on par with this model at about half the size and runs faster on CPU-only devices such as the Raspberry Pi 5.

Quick Start

Ollama (Recommended)

Quantized GGUF models are the recommended way to run this model locally. Three quantization levels are available:

# q4_k_m — smallest, fastest (recommended for most use cases)
ollama run stratosphere/qwen2.5-1.5b-slips-immune-risk:q4_k_m

# q5_k_m — balanced quality/size
ollama run stratosphere/qwen2.5-1.5b-slips-immune-risk:q5_k_m

# q8_0 — highest quality quantized version
ollama run stratosphere/qwen2.5-1.5b-slips-immune-risk:q8_0

All three tags are available on Ollama Hub. Use the prompts in the Python section below to structure your queries. The Ollama tags set the default Qwen system prompt, an 8,192-token context (num_ctx) and an output limit of 512 tokens (num_predict), matching the evaluation setup. Tags pulled before November 2026 lack these settings; pull again to update.

On CPU-only devices, llama.cpp (llama-server -c 8192 --temp 0 -fa off) runs the same GGUF quantizations about 1.5–2.5× faster than Ollama (see Speed on a Raspberry Pi 5).

Python (Transformers)

The model uses two distinct prompt formats — one for cause analysis and one for risk assessment — applied to the same incident DAG. Each prompt is a single user message; 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/qwen2.5-1.5b-slips-immune-risk"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")

dag_analysis = """
...  # paste your Slips DAG analysis here
"""

incident = {
    "incident_id": "abc123",
    "source_ip": "192.168.1.100",
    "timewindow": "5",
    "threat_level": 8.5,
    "timeline": "2024-01-15 14:00:00 to 2024-01-15 15:00:00",
    "event_count": 42,
    "dag_analysis": dag_analysis,
}

# --- Task 1: Cause Analysis ---
cause_prompt = f"""You are a cybersecurity analyst. Analyze the following network security incident and provide a structured analysis of possible causes.

INCIDENT METADATA:
- Incident ID: {incident['incident_id']}
- Source IP: {incident['source_ip']}
- Timewindow: {incident['timewindow']}
- Accumulated Threat Level: {incident['threat_level']}
- Time Range: {incident['timeline']}
- Total Events: {incident['event_count']}

SECURITY EVIDENCE:
{incident['dag_analysis']}

Output Requirements:
- Respond with ONLY the analysis content
- Do NOT include any prefixes (like "AI:"), statistics, or metadata
- Do NOT include token counts, timing information, or performance stats
- Use this exact structure:

**Possible Causes:**

**1. Malicious Activity:**
• [Specific attack technique or malicious cause]
• [Additional malicious possibilities if relevant]

**2. Legitimate Activity:**
• [Benign operational cause]
• [Additional legitimate possibilities if relevant]

**3. Misconfigurations:**
• [Technical misconfigurations that could cause this behavior]

**Conclusion:** [1-2 sentence assessment of most likely cause category with recommendation for further investigation]

Guidelines:
- Be succinct (fewer words than raw evidence)
- Focus on relevant causes only (attack techniques, misconfigurations, legitimate operations)
- Use precise analyst-level language
- Maintain consistent structure and depth across all analyses
- Avoid generic definitions or unnecessary context"""

# --- Task 2: Risk Assessment ---
risk_prompt = f"""You are a cybersecurity analyst. Analyze the following network security incident and provide a structured risk assessment.

INCIDENT METADATA:
- Incident ID: {incident['incident_id']}
- Source IP: {incident['source_ip']}
- Timewindow: {incident['timewindow']}
- Accumulated Threat Level: {incident['threat_level']}
- Time Range: {incident['timeline']}
- Total Events: {incident['event_count']}

SECURITY EVIDENCE:
{incident['dag_analysis']}

Output Requirements:
- Respond with ONLY the assessment content
- Do NOT include any prefixes (like "AI:"), statistics, or metadata
- Do NOT include token counts, timing information, or performance stats
- Use this exact structure:

**Risk Level:** [Critical/High/Medium/Low]

**Justification:** [1-2 sentence technical justification for the risk level]

**Business Impact:** [Single clear sentence describing the most relevant business effect]

**Likelihood of Malicious Activity:** [High/Medium/Low] - [Brief rationale]

**Investigation Priority:** [Immediate/High/Medium/Low] - [Brief justification]

Guidelines:
- Use only the four risk levels: Critical, High, Medium, Low
- Keep justifications concise and technical
- Focus business impact on most relevant effect (data access, service disruption, etc.)
- Use consistent language for likelihood assessments
- Maintain uniform structure and depth across all assessments
- Avoid verbose or generic text"""

for prompt in [cause_prompt, risk_prompt]:
    messages = [{"role": "user", "content": prompt}]
    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=512, do_sample=False)
    print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
    print("\n" + "="*60 + "\n")

LoRA Adapter

The LoRA adapter itself (r=64, alpha 64, RSLoRA) is in lora_adapter/, for inspection or further fine-tuning. It was trained on unsloth/qwen2.5-1.5b-instruct-unsloth-bnb-4bit (QLoRA). The published weights are this adapter merged into the 16-bit base; for this model, merging into the dequantized 4-bit base instead gives the same judge scores within noise.

Training Details

Dataset

The training data is publicly available at stratosphere/immune-risk-sft-dataset.

  • Source: 826 incidents from real Slips IDS network captures, filtered by quality (cause score ≥ 14, risk score ≥ 10, token length checks)
  • Responses: 4 model responses per incident per task (GPT-4o, GPT-4o-mini, Qwen2.5 3B, Qwen2.5 1.5B) scored by an LLM-as-judge
  • Selection: Best-of-N — highest-scoring response per incident per task used as training target
  • Combined dataset: cause and risk records interleaved so the model sees both task types throughout training (1328 train / 148 eval records)
  • Split: 90% train / 10% eval

Training Procedure

ParameterValue
Base modelunsloth/Qwen2.5-1.5B-Instruct
Training methodSFT (Supervised Fine-Tuning)
FrameworkUnsloth + TRL SFTTrainer
LoRA rank (r)64
LoRA alpha64
LoRA dropout0.0
RSLoRAenabled (required at r=64)
LoRA targetsq_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Sequence length4096
Batch size1 (effective: 16 via gradient accumulation)
Gradient accumulation steps16
Learning rate2e-5
LR schedulercosine
Warmup steps20
Weight decay0.01
Epochs3
Optimizeradamw_8bit
PrecisionBF16
Quantization (training)4bit (QLoRA)
Response maskingtrain_on_responses_only — loss computed on assistant turns only

Framework Versions

  • Unsloth: 2026.3.18
  • Transformers: (auto-detected)
  • PyTorch: (auto-detected)

Evaluation

Overall Results

Evaluated on 67 held-out Slips IDS incidents (62 Malware, 5 Normal) with gpt-oss-120b as an independent LLM-as-judge, temperature 0. The judge scores each answer on its own (pointwise): cause analysis on evidence grounding, cause specificity and alternative hypotheses; risk assessment on risk calibration, actionability and business impact. Each criterion is 1–10, so each task is out of 30 and the combined score out of 60. The quantized rows are GGUF builds of the published weights (the same quantization types as the Ollama tags, rebuilt with a current llama.cpp), run with the default system prompt, an 8,192-token context and a 512-token output limit, as the Ollama tags now do.

ModelCause (/30)Risk (/30)Combined (/60)
GPT-4o16.6113.0129.63
Qwen3.5-0.8B finetuned, Q8_016.4612.9929.45
GPT-4o-mini16.3712.8429.21
Qwen2.5-1.5B finetuned, Q4_K_M16.4912.6429.13
Qwen2.5-1.5B finetuned, Q8_016.5212.5529.07
Qwen2.5-1.5B finetuned, Q5_K_M16.1512.8128.96
Qwen2.5-1.5B finetuned (4-bit adapter, as trained)16.1512.3628.51
Qwen2.5 3B (base, untuned)12.3312.3124.64
Qwen2.5-1.5B (base, untuned)12.9111.0423.96

Fine-tuning lifts the 1.5B model from 24.0 to about 29, the level of GPT-4o and GPT-4o-mini. The differences among those top models (about 1 point out of 60) are within the spread between quantization levels.

Speed on a Raspberry Pi 5

Raspberry Pi 5 (8 GB RAM, 4 Cortex-A76 cores, no GPU), 5 median-length incidents (~1,790 input tokens per request), 8,192-token context, temperature 0. One incident = one cause request + one risk request. Same GGUF files and identical prompts in both runtimes.

Quantizationllama.cpp (cause + risk)Ollama 0.19 (cause + risk)Peak RAM (llama.cpp / Ollama)
Q4_K_M117 s (64 + 53; prompt 50 tok/s, generation 8 tok/s)268 s2.7 / 1.3 GB
Q5_K_M137 s316 s2.9 / 1.4 GB
Q8_0174 s (prompt 36 tok/s, generation 5 tok/s)274 s3.9 / 1.9 GB

The Pi reached 83–84 °C and throttled during the Ollama Q4_K_M and Q5_K_M runs, so those two times are somewhat pessimistic. Most of the time goes into reading the prompt; llama.cpp does this 3× faster than Ollama on the Pi.

Known Limitations

  • 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 5 Normal incidents in the test set — results for that category are not statistically reliable.

Intended Use

  • Automated cause analysis of Slips IDS alerts for security analysts
  • Risk prioritization and triage of network incidents
  • Input to downstream reporting or ticketing workflows

Out-of-Scope Use

  • General-purpose chat or instruction following
  • Security domains outside network IDS (malware analysis, vulnerability scanning, etc.)
  • Non-English inputs

Citation

@misc{qwen2.5-1.5b-slips-immune-risk,
  title        = {Qwen2.5-1.5B fine-tuned for Slips IDS cause analysis and risk assessment},
  author       = {Stratosphere Laboratory, CTU Prague},
  year         = {2026},
  howpublished = {\url{https://huggingface.co/stratosphere/qwen2.5-1.5b-slips-immune-risk}}
}

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: 1.5B params
  • Tensor type: FP16
  • License: Apache-2.0
  • Tags: Text Generation, Transformers, Safetensors, Network Security, IDS, SLIPS, Risk Assessment, Cause Analysis, Cybersecurity, LoRA, SFT, TRL, Unsloth

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
bbfa286

0 моделей