unknown commited on
Commit
2ca5da0
·
1 Parent(s): 0e72e2e
Files changed (2) hide show
  1. README.md +28 -27
  2. run_fine_tuning.sh +3 -4
README.md CHANGED
@@ -45,36 +45,11 @@ VEGA_AE
45
  - pip install -r requirements.txt
46
 
47
 
48
- ## 4. Fine-Tuning
49
-
50
- **Run fine-tuning with:**
51
- ```
52
- $ bash run_fine_tuning.sh
53
- ```
54
-
55
- Customize parameters for fine-tuning by modifying following options in the ```run_fine_tuning.sh```.
56
- ```
57
- --model_name_or_path ../../saved_models/UnixCoder \
58
- --train_filename ../../dataset/train.jsonl \
59
- --dev_filename ../../dataset/valid.jsonl \
60
- --output_dir ../../saved_models/New_Fine_Tuned_Model \
61
- --beam_size 4 \
62
- --train_batch_size 96 \
63
- --eval_batch_size 80 \
64
- --learning_rate 6e-5 \
65
- --num_train_epochs 50 \
66
- --mse_loss_weight 0.9 \
67
- --ce_loss_weight 0.1
68
- ```
69
- The fine-tuned model will be saved in ```--output_dir```.
70
-
71
- ## 5. Code Generation
72
 
73
  We have provided a fine-tuned model in ```./saved_models/Fine_Tuned_Model```.
74
 
75
- We have also provided a script fot functionality test, which only generates a single function for RI5CY, taking less than 3 minutes with 8 V100 GPU.
76
-
77
-
78
 
79
  **Run functionality test with:**
80
 
@@ -130,6 +105,32 @@ The inference result will be saved in ```--output_dir/result.jsonl```.
130
 
131
  The ```--output_dir``` parameter specifies the directory where the fine-tuned model is saved, such as ```./saved_models/Fine_Tuned_Model```.
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  ## 6. Reproducing Results in the Experiment
134
 
135
  We provide the scripts to reproduce each Figure/Table from the paper, along with the corresponding output result files, in the following table:
 
45
  - pip install -r requirements.txt
46
 
47
 
48
+ ## 4. Code Generation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  We have provided a fine-tuned model in ```./saved_models/Fine_Tuned_Model```.
51
 
52
+ We have also provided a script fot functionality test, which only generates a single function for RI5CY (Recorded as PULP in our dataset), taking less than 3 minutes with 8 V100 GPU.
 
 
53
 
54
  **Run functionality test with:**
55
 
 
105
 
106
  The ```--output_dir``` parameter specifies the directory where the fine-tuned model is saved, such as ```./saved_models/Fine_Tuned_Model```.
107
 
108
+
109
+
110
+ ## 5. Fine-Tuning (**Optional**)
111
+
112
+ **Run fine-tuning with:**
113
+ ```
114
+ $ bash run_fine_tuning.sh
115
+ ```
116
+
117
+ Customize parameters for fine-tuning by modifying following options in the ```run_fine_tuning.sh```.
118
+ ```
119
+ --model_name_or_path ../../saved_models/UnixCoder \
120
+ --train_filename ../../dataset/train.jsonl \
121
+ --dev_filename ../../dataset/valid.jsonl \
122
+ --output_dir ../../saved_models/New_Fine_Tuned_Model \
123
+ --beam_size 4 \
124
+ --train_batch_size 96 \
125
+ --eval_batch_size 80 \
126
+ --learning_rate 6e-5 \
127
+ --num_train_epochs 50 \
128
+ --mse_loss_weight 0.9 \
129
+ --ce_loss_weight 0.1
130
+ ```
131
+ The fine-tuned model will be saved in ```--output_dir```.
132
+
133
+
134
  ## 6. Reproducing Results in the Experiment
135
 
136
  We provide the scripts to reproduce each Figure/Table from the paper, along with the corresponding output result files, in the following table:
run_fine_tuning.sh CHANGED
@@ -7,10 +7,9 @@ python ./Scripts/UnixCoder/run_one_model.py \
7
  --dev_filename ../../dataset/valid.jsonl \
8
  --output_dir ../../saved_models/New_Fine_Tuned_Model \
9
  --beam_size 4 \
10
- --train_batch_size 96 \
11
- --eval_batch_size 80 \
12
  --learning_rate 6e-5 \
13
  --num_train_epochs 50 \
14
  --mse_loss_weight 0.9 \
15
- --ce_loss_weight 0.1
16
- ~
 
7
  --dev_filename ../../dataset/valid.jsonl \
8
  --output_dir ../../saved_models/New_Fine_Tuned_Model \
9
  --beam_size 4 \
10
+ --train_batch_size 64 \
11
+ --eval_batch_size 48 \
12
  --learning_rate 6e-5 \
13
  --num_train_epochs 50 \
14
  --mse_loss_weight 0.9 \
15
+ --ce_loss_weight 0.1