-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathmmlu.sh
More file actions
57 lines (38 loc) · 1.24 KB
/
mmlu.sh
File metadata and controls
57 lines (38 loc) · 1.24 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
CMD="srun -N 1 --gres=gpu:4090:1 --pty python "
set -ex
basepath=/home/chenyidong/data/mixqdata
_dataset_path=/code/checkpoint/dataset
data_type=$1
models=( "falcon-7b" "vicuna-7b" "chatglm2-6b" )
ngpu=1
if [ ${data_type} == mix8 ]
then
for model in "${models[@]}"
do
echo ${model}
bit=${data_type:3:3}
CUDA_VISIBLE_DEVICES=0 ${CMD} examples/mmlu.py --model_type ${data_type} \
--hf_model_dir ${basepath}/quant8/${model} \
--data_dir ${basepath}/data/data
done
fi
if [ ${data_type} == fp16 ] || [ ${data_type} == bitsandbytes ]
then
for model in "${models[@]}"
do
echo ${model}
export TRANSFORMERS_VERBOSITY=error
CUDA_VISIBLE_DEVICES=0 ${CMD} examples/mmlu.py --model_type ${data_type} --hf_model_dir ${basepath}/${model} \
--hf_model_dir ${basepath}/${model} \
--data_dir ${basepath}/data/data
done
fi
if [ ${data_type} == awq ]
then
for model in "${models[@]}"
do
echo ${model}
CUDA_VISIBLE_DEVICES=0 ${CMD} examples/mmlu.py --model_type ${data_type} \
--hf_model_dir ${basepath}/${model}-AWQ --data_dir ${basepath}/data/data
done
fi