A QLoRA fine-tune of Qwen3-32B that maps a free-text CVE description to the CWE weakness
ID(s) it corresponds to. The LoRA adapter is merged into the base and released in 16-bit, so it
loads directly with transformers. A smaller/faster variant is available at
exploitintel/cve-cwe-qwen3-8b.
Trained only on labels where NVD and the CNA agree after roll-up to CWE View-1003 — see the
cve-cwe-consensus dataset.
| Metric | This model (32B) | 8B variant |
|---|---|---|
| Exact-match | 0.707 | 0.676 |
| Micro-F1 | 0.729 | 0.702 |
| Macro-F1 | 0.595 | 0.511 |
By difficulty (does the description name the weakness, or must it be inferred?):
| Stratum | n | Exact-match | Micro-F1 |
|---|---|---|---|
| Easy (weakness named) | 2,046 | 0.871 | 0.893 |
| Hard (must infer) | 4,756 | 0.636 | 0.657 |
Both models are scored identically; the 32B's gains are largest on macro-F1 (rare/long-tail CWEs) and the hard inference split.
Reading the numbers:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
mid = "exploitintel/cve-cwe-qwen3-32b"
tok = AutoTokenizer.from_pretrained(mid)
model = AutoModelForCausalLM.from_pretrained(mid, torch_dtype="auto", device_map="auto")
messages = [
{"role": "system", "content": "You are a vulnerability analyst. Given a CVE description, "
"reply with only the CWE ID(s) it maps to, comma-separated."},
{"role": "user", "content": "A SQL injection vulnerability in the login endpoint allows an "
"unauthenticated attacker to execute arbitrary SQL via the username parameter."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
# -> CWE-89
A Q4_K_M GGUF (~20 GB) is included in this repo for local runners — needs ~24 GB VRAM:
ollama run hf.co/exploitintel/cve-cwe-qwen3-32b:Q4_K_M
Set the same system prompt (/set system You are a vulnerability analyst...) so it returns bare CWE IDs.
Note: This Ollama command has not been verified end-to-end. This is a standard
qwen3model so the embedded template should apply normally — but ifollama runignores the system prompt and produces rambling text instead of a bare CWE ID, supply an explicit ChatML ModelfileTEMPLATEas shown in the Qwen3.5-4B card.
Qwen/Qwen3-32B (trained 4-bit via unsloth/Qwen3-32B-unsloth-bnb-4bit)exploitintel/cve-cwe-consensus — 69,386 rows (55,810 / 6,774 / 6,802), majority CWEs capped at 2,500ChatML (Qwen3 standard). Fixed system prompt; the description is the only user input.
You are a vulnerability analyst. Given a CVE description, reply with only the CWE ID(s) it maps to, comma-separated.CWE-79, CWE-80Apache-2.0 (inherited from Qwen3-32B). Dataset derives from public upstreams (NVD, MITRE CVE/CWE).
model-00001-of-00014.safetensors 4.9 GBmodel-00004-of-00014.safetensors 4.9 GBmodel-00005-of-00014.safetensors 4.9 GBmodel-00006-of-00014.safetensors 4.9 GBmodel-00007-of-00014.safetensors 4.9 GBmodel-00008-of-00014.safetensors 4.9 GBmodel-00009-of-00014.safetensors 4.9 GBmodel-00010-of-00014.safetensors 4.9 GBmodel-00011-of-00014.safetensors 4.9 GBmodel-00012-of-00014.safetensors 4.9 GBmodel-00013-of-00014.safetensors 4.9 GBmodel-00003-of-00014.safetensors 4.9 GBmodel-00002-of-00014.safetensors 4.9 GBmodel-00014-of-00014.safetensors 2.1 GBHave the files? Submit a torrent.
Submit a torrentHave the complete files and permission to share them? Replace the example folder path. The script checks the files, makes a torrent and submits its magnet and checksums. Keep your torrent client seeding. Get your community key from your settings, and read the script before running it.
curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo exploitintel/cve-cwe-qwen3-32b ./model-folderQwen/Qwen3-32B