-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_eval.sh
42 lines (32 loc) · 1.01 KB
/
run_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
#!/bin/bash
set -e
num_gpus=1
export CUDA_VISIBLE_DEVICES=0
# sampling parameters
temperature=0
top_p=1.0
### Run using model hosted on Huggingface and store results locally
# Set directory to store outputs
model="<HUGGINGFACE MODEL REPO HERE>"
eval_dir="./models/${model}/eval_result"
output_path="${eval_dir}/{dataset_name}/judge_{prompt}_{signature}.jsonl" # main_eval.py will format `prompt` and `signature`
python -u \
main_eval.py \
--model $model \
--num_gpus $num_gpus \
--eval_dataset all \
--output_path $output_path \
--temperature $temperature \
--top_p $top_p \
### Run using local model hosted on Huggingface and store results in local model folder
model=/path/to/your/local/model
eval_dir="${model}/eval_result"
output_path="${eval_dir}/{dataset_name}/judge_{prompt}_{signature}.jsonl"
python -u \
main_eval.py \
--model $model \
--num_gpus $num_gpus \
--eval_dataset all \
--output_path $output_path \
--temperature $temperature \
--top_p $top_p \