forked from nlpxucan/WizardLM
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1de0298
commit 5e735d8
Showing
6 changed files
with
131 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
######################################################################### | ||
# File Name: bigcode.sh | ||
# Author: Xianchao Wu | ||
# mail: [email protected] | ||
# Created Time: Tue Aug 15 07:29:09 2023 | ||
######################################################################### | ||
#!/bin/bash | ||
|
||
git clone https://github.com/bigcode-project/bigcode-evaluation-harness.git | ||
cd bigcode-evaluation-harness | ||
pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
######################################################################### | ||
# File Name: mbpp_1.sh | ||
# Author: Xianchao Wu | ||
# mail: [email protected] | ||
# Created Time: Thu Aug 10 06:39:18 2023 | ||
######################################################################### | ||
#!/bin/bash | ||
|
||
#model="/path/to/your/model" | ||
#model="/workspace/asr/WizardLM/WizardCoder/models--WizardLM--WizardCoder-15B-V1.0/snapshots/926ca1b215c4631bc5f8c3e47173381452c23e5c" | ||
model="/workspace/asr/Llama-X/src/checkpoints_wcode/models--WizardLM--WizardCoder-15B-V1.0/snapshots/69e87732535159460155972c3fac32a6241cc0ca" | ||
temp=0.2 # temperature, TODO reset this 温度 | ||
max_len=2048 | ||
pred_num=2 #200 | ||
num_seqs_per_iter=1 #2 | ||
|
||
output_path=preds/MBPP_T${temp}_N${pred_num} | ||
mbpp_path=data/mbpp.test.jsonl # we provide this file in data/mbpp.test.zip | ||
|
||
mkdir -p ${output_path} | ||
echo 'Output path: '$output_path | ||
echo 'Model to eval: '$model | ||
|
||
# for debug NOTE | ||
debug=0 | ||
if [[ $debug == 1 ]] | ||
then | ||
gpu=1 | ||
start_index=0 | ||
end_index=2 | ||
|
||
CUDA_VISIBLE_DEVICES=$gpu python -m ipdb src/mbpp_gen.py --model ${model} \ | ||
--start_index ${start_index} \ | ||
--end_index ${end_index} \ | ||
--temperature ${temp} \ | ||
--num_seqs_per_iter ${num_seqs_per_iter} \ | ||
--N ${pred_num} \ | ||
--max_len ${max_len} \ | ||
--output_path ${output_path} \ | ||
--mbpp_path ${mbpp_path} | ||
|
||
exit 0 | ||
fi | ||
|
||
# 500 problems, 63 per GPU if GPU=8 | ||
index=0 | ||
gpu_num=8 | ||
for ((i = 0; i < $gpu_num; i++)); do | ||
start_index=$((i * 50)) | ||
end_index=$(((i + 1) * 50)) | ||
|
||
gpu=$((i)) | ||
echo 'Running process #' ${i} 'from' $start_index 'to' $end_index 'on GPU' ${gpu} | ||
((index++)) | ||
( | ||
CUDA_VISIBLE_DEVICES=$gpu python src/mbpp_gen.py --model ${model} \ | ||
--start_index ${start_index} \ | ||
--end_index ${end_index} \ | ||
--temperature ${temp} \ | ||
--num_seqs_per_iter ${num_seqs_per_iter} \ | ||
--N ${pred_num} \ | ||
--max_len ${max_len} \ | ||
--output_path ${output_path} \ | ||
--mbpp_path ${mbpp_path} | ||
) & | ||
if (($index % $gpu_num == 0)); then wait; fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
######################################################################### | ||
# File Name: mbpp_2_a100.sh | ||
# Author: Xianchao Wu | ||
# mail: [email protected] | ||
# Created Time: Tue Aug 15 06:47:10 2023 | ||
######################################################################### | ||
#!/bin/bash | ||
|
||
temp=0.2 | ||
pred_num=2 | ||
|
||
output_path=preds/MBPP_T${temp}_N${pred_num} | ||
echo ${output_path} | ||
|
||
mbpp_path=data/mbpp.test.jsonl # we provide this file in data/mbpp.test.zip | ||
|
||
echo 'Output path: '$output_path | ||
|
||
python -m ipdb src/process_mbpp.py --path ${output_path} \ | ||
--out_path ${output_path}.jsonl \ | ||
--mbpp_path ${mbpp_path} \ | ||
--add_prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
######################################################################### | ||
# File Name: mbpp_3_a100.sh | ||
# Author: Xianchao Wu | ||
# mail: [email protected] | ||
# Created Time: Tue Aug 15 07:29:53 2023 | ||
######################################################################### | ||
#!/bin/bash | ||
|
||
jsonfn="/workspace/asr/WizardLM/WizardCoder/preds/MBPP_T0.2_N2.jsonl" | ||
|
||
#accelerate launch main.py --tasks mbpp \ | ||
python -m ipdb main.py --tasks mbpp \ | ||
--allow_code_execution \ | ||
--load_generations_path $jsonfn \ | ||
--model incoder-temperature-08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters