Downloads · 30 days
31
2% of all-time downloads
lambdasec/santafixer
santafixer is a text generation model from lambdasec. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This is a LLM for code that is focussed on generating bug fixes using infilling.
Downloads · 30 days
31
2% of all-time downloads
All-time downloads
1.3K
Public
Repo size
32.2 GB
Likes
3
Public
Click a slice to open those files.
.bin4.6 GB · 100%
From the Hugging Face model README
This is a LLM for code that is focussed on generating bug fixes using infilling.
Use the code below to get started with the model.
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "lambdasec/santafixer"
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForCausalLM.from_pretrained(checkpoint,
trust_remote_code=True).to(device)
input_text = "<fim-prefix>def print_hello_world():\n
<fim-suffix>\n print('Hello world!')
<fim-middle>"
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
The model was fine-tuned on the CVE single line fixes dataset
Supervised Fine Tuning (SFT)
The model was tested with the GitHub top 1000 projects vulnerabilities dataset