forked from cognitivecomputations/laserRMT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script_lm_eval.sh
47 lines (39 loc) · 1.22 KB
/
script_lm_eval.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
#!/bin/bash
# Check if a model name is provided as an argument
if [ -z "$1" ]; then
echo "No model name provided. Usage: $0 'model_path_or_name'"
exit 1
fi
# Assign the first argument to the MODEL_NAME variable
MODEL_NAME=$1
# Execute the lm_eval command with the specified model
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks mmlu -f 5 \
--device cuda:0 \
--batch_size 1 && \
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks winogrande -f 5\
--device cuda:0 \
--batch_size 4 && \
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks arc_challenge -f 25\
--device cuda:0 \
--batch_size 2 && \
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks hellaswag -f 10 \
--device cuda:0 \
--batch_size 2 && \
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks gsm8k -f 5 \
--device cuda:0 \
--batch_size 2 && \
lm_eval --model hf \
--model_args pretrained=$MODEL_NAME,trust_remote_code=True \
--tasks truthfulqa_mc2 \
--device cuda:0 \
--batch_size 4