-
Notifications
You must be signed in to change notification settings - Fork 34
/
mmlu.sh
32 lines (27 loc) · 976 Bytes
/
mmlu.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
export CUDA_VISIBLE_DEVICES=4,5,6,7
DATA_DIR=data/eval/mmlu
if [ ! -d $DATA_DIR ]; then
echo "Downloading MMLU data..."
wget -O data/mmlu_data.tar https://people.eecs.berkeley.edu/~hendrycks/data.tar
mkdir -p data/eval/mmlu_data
tar -xvf data/mmlu_data.tar -C data/eval/mmlu_data
mv data/eval/mmlu_data/data $DATA_DIR && rm -r data/eval/mmlu_data data/mmlu_data.tar
fi
MODEL_DIR=meta-llama/Llama-2-7b-hf
OUTPUT_DIR=results/mmlu/llama-2-7b-hf
python -m xchat.eval.mmlu.run_eval \
--ntrain 5 \
--data_dir $DATA_DIR \
--save_dir $OUTPUT_DIR \
--model_name_or_path $MODEL_DIR \
--tokenizer_name_or_path $MODEL_DIR \
--eval_batch_size 4
# MODEL_DIR=bigcode/starcoder
# OUTPUT_DIR=results/mmlu/starcoder
# python -m xchat.eval.mmlu.run_eval \
# --ntrain 5 \
# --data_dir $DATA_DIR \
# --save_dir $OUTPUT_DIR \
# --model_name_or_path $MODEL_DIR \
# --tokenizer_name_or_path $MODEL_DIR \
# --eval_batch_size 16