-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScoring.sh
57 lines (48 loc) · 1.38 KB
/
Scoring.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
48
49
50
51
52
53
54
55
56
57
#!/bin/zsh
output_notation='noproj'
model_name_or_path=''
max_token_length=2048
proj_d=8192
seed=42
overwrite=True
checkpoint_path=''
train_set_path=''
tr_lang="English"
scoring_weight=0
python Calculate_grad.py \
--output_notation=$output_notation \
--model_name_or_path=$model_name_or_path \
--max_token_length=$max_token_length \
--proj_d=$proj_d \
--seed=$seed \
--overwrite=$overwrite \
--checkpoint_path=$checkpoint_path \
--train_set_path=$train_set_path
python Compute_score.py \
--tr_lang=$tr_lang \
--output_notation=$output_notation \
--scoring_weight=$scoring_weight \
--checkpoint_path=$checkpoint_path \
--train_set_path=$train_set_path \
--score_save_path=$train_set_path
### Baseline methods:
# IFD/PPL score
save_name='./IFD_out/temp_ppl.pt'
python inference_loss.py \
--data_path=$train_set_path \
--save_name=$save_name \
--model_name_or_path=$model_name_or_path \
--checkpoint_path=$checkpoint_path \
--prompt='alpaca' \
--mod='cherry'
python IFD_PPL_score.py \
--pt_data_path=$save_name \
--json_data_path=$train_set_path \
--json_save_path=$train_set_path \
--model_name_or_path=$model_name_or_path \
--checkpoint_path=$checkpoint_path
# Datainf score
python DataInf.py \
--tr_lang=$tr_lang \
--train_set_path=$train_set_path \
--score_save_path=$train_set_path