14 Downloads Updated 1 year ago
This model has been fine-tuned on the swe_bench
dataset to automate the generation of bug fixes in software engineering tasks. It leverages issue descriptions, code diffs, and historical bug context to generate precise patches. The primary use case is to assist developers by quickly generating code fixes based on detailed bug descriptions.
The model is designed for developers and software teams to automatically generate code patches for software issues. It can handle a variety of inputs such as issue descriptions and additional context and is ideal for teams dealing with frequent bug reports.
fix_issue_description
.fix_story
.fix_assertion_1
, fix_assertion_2
, etc.bug_pr
, bug_story
, etc., used during fine-tuning but not required for inference.swe_bench-lite
This model is fine-tuned on the swe_bench
dataset. The dataset includes:
- (Issue Description): Describes the bug in detail.
- (Issue Story): Provides additional narrative or context around the bug.
- : Related to the fix to ensure certain conditions are met.
- (Bug and PR Context): Provides historical context on bugs, used in fine-tuning.
- , , : File paths and code diffs used to train the model to generate fixes.
from transformers import LlamaForCausalLM, LlamaTokenizer
# Load the model and tokenizer
model = LlamaForCausalLM.from_pretrained('gtandon/ft_llama3_1_swe_bench')
tokenizer = LlamaTokenizer.from_pretrained('gtandon/ft_llama3_1_swe_bench')
# Example input (issue description)
issue_description = "Function X throws an error when Y happens."
inputs = tokenizer(issue_description, return_tensors="pt")
# Generate a patch
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0]))
Please cite this model as follows:
@inproceedings{tandon_ft_llama3_1_swe_bench,
title={Automatic Bug Fix Generation using Llama-3.1 and SWE Bench Dataset},
author={Gauransh Tandon, Caroline Lemiuex, and Reid Holmes},
year={2024},
publisher={Hugging Face}
}