πŸ›‘οΈ ThesisCRott Adapters

LoRA adapters for repairing vulnerable C/C++ code with Qwen2.5-Coder

πŸ’» Code Β· Master thesis, Christian Rott, TU Darmstadt, 2026

98 LoRA adapters for Qwen2.5-Coder-7B/14B-Instruct. Each one takes a vulnerable function and its CWE label and returns a fix, as a diff or as the full function. Some were also trained with a taint slice from the function's code property graph.

πŸš€ Usage

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

sub = "7b/sft-grpo-diff/taint-slice/seed6"
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, "chrisrtt/ThesisCRott-adapters", subfolder=sub)
tok = AutoTokenizer.from_pretrained("chrisrtt/ThesisCRott-adapters", subfolder=sub)

Download only the folders you need:

hf download chrisrtt/ThesisCRott-adapters --include "7b/sft-diff/*"

πŸ“‚ Adapters

One adapter per folder: <size>/<method>/<training input>/seed<N>/.

Folder Method Training inputs #
7b/sft-diff/ SFT, diff answers no-slice, random-slice, taint-slice 15
7b/sft-function/ SFT, full-function answers no-slice, random-slice, taint-slice 15
7b/grpo-diff/ GRPO from the untuned model, diff answers no-slice, random-slice, taint-slice 15
7b/sft-grpo-diff/ SFT + GRPO, diff answers no-slice, random-slice, taint-slice 15
7b/sft-grpo-function/ SFT + GRPO, full-function answers no-slice, random-slice, taint-slice 15
7b/sft-grpo-diff-unanchored/ SFT + GRPO without reward anchoring, diff answers no-slice, random-slice, taint-slice 15
7b/sft-function-pointer/ SFT, full-function answers, oracle or random fix lines oracle-lines, random-lines 2
14b/sft-diff/ SFT, diff answers no-slice, taint-slice 2
14b/sft-function/ SFT, full-function answers no-slice, taint-slice 2
14b/sft-grpo-diff/ SFT + GRPO, diff answers no-slice, taint-slice 2

Training inputs. taint-slice: taint slice + CWE label Β· no-slice: CWE label only Β· random-slice: random lines + CWE label Β· oracle-lines / random-lines: the lines the real fix changed, or random lines.

Each folder holds the adapter, the tokenizer and chat template, run_config.json (training settings) and origin.json (run name in the experiment registry). GRPO folders also hold train_log.json.

πŸ“ Citation

@mastersthesis{rott2026thesis,
  author = {Christian Rott},
  title  = {Internalizing Vulnerability Awareness in Code LLMs via CWE-Augmented Code Property Graphs},
  school = {Technische UniversitΓ€t Darmstadt},
  year   = {2026}
}

License: Apache-2.0, like the Qwen2.5-Coder base models. Training data derive from PrimeVul (MIT).

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for chrisrtt/ThesisCRott-adapters

Base model

Qwen/Qwen2.5-14B
Adapter
(100)
this model