|
--- |
|
library_name: transformers |
|
tags: [] |
|
--- |
|
|
|
EditCoder-Multi-6.7b (version 1) is a fine-tuned version of [DeepSeek Coder](deepseek-ai/deepseek-coder-6.7b-base) (base model, 6.7b parameters) for instructional code editing. |
|
We utilize [EditPackFT-Multi](https://huggingface.co/datasets/nuprl/EditPackFT-Multi) as our fine-tuning dataset. The model is trained on a variety of different languages. |
|
|
|
More information can be found on [our paper](https://arxiv.org/abs/2312.12450). |
|
|
|
## Citation |
|
If you use our work, please cite our paper as such: |
|
``` |
|
@misc{cassano2023edit, |
|
title={Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructions}, |
|
author={Federico Cassano and Luisa Li and Akul Sethi and Noah Shinn and Abby Brennan-Jones and Anton Lozhkov and Carolyn Jane Anderson and Arjun Guha}, |
|
year={2023}, |
|
eprint={2312.12450}, |
|
archivePrefix={arXiv}, |
|
primaryClass={cs.SE} |
|
} |
|
``` |
|
|
|
# Prompt |
|
The model has been trained on the following prompt format: |
|
``` |
|
## Code Before: |
|
{before} |
|
## Instruction: |
|
{instruction} |
|
## Code After: |
|
{after} |
|
``` |
|
|
|
Here is a python function that can be used for formatting the prompt correctly: |
|
```py |
|
def edit_prompt(old, instr): |
|
before = f"""## Code Before:\n{old}\n""" |
|
instr = f"""## Instruction:\n{instr}\n""" |
|
after = f"""## Code After:\n""" |
|
return before + instr + after |
|
``` |
|
|
|
# Train Your Own EditCoder |
|
We provide the full pipeline that was used for training our own edit-coder model. |
|
The pipeline and instructions can be found on our [GitHub repository](https://github.com/nuprl/CanItEdit/tree/main/editcoder). |