Instructions to use AarthShah/CyberQwen-14B-Security with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AarthShah/CyberQwen-14B-Security with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AarthShah/CyberQwen-14B-Security") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AarthShah/CyberQwen-14B-Security") model = AutoModelForCausalLM.from_pretrained("AarthShah/CyberQwen-14B-Security", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use AarthShah/CyberQwen-14B-Security with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M # Run inference directly in the terminal: llama cli -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M # Run inference directly in the terminal: llama cli -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
Use Docker
docker model run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use AarthShah/CyberQwen-14B-Security with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AarthShah/CyberQwen-14B-Security" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AarthShah/CyberQwen-14B-Security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M
- SGLang
How to use AarthShah/CyberQwen-14B-Security 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 "AarthShah/CyberQwen-14B-Security" \ --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": "AarthShah/CyberQwen-14B-Security", "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 "AarthShah/CyberQwen-14B-Security" \ --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": "AarthShah/CyberQwen-14B-Security", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use AarthShah/CyberQwen-14B-Security with Ollama:
ollama run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M
- Unsloth Desktop
- Pi
How to use AarthShah/CyberQwen-14B-Security with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "AarthShah/CyberQwen-14B-Security:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use AarthShah/CyberQwen-14B-Security with Docker Model Runner:
docker model run hf.co/AarthShah/CyberQwen-14B-Security:Q4_K_M
- Lemonade
How to use AarthShah/CyberQwen-14B-Security with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AarthShah/CyberQwen-14B-Security:Q4_K_M
Run and chat with the model
lemonade run user.CyberQwen-14B-Security-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use AarthShah/CyberQwen-14B-Security with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
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 AarthShah/CyberQwen-14B-Security:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use AarthShah/CyberQwen-14B-Security with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf AarthShah/CyberQwen-14B-Security:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "AarthShah/CyberQwen-14B-Security:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
π‘οΈ CyberQwen-14B-Security (Model V1 - Baseline)
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.
- Downloads last month
- 538
Model tree for AarthShah/CyberQwen-14B-Security
Base model
Qwen/Qwen2.5-14BDataset used to train AarthShah/CyberQwen-14B-Security
Space using AarthShah/CyberQwen-14B-Security 1
Evaluation results
- Overall Defensive Score on Cybersecurity Enterprise Benchmarkself-reported84.000
- Vulnerability Repair (CWEs) on Cybersecurity Enterprise Benchmarkself-reported84.000
- DevSecOps False Positive Triage on Cybersecurity Enterprise Benchmarkself-reported88.000
- Semgrep AST Rule Synthesis on Cybersecurity Enterprise Benchmarkself-reported96.000
- SOC Threat Forensics on Cybersecurity Enterprise Benchmarkself-reported68.000