To install necessary dependencies, run the following command:
conda env create -f environment.yml
Data path: ./data/
args:
- -v: variant, i.e., distilbert, BERT, RoBERTa, XLNet, ALBERT
- -d: dataset name, i.e., app, code (Gerrit dataset), github, so (StackOverflow dataset), and jira.
python run_slm.py -v distilbert -d app
args:
- -d: dataset name, i.e., app, code (Gerrit dataset), github, so (StackOverflow dataset), and jira.
- -m: model name, i.e. llama2, wizardlm, vicuna
- -p: prompt template
python run_llm.py -d app -m llama2 -p llama2-1 -s 1
args:
- -d: dataset name, i.e., app, code (Gerrit dataset), github, so (StackOverflow dataset), and jira.
- -m: model name, i.e. llama2, wizardlm, vicuna
- -p: prompt template
- -s: shots, i.e., 0 for zero-shot, 1 for one-shot, 3 for three-shot, and 5 for five-shot.
python eval.py -d app -m vicuna -p vicuna-0 -s 0
The results are saved in ./results/
.
For instance, for the results of LLaMA2 on the APP dataset, the directory structure is as follows:
π¦results
β£ πapp
β β£ πllama2
β β β£ πfew-shot
β β β β πllama2
β β β β β£ π1
β β β β β£ π3
β β β β β£ π5
β β β πzero-shot
β β β β£ πllama2-0
β β β β£ πllama2-1
β β β β£ πllama2-2
draw_figures.py
: draw figures for the paper.preprocess.py
: preprocess the dataset.analyze_errors.py
: analyze the errors of the models.sample_few_shot.py
: sample few-shot examples from the dataset.