This is the merged 16-bit (bf16) model for
transformers
/ vLLM / TGI. Quantized GGUFs for Ollama and llama.cpp are at
exploitintel/cve-cwe-gemma4-12b-GGUF
.
Results
Held-out test split (
exploitintel/cve-cwe-consensus
, 10,514 examples), greedy decoding,
description-only
(no CVE-ID or label metadata in the prompt). Rows are split into
easy
(the weakness is named in the text) vs
hard
(it must be inferred).
metric
this model (bf16)
v1 baseline*
exact-match
0.714
0.29
micro-F1
0.756
0.32
macro-F1
0.538
0.067
easy exact-match
0.805
—
hard exact-match
0.644
—
* v1 baseline = a 1-epoch Gemma-4-E4B fine-tune. The headline gain is
macro-F1
(the rare-CWE long tail), which improves ~8×;
hard
(must-infer) exact-match of 0.644 is close to
easy
(0.805), indicating the model genuinely infers weaknesses rather than only keyword-matching.
Usage
Requires
transformers >= 5.10
(Gemma 4 is the
gemma4_unified
architecture).
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "exploitintel/cve-cwe-gemma4-12b"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto").eval()
cve = ("A vulnerability in the login form allows remote attackers to execute ""arbitrary SQL commands via the username parameter.")
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": cve},
]
prompt = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=32, do_sample=False)
print(tok.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# -> CWE-89
Intended use:
triage assistance — suggesting candidate CWE mappings for a CVE description.
It is
description-only
: quality depends on how well the text describes the weakness. Vague descriptions yield weaker predictions (see the
hard
split).
It can predict CWEs outside the true set; treat outputs as suggestions, not authoritative classifications, and keep a human in the loop for security-relevant decisions.
Scope is MITRE View-1003; CWEs outside that view are not modeled.
License
Apache-2.0, inherited from the Gemma 4 base model.
Runs of exploitintel cve-cwe-gemma4-12b on huggingface.co
19
Total runs
0
24-hour runs
-1
3-day runs
3
7-day runs
6
30-day runs
More Information About cve-cwe-gemma4-12b huggingface.co Model
cve-cwe-gemma4-12b huggingface.co is an AI model on huggingface.co that provides cve-cwe-gemma4-12b's model effect (), which can be used instantly with this exploitintel cve-cwe-gemma4-12b model. huggingface.co supports a free trial of the cve-cwe-gemma4-12b model, and also provides paid use of the cve-cwe-gemma4-12b. Support call cve-cwe-gemma4-12b model through api, including Node.js, Python, http.
cve-cwe-gemma4-12b huggingface.co is an online trial and call api platform, which integrates cve-cwe-gemma4-12b's modeling effects, including api services, and provides a free online trial of cve-cwe-gemma4-12b, you can try cve-cwe-gemma4-12b online for free by clicking the link below.
exploitintel cve-cwe-gemma4-12b online free url in huggingface.co:
cve-cwe-gemma4-12b is an open source model from GitHub that offers a free installation service, and any user can find cve-cwe-gemma4-12b on GitHub to install. At the same time, huggingface.co provides the effect of cve-cwe-gemma4-12b install, users can directly use cve-cwe-gemma4-12b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.