Instructions to use CoderDoge/synthfix-starcoder2-7b-sven with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use CoderDoge/synthfix-starcoder2-7b-sven with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-7b") model = PeftModel.from_pretrained(base_model, "CoderDoge/synthfix-starcoder2-7b-sven") - Notebooks
- Google Colab
- Kaggle
File size: 2,013 Bytes
63f3c4d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ---
library_name: peft
base_model: bigcode/starcoder2-7b
pipeline_tag: text-generation
tags:
- code
- program-repair
- vulnerability-repair
- peft
- lora
- synthfix
- router
- sven
---
# SynthFix starcoder2-7b (SVEN)
This repository contains the SynthFix LoRA repair-agent adapter and matching router checkpoint for **security vulnerability repair** on **SVEN**.
SynthFix is an adaptive neuro-symbolic code repair framework. During training, a lightweight router chooses between supervised fine-tuning (SFT) and reward fine-tuning (RFT), while the reward combines compiler-, analyzer-, and test-derived symbolic evidence. At inference time, the same evidence supports best-of-K candidate selection with a greedy floor.
## Contents
- `adapter_model.safetensors`, `adapter_config.json`: PEFT/LoRA adapter for `bigcode/starcoder2-7b`.
- tokenizer files copied from the training checkpoint.
- `router.pt`: PyTorch state dict for the SynthFix router associated with this adapter.
## Base Model
This adapter is intended to be loaded with `bigcode/starcoder2-7b` using `peft.PeftModel.from_pretrained`.
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "bigcode/starcoder2-7b"
adapter_id = "CoderDoge/synthfix-starcoder2-7b-sven"
tokenizer = AutoTokenizer.from_pretrained(adapter_id, trust_remote_code=True)
base = AutoModelForCausalLM.from_pretrained(base_model, trust_remote_code=True)
model = PeftModel.from_pretrained(base, adapter_id)
```
The router architecture is implemented in the SynthFix artifact repository: https://github.com/CoderDoge1108/SynthFix and https://github.com/largehappygroup/SynthFix.
## Paper
SynthFix: Adaptive Neuro-Symbolic Code Vulnerability Repair
- arXiv: https://arxiv.org/abs/2604.17184
- GitHub artifact: https://github.com/CoderDoge1108/SynthFix
## Notes
These are adapter weights rather than full copies of the base models. Users should follow the license and usage terms of the corresponding base model.
|