Repository navigation
Expand file tree
/
Copy patheval_illada.sh
More file actions
180 lines (143 loc) · 5.83 KB
/
Copy patheval_illada.sh
File metadata and controls
180 lines (143 loc) · 5.83 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
pip install transformers==4.57.1 accelerate==0.34.2 lm-eval==0.4.10 peft
pip install antlr4-python3-runtime==4.11 math_verify sympy
pip install datasets==3.6.0
export HF_ALLOW_CODE_EVAL=1
export HF_DATASETS_TRUST_REMOTE_CODE=true
#===============================
# ILLaDA-8B-Base
#===============================
# For MMLU, ARC-C, Hellaswag, we use 8 gpus
accelerate_args="--multi_gpu --num_processes 8 --main_process_port $(expr $RANDOM % 10000 + 10000)"
accelerate launch $accelerate_args eval_illada.py
--tasks arc_challenge,hellaswag \
--num_fewshot 0 \
--model illada_dist \
--batch_size 32 \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',cfg=0.0,is_check_greedy=False,padd_eos=True,llh='confidence',add_bos_token=True
accelerate launch $accelerate_args eval_illada.py \
--tasks mmlu,cmmlu \
--num_fewshot 5 \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',cfg=0.0,is_check_greedy=False,mc_num=1,padd_eos=True,add_bos_token=True
# For BBH, GSM8K, Math, Humaneval and MBPP, we use 32 gpus
# You can modify the following lines to use your own cluster
accelerate_args="\
--multi_gpu \
--num_machines ${nnodes} \
--num_processes ${total_processes} \
--machine_rank ${ARNOLD_ID} \
--main_process_ip ${master_addr} \
--main_process_port ${master_port}"
accelerate launch $accelerate_args eval_illada.py \
--tasks bbh \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',gen_length=1024,steps=32,block_length=32,var=True
accelerate launch $accelerate_args eval_illada.py \
--tasks gsm8k_cot \
--model illada_dist \
--num_fewshot 8 \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',gen_length=1024,steps=32,block_length=32,var=True
accelerate launch $accelerate_args eval_illada.py \
--tasks minerva_math \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',gen_length=1024,steps=32,block_length=32,var=True
accelerate launch $accelerate_args eval_illada.py \
--tasks humaneval \
--model illada_dist \
--confirm_run_unsafe_code \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',gen_length=512,steps=512,block_length=512
accelerate launch $accelerate_args eval_illada.py \
--tasks mbpp \
--model illada_dist \
--confirm_run_unsafe_code \
--model_args model_path='GSAI-ML/iLLaDA-8B-Base',gen_length=1024,steps=32,block_length=32,var=True
#===============================
# ILLaDA-8B-Instruct
#===============================
# You can modify the following lines to use your own cluster
accelerate_args="\
--multi_gpu \
--num_machines ${nnodes} \
--num_processes ${total_processes} \
--machine_rank ${ARNOLD_ID} \
--main_process_ip ${master_addr} \
--main_process_port ${master_port}"
task='mmlu_redux_generative'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=4,block_length=4,steps=4 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 5 \
--confirm_run_unsafe_code \
--apply_chat_template \
--fewshot_as_multiturn
task='minerva_math'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=4096,steps=32,block_length=32,var=True,end_think_logit_boost=100,end_think_boost_power=3 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 0 \
--confirm_run_unsafe_code \
--apply_chat_template
export PYTHONPATH="./eval_instruct${PYTHONPATH:+:$PYTHONPATH}"
task='mmlu_generative'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=3,block_length=3,steps=3 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 5 \
--confirm_run_unsafe_code \
--apply_chat_template \
--fewshot_as_multiturn
export PYTHONPATH="./eval_instruct${PYTHONPATH:+:$PYTHONPATH}"
task='mmlu_pro_reasoning'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=4096,steps=32,block_length=32,var=True,end_think_logit_boost=100,end_think_boost_power=3 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 0 \
--confirm_run_unsafe_code \
--apply_chat_template
export PYTHONPATH="./eval_instruct${PYTHONPATH:+:$PYTHONPATH}"
task='gsm8k_cot_reasoning'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=2048,steps=32,block_length=32,var=True,end_think_logit_boost=100,end_think_boost_power=3 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 0 \
--confirm_run_unsafe_code \
--apply_chat_template
export PYTHONPATH="./eval_instruct${PYTHONPATH:+:$PYTHONPATH}"
task='humaneval_reasoning'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=2048,steps=32,block_length=32,var=True,end_think_logit_boost=100,end_think_boost_power=1 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 0 \
--output_path /mnt/hdfs/nieshen/Eval_illada_ablation/${task}_${epochs}epoch \
--log_samples \
--confirm_run_unsafe_code \
--apply_chat_template
export PYTHONPATH="./eval_instruct${PYTHONPATH:+:$PYTHONPATH}"
task='mbpp_reasoning'
accelerate launch $accelerate_args eval_illada.py \
--model illada_dist \
--model_args model_path='GSAI-ML/iLLaDA-8B-Instruct',gen_length=2048,steps=16,block_length=16,var=True,end_think_logit_boost=100,end_think_boost_power=3 \
--tasks ${task} \
--device cuda \
--batch_size 1 \
--num_fewshot 0 \
--confirm_run_unsafe_code \
--apply_chat_template