A LoRA adapter (r=16, alpha=32, 4-bit QLoRA / nf4) on Qwen/Qwen2.5-32B-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. Largest point in the study (1.5B / 7B / 14B / 32B). The recipe still helps at this size: selective AUROC on PrimeVul 0.614 -> 0.735 (+0.120) over its own base, tuned ECE 0.056. Honest caveat: it does NOT beat the 7B champion (0.735 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. Prefer the 7B unless you specifically need a 32B backbone.
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-32B-Instruct"
tok = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, "pallav0101/cyberdef-vuln-qwen2.5-32b-primevul")
Adapter: MIT. Base model Qwen/Qwen2.5-32B-Instruct: Apache-2.0 (used under its terms). No model-generated or commercial-API outputs were used as training data.
Qwen/Qwen2.5-32B-Instruct