Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferences
Paper • 2506.00419 • Published
How to use StonyBrookNLP/StarCoder2-SFT with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("bigcode/starcoder2-7b")
model = PeftModel.from_pretrained(base_model, "StonyBrookNLP/StarCoder2-SFT")This is the adapter of the Starcoder2 model trained using SFT on DiSCo for the paper "Teaching an Old LLM Secure Coding: Localized Preference Optimization on Distilled Preferences" (https://arxiv.org/abs/2506.00419). Merge it to the base model "bigcode/starcoder2-7b" in order to use for downstream tasks.
Base model
bigcode/starcoder2-7b