File size: 5,874 Bytes
d91766b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 | export HF_ALLOW_CODE_EVAL=1
export HF_DATASETS_TRUST_REMOTE_CODE=true
export HF_ENDPOINT="https://hf-mirror.com"
############################################### gsm8k evaluations ###############################################
task=gsm8k
length=256
block_length=32
num_fewshot=0
steps=256
threshold=0.5
model_path="TAD-LLaDA Path"
# TAD-LLaDA
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29601 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},threshold=${threshold},multi_block=True,block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/gsm8k-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock \
--output_path evals_results/TAD-LLaDA/gsm8k-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock --log_samples \
# TAD-LLaDA-TPF1
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29601 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},threshold=0,block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/TPF1-gsm8k-ns${num_fewshot}-${length}-${block_length} \
--output_path evals_results/TAD-LLaDA/TPF1-gsm8k-ns${num_fewshot}-${length}-${block_length} --log_samples \
############################################### math evaluations ###############################################
task=minerva_math
length=256
block_length=32
num_fewshot=4
steps=256
# TAD-LLaDA
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29603 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},multi_block=True,threshold=${threshold},block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/math-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock \
--output_path evals_results/TAD-LLaDA/math-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock --log_samples \
# TAD-LLaDA-TPF1
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29603 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},threshold=0,block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/TPF1-math-ns${num_fewshot}-${length}-${block_length} \
--output_path evals_results/TAD-LLaDA/TPF1-math-ns${num_fewshot}-${length}-${block_length} --log_samples \
############################################### humaneval evaluations ###############################################
task=humaneval
length=256
block_length=32
num_fewshot=0
steps=256
# TAD-LLaDA
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29602 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},multi_block=True,threshold=${threshold},block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/humaneval-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock \
--output_path evals_results/TAD-LLaDA/humaneval-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock --log_samples \
# TAD-LLaDA-TPF1
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29602 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},threshold=0,block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/TPF1-humaneval-ns${num_fewshot}-${length}-${block_length} \
--output_path evals_results/TAD-LLaDA/TPF1-humaneval-ns${num_fewshot}-${length}-${block_length} --log_samples \
############################################### mbpp evaluations ###############################################
task=mbpp
length=256
block_length=32
num_fewshot=3
steps=256
threshold=0.5
# TAD-LLaDA
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29604 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},multi_block=True,,threshold=${threshold},block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/mbpp-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock \
--output_path evals_results/TAD-LLaDA/mbpp-ns${num_fewshot}-${length}-${block_length}-threshold${threshold}-multiblock --log_samples \
# TAD-LLaDA-TPF1
CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python -m accelerate.commands.launch --main_process_port 29604 eval_llada.py --tasks ${task} --num_fewshot ${num_fewshot} --limit 10000 \
--confirm_run_unsafe_code --model llada_dist \
--model_args model_path=${model_path},gen_length=${length},steps=${steps},threshold=0,block_length=${block_length},show_speed=True,task=${task},save_dir=evals_results/TAD-LLaDA/TPF1-mbpp-ns${num_fewshot}-${length}-${block_length} \
--output_path evals_results/TAD-LLaDA/TPF1-mbpp-ns${num_fewshot}-${length}-${block_length} --log_samples \
|