Views
No views yet
CWE-79 or CWE-89, CWE-352.| file | quant | size | notes |
|---|---|---|---|
cve-cwe-gemma4-12b-Q8_0.gguf | Q8_0 | 11.8 GB | recommended — near-lossless |
cve-cwe-gemma4-12b-Q4_K_M.gguf | Q4_K_M | 6.87 GB | smaller/faster; some rare-CWE loss (see below) |
gemma4_unified) support.transformers model; Q8/Q4 are measured through Ollama.| metric | bf16 | Q8_0 | Q4_K_M |
|---|---|---|---|
| exact-match | 0.714 | 0.697 | 0.682 |
| micro-F1 | 0.756 | 0.732 | 0.718 |
| macro-F1 | 0.538 | 0.500 | 0.429 |
| easy exact | 0.805 | 0.808 | 0.793 |
| hard exact | 0.644 | 0.611 | 0.595 |
1# build the model from the GGUF (see the Modelfile below)
2ollama create cve-cwe-gemma4 -f Modelfile
3
4# IMPORTANT: gemma4 runs with "thinking" ON by default, which wastes ~100-900
5# tokens per query for this single-label task. Disable it:
6ollama run cve-cwe-gemma4
7>>> /set nothink
8>>> The update handler transmits user credentials over an unencrypted HTTP channel.
9CWE-319"think": false (the response field is the clean answer):1curl -s http://localhost:11434/api/generate -d '{
2 "model": "cve-cwe-gemma4",
3 "prompt": "SQL injection via the username parameter in the login form.",
4 "stream": false,
5 "think": false
6}'
7# -> {"response":"CWE-89", ...}1FROM ./cve-cwe-gemma4-12b-Q8_0.gguf
2
3TEMPLATE """{{ if .System }}<|turn>system
4{{ .System }}<turn|>
5{{ end }}<|turn>user
6{{ .Prompt }}<turn|>
7<|turn>model
8<|channel>thought
9<channel|>{{ .Response }}<turn|>
10"""
11
12SYSTEM """You are a vulnerability analyst. Given a CVE description, reply with only the CWE ID(s) it maps to, comma-separated."""
13
14PARAMETER temperature 0
15PARAMETER stop "<turn|>"
16PARAMETER stop "<|turn>"1llama-cli -m cve-cwe-gemma4-12b-Q8_0.gguf --jinja \
2 -sys "You are a vulnerability analyst. Given a CVE description, reply with only the CWE ID(s) it maps to, comma-separated." \
3 -p "A heap-based buffer overflow occurs when parsing a crafted font file."