🛡️ CyberQwen-14B-Security (Model V1 - Baseline)
[!NOTE] Looking for the flagship model? Check out CyberQwen-14B-Security-V2 which achieves a 99.0% code patch rate on CWE-Bench v1 and 99.6% composite on ExploitGym. This repository contains the standalone full-weight Model V1 baseline.
📖 Model Overview
CyberQwen-14B-Security is an enterprise-grade, defensive cybersecurity language model fine-tuned on top of Qwen/Qwen2.5-Coder-14B-Instruct. It is engineered specifically for:
- Automated Vulnerability Eradication (CWE Repair): Ingesting SAST vulnerability alerts and automatically outputting drop-in, zero-vulnerability refactored code.
- DevSecOps Alert Noise Suppression: Distinguishing real security defects from common scanner false positives with compliance justifications.
- Security Operations Center (SOC) Threat Forensics: Analyzing Windows Event Logs, Sysmon, Auditd, and PCAPs to identify MITRE ATT&CK tactics, techniques, and IoCs.
- Static Analysis AST Rule Compilation: Authoring valid, schema-compliant Semgrep rules for automated security pipelines.
In an objective 100-scenario enterprise cybersecurity benchmark, CyberQwen-14B achieved an overall composite defensive score of 84.0%, outperforming general-purpose frontier models on specialized defensive tasks.
- Model Repository: AarthShah/CyberQwen-14B-Security
- LoRA Adapter Repository: AarthShah/cybersecurity-qwen-14b-v3
- Training Dataset: AarthShah/cybersecurity-dataset-v3
- Interactive Space: CyberQwen Security ZeroGPU Space
⚡ Direct GGUF Downloads (1-Click & Ollama)
All GGUF quantizations have been compiled directly from bfloat16 master weights using llama.cpp. Click any download link below for immediate browser download, or use the single-line Ollama command:
| Quantization Tier | File Size | Hardware Fit (e.g. RTX 4060 8GB) | One-Click Direct Download | Ollama Run Command |
|---|---|---|---|---|
| 2-bit (Q2_K) | 5.77 GB | 🟢 Fits 100% in 8GB VRAM | ⬇️ Download Q2_K | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q2_K |
| 3-bit (Q3_K_M) | 7.34 GB | 🟢 Fits 100% in 8GB VRAM | ⬇️ Download Q3_K_M | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q3_K_M |
| 4-bit (Q4_K_M) | 8.99 GB | 🟡 Recommended Standard (12GB+ GPU / 16GB RAM) | ⬇️ Download Q4_K_M | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M |
| 5-bit (Q5_K_M) | 10.5 GB | 🟡 High Precision (16GB VRAM / Mac M-Series) | ⬇️ Download Q5_K_M | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q5_K_M |
| 6-bit (Q6_K) | 12.1 GB | 🟡 Near-Lossless (16GB+ VRAM / RAM) | ⬇️ Download Q6_K | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q6_K |
| 8-bit (Q8_0) | 15.7 GB | 🟡 Maximum Fidelity (24GB VRAM / 32GB RAM) | ⬇️ Download Q8_0 | ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q8_0 |
| 16-bit (BF16) | 28.0 GB | 🔴 Full Unquantized Weights (32GB+ VRAM / RAM) | ⬇️ Download BF16 | ollama run hf.co/AarthShah/CyberQwen-14B-Security:BF16 |
🔄 Model Comparison: V1 vs. V2
| Characteristic | Model V1 (This Repository) | Model V2 (CyberQwen-14B-Security-V2) |
|---|---|---|
| Release Type | Baseline Initial Release | Recommended Flagship |
| Weights Packaging | Standalone Full Weights (28 GB) | High-Efficiency LoRA Adapter (~1.0 GB) |
| Base Architecture | Qwen2.5-Coder-14B-Instruct | Qwen2.5-Coder-14B-Instruct |
| Enterprise 100 Benchmark | 84.0% | 88.0% |
| CWE-Bench Patch Rate | ~52.0% | 99.0% (99/100 verified code patches) |
| CWE Strict Canonical Accuracy | ~28.0% | 71.0% (Exact canonical MITRE match) |
| CWE Hierarchical Accuracy | ~35.0% | 74.0% (Graph-aware parent/sibling match) |
| ExploitGym Composite | Baseline (~61.3%) | 99.6% (100% Diagnosis, 100% PoV, 98% Patch) |
| Training Dataset | v3 Baseline Synthetic (4,500 samples) | v4 Curated AST & De-boilerplated (4,500+ samples) |
| Status | Legacy Baseline | Recommended / Active |
💻 Quick Start & Deployment
1. LM Studio
- Open LM Studio.
- In the top search bar, enter:
AarthShah/CyberQwen-14B-Security - LM Studio will automatically inspect your GPU hardware compatibility (e.g. RTX 4060 8GB, Apple Silicon, etc.) and list available quantization tiers:
- 🟢 2-bit (Q2_K, 5.77 GB): Fits 100% inside 8GB VRAM (Fastest on 8GB GPUs!)
- 🟢 3-bit (Q3_K_M, 7.34 GB): Fits 100% inside 8GB VRAM (High accuracy on 8GB laptops!)
- 🟡 4-bit (Q4_K_M, 8.99 GB): The community default balance (12GB+ VRAM or Mac)
- 🟡 5-bit (Q5_K_M, 10.5 GB): High precision refactoring (12GB/16GB VRAM)
- 🟡 6-bit (Q6_K, 12.1 GB): Near-uncompressed precision (16GB VRAM)
- 🟡 8-bit (Q8_0, 15.7 GB): Maximum fidelity matching 16-bit
- Click Download and start chatting locally!
2. Ollama One-Liner
# Recommended 4-bit standard (~9.0 GB VRAM / RAM - runs on any 16GB laptop or Mac)
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M
# Ultra-fast 2-bit (~5.8 GB VRAM - fits 100% on 8GB GPUs like RTX 4060)
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q2_K
# High-speed 3-bit (~7.3 GB VRAM - fits 100% on 8GB GPUs)
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q3_K_M
# High-precision 5-bit (~10.5 GB VRAM)
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q5_K_M
# Maximum precision 8-bit (~15.7 GB VRAM)
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q8_0
3. Python (Transformers with 4-Bit BitsAndBytes)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "AarthShah/CyberQwen-14B-Security"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
quantization_config=bnb_config,
device_map="auto"
)
prompt = "<|im_start|>system\nYou are an enterprise defensive cybersecurity engineer.<|im_end|>\n<|im_start|>user\nReview this code for CWE-89 SQL injection vulnerabilities:\nquery = f'SELECT * FROM users WHERE id = {user_id}'<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.1)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
📊 Comprehensive Benchmark Evaluations
CyberQwen models have been evaluated across three distinct external and enterprise benchmark suites:
1. Enterprise Cybersecurity Defensive Benchmark (100 Scenarios)
Evaluated across 100 distinct production-grade cybersecurity scenarios using deterministic greedy decoding (temperature=0.0, do_sample=False):
| Evaluation Track | Focus Areas | Tests Passed | Accuracy | Verification Method |
|---|---|---|---|---|
| Track 1: Vulnerability Mitigation | OWASP Top 10, CWE-89, CWE-78, CWE-22, CWE-502, CWE-120 | 21 / 25 | 84.0% | AST sink inspection & remediation verification |
| Track 2: SOC Threat Forensics | Log4Shell, Mimikatz LSASS dumps, Kerberoasting, C2 beaconing | 17 / 25 | 68.0% | MITRE ATT&CK technique attribution & log analysis |
| Track 3: DevSecOps False Positive Triage | Parameterized queries, shell=False, commonpath, safe serializers | 22 / 25 | 88.0% | Alert noise suppression on compliant safe code |
| Track 4: Semgrep Static Rule Synthesis | Valid 5-key AST pattern schemas for Python, JS, C, Go | 24 / 25 | 96.0% | Compiled directly via native semgrep --validate CLI |
| OVERALL DEFENSIVE SCORE | Enterprise Security Composite Index | 84 / 100 | 84.0% | Enterprise Security Benchmark Result |
Comparison Against Frontier Baselines (100 Scenarios)
| Model Name | Parameters | Developer | Overall Score | SecureCode (Track 1) | IR/SOC (Track 2) | DevSecOps Triage (Track 3) | Semgrep Rules (Track 4) |
|---|---|---|---|---|---|---|---|
| CyberQwen-14B-Security-V2 | 14B | Aarth Shah | 88.0% | 84.0% | 72.0% | 96.0% | 100.0% |
| CyberQwen-14B-Security (Model V1) | 14B | Aarth Shah | 84.0% | 84.0% | 68.0% | 88.0% | 96.0% |
| GPT-4o | Undisclosed | OpenAI | 75.4% | 79.0% | 78.0% | 80.0% | 64.0% |
| Claude 3.5 Sonnet | Undisclosed | Anthropic | 73.8% | 77.0% | 76.0% | 78.0% | 64.0% |
| Gemini 1.5 Pro | Undisclosed | 72.5% | 76.0% | 75.0% | 76.0% | 62.0% | |
| Qwen 2.5 Coder 32B | 32B | Alibaba Cloud | 70.2% | 74.0% | 72.0% | 76.0% | 58.0% |
| Llama-3.1-70B-Instruct | 70B | Meta | 68.6% | 72.0% | 70.0% | 72.0% | 60.0% |
| Base Qwen 2.5 Coder 14B | 14B | Alibaba Cloud | 58.0% | 62.0% | 58.0% | 64.0% | 48.0% |
2. CWE-Bench v1 Evaluation (collinear-ai/cwe-bench)
Evaluated on 100 open-source repositories across 8 languages (Python, JS, TS, C, C++, Go, Java, PHP) covering 91 CWE classes:
| Model Name | Code Patch Rate | Exact Canonical Match | Hierarchical Match | Hierarchical Composite Score |
|---|---|---|---|---|
| CyberQwen-14B-Security-V2 | 99.0% (99/100) | 71.0% (71/100) | 74.0% (74/100) | 84.0% |
| Claude 3.5 Sonnet | 81.0% (81/100) | 62.0% (62/100) | 68.0% (68/100) | 72.4% |
| GPT-4o | 78.0% (78/100) | 58.0% (58/100) | 65.0% (65/100) | 69.3% |
| CyberQwen-14B-Security (Model V1) | ~52.0% (52/100) | ~28.0% (28/100) | ~35.0% (35/100) | 41.2% |
| Base Qwen 2.5 Coder 14B | 46.0% (46/100) | 22.0% (22/100) | 29.0% (29/100) | 34.6% |
3. ExploitGym Real-World Vulnerability Benchmark (cybergym.io)
Evaluated across 50 real-world vulnerability scenarios compiled from AddressSanitizer, MemorySanitizer, and UndefinedBehaviorSanitizer crash traces:
| Metric / Task | CyberQwen-14B-V2 | CyberQwen-14B-V1 (Baseline) | Frontier Baseline Avg |
|---|---|---|---|
| Scenarios Evaluated | 50 | 50 | 50 |
| Root Cause Diagnosis Accuracy | 100.0% (50/50) | ~64.0% (32/50) | 72.0% |
| PoV Exploit Synthesis Rate | 100.0% (50/50) | ~60.0% (30/50) | 68.0% |
| Remediation Patch Rate | 98.0% (49/50) | ~56.0% (28/50) | 64.0% |
| Composite ExploitGym Score | 99.6% | 61.3% | 69.8% |
🎯 Intended Uses & Scope
Direct Use Cases
- Automated Code Remediation: Refactoring vulnerable source code to secure patterns without introducing regressions.
- CI/CD SAST Alert Triaging: Validating scanner warnings against code semantics to filter out non-exploitable findings.
- SOC Threat Forensics: Analyzing security event logs, command executions, and memory dump traces to map adversarial activity to MITRE ATT&CK.
- Semgrep Static Rule Engineering: Generating syntax-valid AST rules to detect custom enterprise security anti-patterns.
Out-of-Scope Use
- Generating weaponized offensive exploits, autonomous malware development, or malicious dual-use evasion payloads.
- Replacing certified professional human penetration testing or formal security compliance audits.
📜 Citation & License
@misc{shah2026cyberqwen14b,
author = {Aarth Shah},
title = {CyberQwen-14B-Security: Defensive Cybersecurity Language Model},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/AarthShah/CyberQwen-14B-Security}}
}
This model is licensed under the Apache 2.0 License.