A LoRA adapter (r=16, alpha=32, 4-bit QLoRA / nf4) on Qwen/Qwen2.5-14B-Instruct for defensive, blue-team
vulnerability DETECTION. Given one code snippet it emits VERDICT: VULNERABLE or VERDICT: SAFE.
It classifies given code for triage — it never generates exploits and does not "fix" code.
This adapter is one point in a scaling + cross-dataset study. Best-calibrated point in the study (tuned ECE 0.012; the suite spans 1.5B / 7B / 14B / 32B). Honest caveat: on AUROC it does NOT beat the 7B champion (0.758 vs 0.786), and at n=200 cases per size the AUROC standard error is about 0.04, so small differences between sizes are within noise.
Every reported number is recomputed from recorded per-case eval outputs (see RESULTS.md in the repo).
Assistive, calibrated triage (best used with an abstention threshold). Not for autonomous gating,
exploit generation, or "fixing" code. The dangerous failure mode is a false SAFE verdict — always
keep a human reviewer in the loop.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen2.5-14B-Instruct"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "pallav0101/cyberdef-vuln-qwen2.5-14b-primevul")
Adapter: MIT. Base model Qwen/Qwen2.5-14B-Instruct: Apache-2.0 (used under its terms). No model-generated or commercial-API outputs were used as training data.
Qwen/Qwen2.5-14B-Instruct