⚑ NEXUS-SENTINEL-1.5B: Autonomous Cyber-Reasoning Engine (LoRA)

License LoRA Base Model Hugging Face

πŸ“Œ 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
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for hammad986/nexus-sentinel-1.5b-cyber-reasoner

Adapter
(245)
this model