VulnLLM-R-7B — GGUF

GGUF conversions of Virtue-AI-HUB/VulnLLM-R-7B, a reasoning model for software vulnerability detection, fine-tuned from Qwen/Qwen2.5-7B-Instruct. Paper: arXiv:2512.07533.

These files run the model locally with llama.cpp, Ollama, LM Studio, and any GGUF runtime.

Files

File Quant Size Notes
VulnLLM-R-7B-f16.gguf F16 ~15 GB Full-precision GGUF; best quality, largest.
VulnLLM-R-7B-Q8_0.gguf Q8_0 ~8 GB 8-bit; near-lossless, recommended for most use.

Model specs

Property Value
Architecture qwen2 (Qwen2.5-7B-Instruct base)
Parameters ~7.6 B
Max context length 32,768 tokens (32K) — native
Layers 28
Embedding dim 3584
Attention GQA, 28 Q heads / 4 KV heads
Chat template ChatML (embedded in GGUF metadata)

Context notes: 32K is the native maximum (max_position_embeddings / qwen2.context_length). This fine-tune ships no rope_scaling, so there is no supported YaRN path beyond 32K — pushing past it degrades quality. Set your runtime window (num_ctx / -c) as high as 32768; higher windows cost more KV-cache memory (roughly: 8K ≈ 4 GB, 16K ≈ 7 GB, 32K ≈ 15 GB on top of the ~8 GB Q8_0 weights).

⚠️ This is a reasoning model — use the system prompt

VulnLLM-R generates a step-by-step chain-of-thought (inside a </think>-delimited block) before its final answer. If you prompt it with a bare question and no framing, it can drift out-of-distribution and produce noisy output. Always give it the analysis framing below — ideally as the system message so it triggers reliably.

Recommended system prompt:

You are an advanced vulnerability detection model. Analyze the following code
step-by-step to determine whether it contains a security vulnerability. Reason
about data flow, control flow, and security context, then give a final answer
that names the vulnerability, its CWE, and how to fix it. If the code is safe, say so.

Then send the code snippet as the user message.

Suggested sampling: temperature 0.3, top_p 0.8 (deterministic-leaning analysis).

Usage

Ollama

# Pull directly from this repo (Q8_0):
ollama pull hf.co/Euraika/VulnLLM-R-7B-GGUF:Q8_0

# Recommended: bake in the system prompt, sampling, and full 32K context via a Modelfile:
cat > Modelfile <<'MF'
FROM hf.co/Euraika/VulnLLM-R-7B-GGUF:Q8_0
SYSTEM """You are an advanced vulnerability detection model. Analyze the following code step-by-step to determine whether it contains a security vulnerability. Reason about data flow, control flow, and security context, then give a final answer that names the vulnerability, its CWE, and how to fix it. If the code is safe, say so."""
PARAMETER temperature 0.3
PARAMETER top_p 0.8
PARAMETER num_ctx 32768
MF
ollama create vulnllm-r-7b -f Modelfile
ollama run vulnllm-r-7b "<paste code here>"

llama.cpp

llama-cli -hf Euraika/VulnLLM-R-7B-GGUF:Q8_0 --temp 0.3 --top-p 0.8 -c 32768 \
  -sys "You are an advanced vulnerability detection model. Analyze the code step-by-step, reason about data/control flow and security context, then give a final answer with the vulnerability, its CWE, and a fix." \
  -p "<paste code here>"

Chat format (ChatML)

<|im_start|>system
{system}<|im_end|>
<|im_start|>user
{code}<|im_end|>
<|im_start|>assistant

Conversion

Converted from the original safetensors weights to GGUF and quantized to Q8_0. The F16 GGUF is the intermediate full-precision conversion; Q8_0 is quantized from it.

License & attribution

Released under Apache-2.0, inherited from the base model Virtue-AI-HUB/VulnLLM-R-7B (derived from Qwen2.5-7B-Instruct, Apache-2.0). All credit for the model belongs to the original authors; this repository only provides GGUF conversions. Please cite the paper and follow the upstream terms.

@article{nie2025vulnllmr,
  title={VulnLLM-R: Specialized Reasoning LLM with Agent Scaffold for Vulnerability Detection},
  author={Nie, Yuzhou and Li, Hongwei and Guo, Chengquan and Jiang, Ruizhe and Wang, Zhun and Li, Bo and Song, Dawn and Guo, Wenbo},
  journal={arXiv preprint arXiv:2512.07533},
  year={2025}
}
Downloads last month
244
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

8-bit

16-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Euraika/VulnLLM-R-7B-GGUF

Base model

Qwen/Qwen2.5-7B
Quantized
(12)
this model

Paper for Euraika/VulnLLM-R-7B-GGUF