forked from bigcode-project/bigcodebench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·39 lines (34 loc) · 1 KB
/
run.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
BS=5
DATASET=bigcodebench
MODEL=gpt-3.5-turbo-0125
BACKEND=openai
TEMP=0
N_SAMPLES=1
NUM_GPU=1
SPLIT=complete
SUBSET=hard
if [[ $MODEL == *"/"* ]]; then
ORG=$(echo $MODEL | cut -d'/' -f1)--
BASE_MODEL=$(echo $MODEL | cut -d'/' -f2)
else
ORG=""
BASE_MODEL=$MODEL
fi
if [ "$SUBSET" = "full" ]; then
FILE_HEADER="${ORG}${BASE_MODEL}--${DATASET}-${SPLIT}--${BACKEND}-${TEMP}-${N_SAMPLES}"
else
FILE_HEADER="${ORG}${BASE_MODEL}--${DATASET}-${SUBSET}-${SPLIT}--${BACKEND}-${TEMP}-${N_SAMPLES}"
fi
echo $FILE_HEADER
bigcodebench.generate \
--model $MODEL \
--resume \
--split $SPLIT \
--subset $SUBSET \
--backend $BACKEND \
--greedy
bigcodebench.sanitize --samples $FILE_HEADER.jsonl --calibrate
# Check if the ground truth works on your machine
bigcodebench.evaluate --split $SPLIT --subset $SUBSET --samples $FILE_HEADER-sanitized-calibrated.jsonl
# If the execution is slow:
bigcodebench.evaluate --split $SPLIT --subset $SUBSET --samples $FILE_HEADER-sanitized-calibrated.jsonl --parallel 32