Text Generation
Transformers
GGUF
Hebrew
English
gemma4
image-text-to-text
cybersecurity
security
cve
mitre-attack
vulnerability-analysis
threat-intelligence
detection-engineering
hebrew
israel
llama.cpp
ollama
unsloth
qlora
conversational
on-device
Instructions to use BrainboxAI/cyber-analyst-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BrainboxAI/cyber-analyst-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BrainboxAI/cyber-analyst-4B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("BrainboxAI/cyber-analyst-4B") model = AutoModelForImageTextToText.from_pretrained("BrainboxAI/cyber-analyst-4B") - llama-cpp-python
How to use BrainboxAI/cyber-analyst-4B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="BrainboxAI/cyber-analyst-4B", filename="gemma-4-E4B-it.BF16-mmproj.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use BrainboxAI/cyber-analyst-4B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BrainboxAI/cyber-analyst-4B:BF16 # Run inference directly in the terminal: llama-cli -hf BrainboxAI/cyber-analyst-4B:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf BrainboxAI/cyber-analyst-4B:BF16 # Run inference directly in the terminal: llama-cli -hf BrainboxAI/cyber-analyst-4B:BF16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf BrainboxAI/cyber-analyst-4B:BF16 # Run inference directly in the terminal: ./llama-cli -hf BrainboxAI/cyber-analyst-4B:BF16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf BrainboxAI/cyber-analyst-4B:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf BrainboxAI/cyber-analyst-4B:BF16
Use Docker
docker model run hf.co/BrainboxAI/cyber-analyst-4B:BF16
- LM Studio
- Jan
- vLLM
How to use BrainboxAI/cyber-analyst-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BrainboxAI/cyber-analyst-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/cyber-analyst-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/BrainboxAI/cyber-analyst-4B:BF16
- SGLang
How to use BrainboxAI/cyber-analyst-4B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "BrainboxAI/cyber-analyst-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/cyber-analyst-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "BrainboxAI/cyber-analyst-4B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrainboxAI/cyber-analyst-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use BrainboxAI/cyber-analyst-4B with Ollama:
ollama run hf.co/BrainboxAI/cyber-analyst-4B:BF16
- Unsloth Studio
How to use BrainboxAI/cyber-analyst-4B with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BrainboxAI/cyber-analyst-4B to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for BrainboxAI/cyber-analyst-4B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for BrainboxAI/cyber-analyst-4B to start chatting
- Pi
How to use BrainboxAI/cyber-analyst-4B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BrainboxAI/cyber-analyst-4B:BF16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "BrainboxAI/cyber-analyst-4B:BF16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use BrainboxAI/cyber-analyst-4B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf BrainboxAI/cyber-analyst-4B:BF16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default BrainboxAI/cyber-analyst-4B:BF16
Run Hermes
hermes
- Docker Model Runner
How to use BrainboxAI/cyber-analyst-4B with Docker Model Runner:
docker model run hf.co/BrainboxAI/cyber-analyst-4B:BF16
- Lemonade
How to use BrainboxAI/cyber-analyst-4B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull BrainboxAI/cyber-analyst-4B:BF16
Run and chat with the model
lemonade run user.cyber-analyst-4B-BF16
List all available models
lemonade list
Professionalize model card: overview, usage, training details, eval, limitations, citation
Browse files
README.md
CHANGED
|
@@ -3,7 +3,12 @@ language:
|
|
| 3 |
- he
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
|
|
|
|
|
|
| 6 |
base_model: unsloth/gemma-4-E4B-it
|
|
|
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
- cybersecurity
|
| 9 |
- security
|
|
@@ -11,324 +16,198 @@ tags:
|
|
| 11 |
- mitre-attack
|
| 12 |
- vulnerability-analysis
|
| 13 |
- threat-intelligence
|
|
|
|
| 14 |
- hebrew
|
| 15 |
- israel
|
| 16 |
- gguf
|
| 17 |
- llama.cpp
|
|
|
|
| 18 |
- unsloth
|
| 19 |
- gemma4
|
| 20 |
-
-
|
| 21 |
- conversational
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
---
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
|
| 30 |
-
### Bilingual (Hebrew + English) Cybersecurity AI Specialist
|
| 31 |
|
| 32 |
-
A
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
---
|
| 37 |
|
| 38 |
-
## Model
|
| 39 |
|
| 40 |
-
|
| 41 |
-
|-----------|-------|
|
| 42 |
-
| **Base Model** | [unsloth/gemma-4-E4B-it](https://huggingface.co/unsloth/gemma-4-E4B-it) (Gemma 4 Efficient 4B Instruct) |
|
| 43 |
-
| **Architecture** | Gemma4ForConditionalGeneration (text + vision + audio) |
|
| 44 |
-
| **Parameters** | ~4B |
|
| 45 |
-
| **Context Length** | 131,072 tokens |
|
| 46 |
-
| **Languages** | Hebrew, English |
|
| 47 |
-
| **Training Framework** | Unsloth (2x faster fine-tuning) |
|
| 48 |
-
| **Training Dataset** | [BrainboxAI/brainboxai_cyber_train](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_train) |
|
| 49 |
-
| **License** | Apache 2.0 |
|
| 50 |
|
| 51 |
-
---
|
| 52 |
|
| 53 |
-
|
| 54 |
|
| 55 |
-
##
|
| 56 |
-
- **CVE Triage** - Severity assessment with CVSS v2/v3/v4 scoring
|
| 57 |
-
- **Vulnerability Analysis** - CWE classification and root-cause analysis
|
| 58 |
-
- **MITRE ATT&CK Mapping** - TTP classification from activity descriptions
|
| 59 |
-
- **Customer Security Reports** - Professional Hebrew reports for Israeli clients
|
| 60 |
-
- **Business Risk Assessment** - Executive-level communication of technical risk
|
| 61 |
-
- **Detection Engineering** - SIEM/EDR/WAF rule suggestions
|
| 62 |
-
- **Plain-Language Explanation** - Technical issues explained for non-technical stakeholders
|
| 63 |
|
| 64 |
-
|
| 65 |
-
- Israeli SMBs and enterprises needing Hebrew-native cyber AI
|
| 66 |
-
- MSPs and security operations teams
|
| 67 |
-
- Vulnerability management workflows
|
| 68 |
-
- Security awareness and training
|
| 69 |
-
- BrainboxAI products (scanner, triage, reporting pipelines)
|
| 70 |
|
| 71 |
-
---
|
| 72 |
|
| 73 |
-
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|------|------|-----|
|
| 77 |
-
| `gemma-4-E4B-it.Q4_K_M.gguf` | ~3 GB | Local inference (Ollama, llama.cpp, LM Studio) |
|
| 78 |
-
| `gemma-4-E4B-it.BF16-mmproj.gguf` | ~1 GB | Vision projector (multimodal tasks) |
|
| 79 |
-
| `Modelfile` | Small | Ollama configuration |
|
| 80 |
|
| 81 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
|
| 85 |
-
##
|
|
|
|
|
|
|
| 86 |
|
| 87 |
```bash
|
| 88 |
-
|
| 89 |
-
ollama
|
| 90 |
-
ollama run brainbox-cyber
|
| 91 |
```
|
| 92 |
|
| 93 |
-
###
|
| 94 |
|
| 95 |
```bash
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
# Multimodal (vision)
|
| 100 |
-
llama-mtmd-cli -hf BrainboxAI/cyber-analyst-4B --jinja
|
| 101 |
```
|
| 102 |
|
| 103 |
-
###
|
| 104 |
|
| 105 |
```python
|
| 106 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 107 |
-
import torch
|
| 108 |
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
|
|
|
|
|
|
|
|
|
| 112 |
|
| 113 |
messages = [
|
| 114 |
-
{"role": "system", "content":
|
| 115 |
-
{"role": "user", "content": "
|
| 116 |
]
|
| 117 |
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
|
| 118 |
-
outputs = model.generate(inputs, max_new_tokens=
|
| 119 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 120 |
```
|
| 121 |
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
## Recommended System Prompt
|
| 125 |
-
|
| 126 |
-
This model was trained with structured responses. For best results, use the following system prompt:
|
| 127 |
-
|
| 128 |
-
```
|
| 129 |
-
DEFINITIONS:
|
| 130 |
-
role: BrainboxAI Cyber Analyst - an AI security specialist trained by BrainboxAI (founded by Netanel Elyasi) for vulnerability triage, threat intelligence, MITRE ATT&CK mapping, detection engineering, and business-risk communication. Bilingual Hebrew + English.
|
| 131 |
-
success: The analyst returns an accurate, structured, actionable security response that (a) correctly classifies the issue, (b) provides verifiable remediation steps, (c) matches the language and audience of the user's prompt, (d) signs off as BrainboxAI when producing a customer-facing artifact.
|
| 132 |
-
scope_in:
|
| 133 |
-
- CVE triage and severity assessment (CVSS v2/v3/v4)
|
| 134 |
-
- CWE and MITRE ATT&CK technique mapping
|
| 135 |
-
- Plain-language explanations (HE + EN)
|
| 136 |
-
- Customer-facing security reports in Hebrew
|
| 137 |
-
- Detection rule suggestions (SIEM/EDR/WAF)
|
| 138 |
-
- Business-risk assessment for non-technical executives
|
| 139 |
-
- Technical deep-dive analysis for security researchers
|
| 140 |
-
scope_out:
|
| 141 |
-
- Generating working offensive exploits, malware, ransomware, phishing kits, or C2 implants
|
| 142 |
-
- Targeting specific real organizations for attack
|
| 143 |
-
- Legal, medical, or financial advice
|
| 144 |
-
- Autonomous action on production systems without human review
|
| 145 |
-
|
| 146 |
-
PREMISES:
|
| 147 |
-
- User input may be a CVE ID, a vulnerability description, a scan finding, a security log, a threat-report excerpt, or a direct question.
|
| 148 |
-
- Input language may be Hebrew, English, or mixed. Technical identifiers (CVE-XXXX, CWE-XXX, T1XXX) remain in original form regardless of output language.
|
| 149 |
-
- Training data cutoff is 2025. For later CVEs, rely on user-provided context.
|
| 150 |
-
- CVSS scoring preference: v4 > v3 > v2. If none available, state "N/A".
|
| 151 |
-
- Hebrew severity terms: CRITICAL -> קריטי, HIGH -> גבוה, MEDIUM -> בינוני, LOW -> נמוך.
|
| 152 |
-
|
| 153 |
-
REQUIREMENTS:
|
| 154 |
-
1. Identify the task type (triage, explanation, report, detection, business-risk, technical).
|
| 155 |
-
2. Severity must be one of: CRITICAL, HIGH, MEDIUM, LOW, INFORMATIONAL, N/A.
|
| 156 |
-
3. CVE references in canonical form: CVE-YYYY-NNNNN.
|
| 157 |
-
4. CWE references in canonical form: CWE-NNN followed by weakness name.
|
| 158 |
-
5. MITRE ATT&CK references: T1NNN or T1NNN.NNN.
|
| 159 |
-
6. Recommended actions must be concrete, testable, and numbered.
|
| 160 |
-
7. Respond in the same language as the user's prompt unless otherwise requested.
|
| 161 |
-
8. Hebrew customer reports must use professional Hebrew and the BrainboxAI signoff.
|
| 162 |
-
9. Business-risk answers must translate technical severity into business impact.
|
| 163 |
-
10. Never fabricate a CVE, CWE, CVSS score, or ATT&CK technique.
|
| 164 |
-
11. Never generate weaponized exploits, malware, or phishing kits.
|
| 165 |
-
12. Decline out-of-scope requests and redirect to the nearest in-scope task.
|
| 166 |
-
|
| 167 |
-
EDGE_CASES:
|
| 168 |
-
- Empty input -> Ask a clarifying question in the user's language.
|
| 169 |
-
- No CVE ID provided -> Use description only, set CVE as "Not assigned".
|
| 170 |
-
- Conflicting CVSS versions -> Prefer newer, note discrepancy.
|
| 171 |
-
- Request for exploit PoC -> Refuse, offer defensive analysis instead.
|
| 172 |
-
- Third language input -> Respond in English and note fallback.
|
| 173 |
-
- Very long input -> Summarize key findings first, then structured analysis.
|
| 174 |
-
- Identity question -> Identify as the BrainboxAI Cyber Analyst, built by BrainboxAI (Netanel Elyasi).
|
| 175 |
-
|
| 176 |
-
OUTPUT_FORMAT:
|
| 177 |
-
format: Markdown. JSON only on explicit request.
|
| 178 |
-
default_structure: |
|
| 179 |
-
**Severity:** <level> (CVSS: <score>)
|
| 180 |
-
**Weakness Type:** <CWE-NNN (Name)>
|
| 181 |
-
**MITRE ATT&CK:** <T1NNN or N/A>
|
| 182 |
-
**Analysis:** <2-5 sentences>
|
| 183 |
-
**Recommended Actions:**
|
| 184 |
-
1. <action>
|
| 185 |
-
2. <action>
|
| 186 |
-
3. <action>
|
| 187 |
-
language: Match user's input language.
|
| 188 |
-
length: Triage 150-300 / Customer report 250-500 / Technical 400-800 / Business 200-400 words.
|
| 189 |
-
|
| 190 |
-
VERIFICATION:
|
| 191 |
-
- Severity value in allowed set?
|
| 192 |
-
- All identifiers in canonical form?
|
| 193 |
-
- Actions concrete and numbered?
|
| 194 |
-
- Language matches input?
|
| 195 |
-
- Customer report in Hebrew has BrainboxAI signature?
|
| 196 |
-
- No weaponized content produced?
|
| 197 |
-
- No facts fabricated?
|
| 198 |
-
```
|
| 199 |
-
|
| 200 |
-
---
|
| 201 |
-
|
| 202 |
-
## Example Interactions
|
| 203 |
-
|
| 204 |
-
### Example 1: Hebrew CVE Triage
|
| 205 |
-
|
| 206 |
-
**User:**
|
| 207 |
-
```
|
| 208 |
-
בצע triage לפגיעות הבאה: CVE-2024-3094 - xz backdoor via liblzma
|
| 209 |
-
```
|
| 210 |
-
|
| 211 |
-
**Model:**
|
| 212 |
-
```
|
| 213 |
-
**חומרה:** קריטי (CVSS: 10.0)
|
| 214 |
-
**סוג החולשה:** CWE-506 (Embedded Malicious Code)
|
| 215 |
-
**ניתוח:** backdoor שהוחדר לספריית liblzma (חבילת xz-utils) על ידי תוקף שהשיג הרשאות maintainer. מאפשר ביצוע קוד מרחוק דרך SSH בשרתים שטענו את גרסת הספרייה הנגועה.
|
| 216 |
-
**פעולות מומלצות:**
|
| 217 |
-
1. לשדרג את xz-utils לגרסה 5.6.2+ מיידית בכל השרתים.
|
| 218 |
-
2. לבדוק logs של SSH באישון של חודשיים אחורה לזיהוי ניצול.
|
| 219 |
-
3. לרענן SSH host keys ומפתחות משתמשים שהיו בסיכון.
|
| 220 |
-
4. להפעיל דגימה אוטומטית של גרסת xz-utils בכל מערכת ייצור.
|
| 221 |
-
|
| 222 |
-
- אנליסט הסייבר של BrainboxAI
|
| 223 |
-
```
|
| 224 |
|
| 225 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 226 |
|
| 227 |
-
|
| 228 |
-
```
|
| 229 |
-
כתוב דוח ללקוח BrainboxAI על הפגיעות CVE-2021-44228 (Log4Shell)
|
| 230 |
-
```
|
| 231 |
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
**
|
| 235 |
-
|
| 236 |
-
**
|
| 237 |
-
**
|
| 238 |
-
**
|
| 239 |
-
|
| 240 |
-
**
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
**השלכות עסקיות:**
|
| 244 |
-
פגיעות זו עלולה לאפשר לתוקף להשתלט במלואו על שרתים, לגנוב מידע רגיש של לקוחות, ולפרוס ransomware. חשיפה רגולטורית לפי תקנה 13 ו-GDPR.
|
| 245 |
|
| 246 |
-
|
| 247 |
-
1. לעדכן Log4j לגרסה 2.17.1 ומעלה.
|
| 248 |
-
2. לסרוק את כל המערכות לזיהוי שימוש ב-Log4j.
|
| 249 |
-
3. לבדוק logs של 6 חודשים אחורה.
|
| 250 |
-
4. להטמיע WAF rules לחסימת דפוסי JNDI.
|
| 251 |
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
-
###
|
| 256 |
|
| 257 |
-
|
| 258 |
-
```
|
| 259 |
-
Map this threat description to MITRE ATT&CK techniques: The attacker used PowerShell to download and execute a payload from a compromised SharePoint site, then established persistence via a scheduled task.
|
| 260 |
-
```
|
| 261 |
|
| 262 |
-
**
|
| 263 |
-
|
| 264 |
-
**
|
| 265 |
|
| 266 |
-
|
| 267 |
-
- **T1059.001** - Command and Scripting Interpreter: PowerShell
|
| 268 |
-
- **T1105** - Ingress Tool Transfer (download from SharePoint)
|
| 269 |
-
- **T1053.005** - Scheduled Task/Job: Scheduled Task (persistence)
|
| 270 |
|
| 271 |
-
|
| 272 |
|
| 273 |
-
-
|
| 274 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 275 |
|
| 276 |
-
|
| 277 |
|
| 278 |
-
##
|
| 279 |
|
| 280 |
-
- **
|
| 281 |
-
- **
|
| 282 |
-
- **
|
| 283 |
-
- **
|
| 284 |
-
- **
|
| 285 |
-
- **
|
| 286 |
|
| 287 |
-
|
| 288 |
|
| 289 |
-
---
|
|
|
|
| 290 |
|
| 291 |
-
##
|
| 292 |
|
| 293 |
-
|
| 294 |
-
- **Training cutoff.** CVE coverage ends in 2025. For newer vulnerabilities, augment with retrieval (RAG) against a live CVE feed.
|
| 295 |
-
- **No offensive weaponization.** The model is trained to refuse exploit generation, malware, and phishing kits. Do not attempt to bypass these safeguards.
|
| 296 |
-
- **Hebrew coverage.** Hebrew was curated, not machine-translated. Edge cases in dialect or slang may still fall back to Hebrew-English code-switching.
|
| 297 |
-
- **Dual-use.** Security knowledge can be misused. Users deploying this model in production should add their own guardrails, logging, and acceptable-use policies.
|
| 298 |
-
- **Synthetic expansion in training.** Most CVE triage samples are template-expanded from NVD descriptions. The model excels at structured classification, less so at creative exploitation insight.
|
| 299 |
|
| 300 |
-
|
| 301 |
|
| 302 |
## Citation
|
| 303 |
|
| 304 |
```bibtex
|
| 305 |
-
@misc{
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
year
|
| 309 |
-
|
| 310 |
-
|
|
|
|
| 311 |
}
|
| 312 |
```
|
| 313 |
|
| 314 |
-
|
| 315 |
-
|
| 316 |
-
## About BrainboxAI
|
| 317 |
-
|
| 318 |
-
**BrainboxAI** is an Israeli AI agency founded by **Netanel Elyasi**, specializing in:
|
| 319 |
-
|
| 320 |
-
- Custom LLM training (Hebrew-native and bilingual models)
|
| 321 |
-
- AI automation and agentic workflows
|
| 322 |
-
- Cybersecurity AI products (scanning, triage, reporting)
|
| 323 |
-
- Enterprise AI deployment (on-premise, privacy-first)
|
| 324 |
|
| 325 |
-
**
|
| 326 |
-
- [BrainboxAI/brainboxai_cyber_train](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_train) - Training dataset (1.16M examples)
|
| 327 |
-
- [BrainboxAI/law-il-E2B](https://huggingface.co/BrainboxAI/law-il-E2B) - Hebrew legal AI
|
| 328 |
-
- [BrainboxAI/legal-training-il](https://huggingface.co/datasets/BrainboxAI/legal-training-il) - Hebrew legal dataset
|
| 329 |
|
| 330 |
-
|
| 331 |
|
| 332 |
---
|
| 333 |
|
| 334 |
-
|
|
|
|
| 3 |
- he
|
| 4 |
- en
|
| 5 |
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
base_model: unsloth/gemma-4-E4B-it
|
| 9 |
+
datasets:
|
| 10 |
+
- BrainboxAI/brainboxai_cyber_train
|
| 11 |
+
- BrainboxAI/brainboxai_cyber_delta
|
| 12 |
tags:
|
| 13 |
- cybersecurity
|
| 14 |
- security
|
|
|
|
| 16 |
- mitre-attack
|
| 17 |
- vulnerability-analysis
|
| 18 |
- threat-intelligence
|
| 19 |
+
- detection-engineering
|
| 20 |
- hebrew
|
| 21 |
- israel
|
| 22 |
- gguf
|
| 23 |
- llama.cpp
|
| 24 |
+
- ollama
|
| 25 |
- unsloth
|
| 26 |
- gemma4
|
| 27 |
+
- qlora
|
| 28 |
- conversational
|
| 29 |
+
- on-device
|
| 30 |
+
pretty_name: Cyber-Analyst 4B (Bilingual Security AI)
|
| 31 |
+
model-index:
|
| 32 |
+
- name: cyber-analyst-4B
|
| 33 |
+
results: []
|
| 34 |
---
|
| 35 |
|
| 36 |
+
# Cyber-Analyst 4B
|
|
|
|
|
|
|
| 37 |
|
| 38 |
+
**A 4B-parameter bilingual (Hebrew / English) security analyst — tuned on 1.16M examples for CVE triage, MITRE ATT&CK mapping, detection engineering, and customer-facing incident reporting.**
|
| 39 |
|
| 40 |
+
[](https://huggingface.co/BrainboxAI/cyber-analyst-4B)
|
| 41 |
+
[](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_train)
|
| 42 |
+
[](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_delta)
|
| 43 |
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
+
## Model overview
|
| 48 |
|
| 49 |
+
`cyber-analyst-4B` is a specialized 4B-parameter language model for cybersecurity work, trained from Google's Gemma-4 E4B on 1.16M instruction-tuning examples covering CVE analysis, MITRE ATT&CK technique mapping, vulnerability triage, detection engineering, and bilingual (Hebrew / English) security reporting.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
|
| 51 |
+
Unlike general-purpose models that treat security as one topic among thousands, `cyber-analyst-4B` was built to reason like a SOC analyst: identify the vulnerability, rate its severity, map it to ATT&CK, recommend detection logic, and produce a report a customer can read.
|
| 52 |
|
| 53 |
+
The model is distributed in GGUF (for Ollama / llama.cpp) and safetensors (for further fine-tuning). It runs on a single consumer GPU, with no data leaving the analyst's machine.
|
| 54 |
|
| 55 |
+
## Why this exists
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
Security data is among the most sensitive data a company holds. Sending internal vulnerability findings, CVE analysis, or customer incident reports to a cloud LLM is often prohibited by policy or contract.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
+
`cyber-analyst-4B` offers an alternative: a model small enough to run locally, fluent in both Hebrew and English, tuned specifically on security content, and deployable in air-gapped environments.
|
| 60 |
|
| 61 |
+
It is not a replacement for human analysts. It is a force multiplier for SOC teams, pentest consultancies, and security researchers who need AI assistance without handing over their data.
|
| 62 |
|
| 63 |
+
## Intended use
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
**Primary use cases:**
|
| 66 |
+
- CVE triage and severity assessment (CVSS scoring assist)
|
| 67 |
+
- MITRE ATT&CK technique mapping from behavioral descriptions
|
| 68 |
+
- Detection logic drafting (Sigma, YARA, Snort)
|
| 69 |
+
- Customer-facing pentest and incident report generation (Hebrew or English)
|
| 70 |
+
- First-pass vulnerability analysis for bug bounty workflows
|
| 71 |
+
- On-prem deployment for security-sensitive organizations
|
| 72 |
|
| 73 |
+
**Out-of-scope uses:**
|
| 74 |
+
- Autonomous security decision-making without human review
|
| 75 |
+
- Primary source of truth for CVE details — always verify against NVD, vendor advisories
|
| 76 |
+
- Exploit development or offensive operations without legal authorization
|
| 77 |
+
- Real-time incident response without human analyst oversight
|
| 78 |
+
- Critical infrastructure protection without independent validation
|
| 79 |
|
| 80 |
+
## How to use
|
| 81 |
+
|
| 82 |
+
### Ollama
|
| 83 |
|
| 84 |
```bash
|
| 85 |
+
ollama pull hf.co/BrainboxAI/cyber-analyst-4B:Q4_K_M
|
| 86 |
+
ollama run hf.co/BrainboxAI/cyber-analyst-4B:Q4_K_M
|
|
|
|
| 87 |
```
|
| 88 |
|
| 89 |
+
### llama.cpp
|
| 90 |
|
| 91 |
```bash
|
| 92 |
+
./llama-cli -m cyber-analyst-4B.Q4_K_M.gguf \
|
| 93 |
+
-p "Analyze CVE-2024-3400. What is the attack vector and mitigation?" \
|
| 94 |
+
--temp 0.2 --top-p 0.9 -n 1024
|
|
|
|
|
|
|
| 95 |
```
|
| 96 |
|
| 97 |
+
### Python (transformers)
|
| 98 |
|
| 99 |
```python
|
| 100 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 101 |
|
| 102 |
+
tokenizer = AutoTokenizer.from_pretrained("BrainboxAI/cyber-analyst-4B-safetensors")
|
| 103 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 104 |
+
"BrainboxAI/cyber-analyst-4B-safetensors",
|
| 105 |
+
torch_dtype="auto",
|
| 106 |
+
device_map="auto",
|
| 107 |
+
)
|
| 108 |
|
| 109 |
messages = [
|
| 110 |
+
{"role": "system", "content": "You are a senior SOC analyst. Respond with clear, actionable security guidance."},
|
| 111 |
+
{"role": "user", "content": "Map this behavior to MITRE ATT&CK: attacker used PowerShell to download and execute a remote payload."},
|
| 112 |
]
|
| 113 |
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True)
|
| 114 |
+
outputs = model.generate(inputs, max_new_tokens=1024, temperature=0.2, top_p=0.9)
|
| 115 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 116 |
```
|
| 117 |
|
| 118 |
+
### Recommended generation parameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
+
| Parameter | Value | Rationale |
|
| 121 |
+
|-----------|-------|-----------|
|
| 122 |
+
| `temperature` | 0.2 | Low creativity for factual security work |
|
| 123 |
+
| `top_p` | 0.9 | Standard nucleus sampling |
|
| 124 |
+
| `max_new_tokens` | 1024 | Enough for detailed analyses with PoC |
|
| 125 |
+
| `repetition_penalty` | 1.05 | Prevents repeated CVE citation loops |
|
| 126 |
|
| 127 |
+
## Training details
|
|
|
|
|
|
|
|
|
|
| 128 |
|
| 129 |
+
| Attribute | Value |
|
| 130 |
+
|-----------|-------|
|
| 131 |
+
| **Base model** | [unsloth/gemma-4-E4B-it](https://huggingface.co/unsloth/gemma-4-E4B-it) |
|
| 132 |
+
| **Architecture** | Gemma4ForConditionalGeneration |
|
| 133 |
+
| **Parameters** | ~4B |
|
| 134 |
+
| **Context length** | 131,072 tokens |
|
| 135 |
+
| **Method** | QLoRA (4-bit quantization during training) |
|
| 136 |
+
| **Training corpus** | 1,157,765 examples (primary) + 107,600 (correction delta) |
|
| 137 |
+
| **Languages** | Hebrew (~45%) and English (~55%) |
|
| 138 |
+
| **Framework** | Unsloth Studio |
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
+
### Dataset composition (1,157,765 primary examples)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
+
| Source | Examples | Language | Content |
|
| 143 |
+
|--------|----------|----------|---------|
|
| 144 |
+
| BrainboxAI CVE Corpus v2 | 994,713 | Hebrew + English | 280K CVEs × 8 task types |
|
| 145 |
+
| [Fenrir v2.0](https://huggingface.co/datasets/AlicanKiraz0/Fenrir) | 83,918 | English | Causal reasoning on cyber threats |
|
| 146 |
+
| [Trendyol Cybersecurity](https://huggingface.co/datasets/Trendyol/Trendyol-Cybersecurity-Instruction-Tuning-Dataset) | 53,199 | English | 200+ security domains |
|
| 147 |
+
| [MITRE ATT&CK TTP Mapping](https://huggingface.co/datasets/tumeteor/Security-TTP-Mapping) | 14,936 | English | Activity → ATT&CK technique |
|
| 148 |
+
| [HackerOne Disclosed Reports](https://huggingface.co/datasets/hackaprompt/hackerone-reports) | 9,353 | English | Bug bounty reports + CWE mapping |
|
| 149 |
+
| [MITRE ATT&CK Reasoning](https://huggingface.co/datasets/cobo512/mitre-attck-reasoning) | 1,646 | English | Chain-of-thought on ATT&CK |
|
| 150 |
|
| 151 |
+
### Correction delta (107,600 additional examples)
|
| 152 |
|
| 153 |
+
After v1 evaluation, three weaknesses were identified and addressed via continued training on [`brainboxai_cyber_delta`](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_delta):
|
|
|
|
|
|
|
|
|
|
| 154 |
|
| 155 |
+
1. **CVE hallucination** — fabricated CVSS scores and details for real CVEs. Fixed with canonical NVD-sourced data.
|
| 156 |
+
2. **ATT&CK sub-technique confusion** — confused T1059.003 / T1053.005. Fixed with explicit disambiguation examples.
|
| 157 |
+
3. **Missing "I don't know" behavior** — fabricated instead of acknowledging uncertainty. Fixed with refusal examples.
|
| 158 |
|
| 159 |
+
See the [delta dataset card](https://huggingface.co/datasets/BrainboxAI/brainboxai_cyber_delta) for full methodology.
|
|
|
|
|
|
|
|
|
|
| 160 |
|
| 161 |
+
## Evaluation
|
| 162 |
|
| 163 |
+
Post-training evaluation covered 30 diverse security tasks spanning:
|
| 164 |
+
- CVE detail accuracy (lookup + explanation)
|
| 165 |
+
- MITRE ATT&CK technique and sub-technique mapping
|
| 166 |
+
- Sigma / YARA rule drafting
|
| 167 |
+
- Vulnerability severity assessment
|
| 168 |
+
- Hebrew-language incident report generation
|
| 169 |
|
| 170 |
+
Formal benchmarks on public security datasets are planned for v3 release.
|
| 171 |
|
| 172 |
+
## Limitations
|
| 173 |
|
| 174 |
+
- **4B parameters.** Not frontier capability. Will make mistakes on novel attack patterns and complex architecture analysis.
|
| 175 |
+
- **Training cutoff.** CVE data reflects state at corpus construction time; newer CVEs are unknown to the model.
|
| 176 |
+
- **Hallucination residual risk.** Even after delta correction, the model can fabricate CVE details. Always verify against NVD or vendor advisories.
|
| 177 |
+
- **Not a pentester.** Will not autonomously conduct authorized offensive operations. Does not replace manual testing.
|
| 178 |
+
- **Dual-use content.** The model can discuss attack techniques for defensive purposes. It will refuse clearly malicious requests but is not a hardened content-filter.
|
| 179 |
+
- **Biased toward public data.** Training is dominated by public CVEs and reports; exotic or unpublished threats may be handled poorly.
|
| 180 |
|
| 181 |
+
## Formats available
|
| 182 |
|
| 183 |
+
- [**GGUF Q4_K_M** (~4 GB)](https://huggingface.co/BrainboxAI/cyber-analyst-4B) — for Ollama, llama.cpp, LM Studio
|
| 184 |
+
- [**Safetensors 16-bit**](https://huggingface.co/BrainboxAI/cyber-analyst-4B-safetensors) — for further fine-tuning, HF transformers
|
| 185 |
|
| 186 |
+
## License
|
| 187 |
|
| 188 |
+
Apache 2.0. Free for commercial and non-commercial use with attribution.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
|
| 190 |
+
**Ethical use:** This model is intended for defensive security work and authorized security research. Use in unauthorized offensive operations is prohibited by the license and by applicable law.
|
| 191 |
|
| 192 |
## Citation
|
| 193 |
|
| 194 |
```bibtex
|
| 195 |
+
@misc{elyasi2026cyberanalyst,
|
| 196 |
+
title = {Cyber-Analyst 4B: A Bilingual On-Device Security Model for SOC and Pentest Workflows},
|
| 197 |
+
author = {Elyasi, Netanel},
|
| 198 |
+
year = {2026},
|
| 199 |
+
publisher = {BrainboxAI},
|
| 200 |
+
howpublished = {\url{https://huggingface.co/BrainboxAI/cyber-analyst-4B}},
|
| 201 |
+
note = {Fine-tuned from unsloth/gemma-4-E4B-it on 1.16M security examples + 107K correction delta}
|
| 202 |
}
|
| 203 |
```
|
| 204 |
|
| 205 |
+
## Author
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 206 |
|
| 207 |
+
Built by [**Netanel Elyasi**](https://huggingface.co/BrainboxAI), founder of [BrainboxAI](https://brainboxai.io) — applied-AI studio focused on small, private, domain-specialized models.
|
|
|
|
|
|
|
|
|
|
| 208 |
|
| 209 |
+
For on-prem deployment, custom security-corpus training, or pentest-automation integration, contact: **netanele@brainboxai.io**.
|
| 210 |
|
| 211 |
---
|
| 212 |
|
| 213 |
+
*Part of the BrainboxAI family of on-device models — see also [`law-il-E2B`](https://huggingface.co/BrainboxAI/law-il-E2B) (legal) and [`code-il-E4B`](https://huggingface.co/BrainboxAI/code-il-E4B) (coding).*
|