Instructions to use chrisrtt/ThesisCRott-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use chrisrtt/ThesisCRott-adapters with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
π‘οΈ 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
- -
Model tree for chrisrtt/ThesisCRott-adapters
Base model
Qwen/Qwen2.5-14B