Text Generation
PEFT
Safetensors
English
code
cybersecurity
vulnerability-audit
zero-day-reasoning
lora
qwen2.5-coder
Instructions to use hammad986/nexus-sentinel-1.5b-cyber-reasoner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use hammad986/nexus-sentinel-1.5b-cyber-reasoner with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "hammad986/nexus-sentinel-1.5b-cyber-reasoner") - Notebooks
- Google Colab
- Kaggle
β‘ NEXUS-SENTINEL-1.5B: Autonomous Cyber-Reasoning Engine (LoRA)
π Model Overview
NEXUS-SENTINEL-1.5B is an autonomous security-auditing and reasoning code model fine-tuned on top of Qwen/Qwen2.5-Coder-1.5B-Instruct using Low-Rank Adaptation (LoRA).
Unlike standard coding models that only generate generic functions, NEXUS-SENTINEL-1.5B is specifically adapted for:
- π‘οΈ Zero-Day Vulnerability Auditing: Memory corruption (CWE-120), SQLi, SSRF, Deserialization, Race conditions, and Smart Contract Reentrancy.
- π§ Deep Reasoning Traces (
<think> ... </think>): Exposes chain-of-thought analysis exploring attacker exploit vectors, root causes, and CVSS severity before writing code. - π Defense-in-Depth Synthesis: Generates hardened, production-grade exploit-mitigation code with constant-time protections and strict boundary validation.
βοΈ LoRA PEFT Training Configuration
- Base Architecture:
Qwen/Qwen2.5-Coder-1.5B-Instruct(1.54B Parameters) - Adapter Type: LoRA (Low-Rank Adaptation)
- LoRA Rank ($r$):
16 - LoRA Alpha ($lpha$):
32 - LoRA Dropout:
0.05 - Target Modules:
q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj - Trainable Parameters:
4,204,544(0.272% of total weights)
π Quickstart Inference
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# 1. Load Base Model
base_model_id = "Qwen/Qwen2.5-Coder-1.5B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto"
)
# 2. Attach LoRA Adapter
model = PeftModel.from_pretrained(base_model, "hammad986/nexus-sentinel-1.5b-cyber-reasoner")
# 3. Prompt the Autonomous Security Reasoner
prompt = """Audit this C socket handler for buffer overflow vulnerabilities:
void handle(int sock) {
char buf[128];
read(sock, buf, 512);
}
"""
messages = [
{"role": "system", "content": "You are Nexus-Sentinel, an elite cybersecurity auditor. Reason through exploit vectors inside <think> tags, then output hardened code."},
{"role": "user", "content": prompt}
]
input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=512, temperature=0.2)
print(tokenizer.decode(output[0], skip_special_tokens=True))
β Social Media Note
Trained with aesthetic precision. "Back to form, teaching machines how to think."
- Downloads last month
- 22
Model tree for hammad986/nexus-sentinel-1.5b-cyber-reasoner
Base model
Qwen/Qwen2.5-1.5B Finetuned
Qwen/Qwen2.5-Coder-1.5B Finetuned
Qwen/Qwen2.5-Coder-1.5B-Instruct