-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathknowledge_xiezhi.sh
59 lines (56 loc) · 1.56 KB
/
knowledge_xiezhi.sh
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
#python evaluate.py \
# --sample_num=1000 \
# --options_num=8 \
# --language=chn \
# --model_name=THUDM/chatglm3-6b \
# --few_shot=3 \
# --task=xiezhi_inter_eng \
# --metric=mrr
# --model_cache_dir=../../CACHE_DIR
#
#read -n 1
options_nums=(4 8 16 32 50)
few_shots=(0 1 2 3)
glm_ver=(chatglm-6b chatglm2-6b chatglm3-6b)
task=(ceval mmlu xiezhi_inter_chn xiezhi_spec_chn xiezhi_inter_eng xiezhi_spec_eng)
# 两重循环
for task in ${task[@]}
do
for glm_ver in ${glm_ver[@]}
do
for options_num in ${options_nums[@]}
do
for few_shot in ${few_shots[@]}
do
# 执行你的代码
python ./Knowledge_Evaluator/xiezhi_evaluate.py \
--sample_num=-1 \
--options_num=$options_num \
--language=chn \
--task=$task \
--model_name=THUDM/$glm_ver \
--few_shot=$few_shot \
--metric=mrr \
--model_cache_dir=../CACHE_DIR
done
done
done
done
# --model_name' 模型名称
# --model_cache_dir' 模型存放位置
# --lora_name' lora名称
# --lora_cache_dir' lora存放位置
# --sample_num' 评估样本个数
# --language' 语种
# --batch_size'
# --options_num' 设置选项个数
# --re_inference' True = 直接读取现有结果不再重跑代码
# --result_path' 结果存放位置
# --metric' 度量指标,支持“mrr“和”hitn“,n为小于options_num的数字
# --random_seed'
# --few_shot' 样例个数
# --temperature'
# --topk'
# --topp'
# --num_beams'
# --max_new_tokens' 在xiezhi论文的设定中,max_new_tokens为1