-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_training_eval_bert_fewshot.sh
37 lines (33 loc) · 1.15 KB
/
run_training_eval_bert_fewshot.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
export CUDA_VISIBLE_DEVICES=2
model_name_or_path="michiyasunaga/BioLinkBERT-base" # "razent/SciFive-base-Pubmed_PMC"
########################MedQA########################
dataset_name=medqa
input_dataset_name=medqa
task='_all_qac_eA'
split='train_singletask'$task
batch_size=8
lr=5e-5
num_train_epochs=100
save_epoch_interval=1
num_warmup_steps=200
per_device_train_batch_size=$batch_size
gradient_accumulation_steps=1
seed=1
for shot in 100 200 500
do
python -W ignore run_bert_training_eval.py \
--model_name_or_path $model_name_or_path \
--dataset_name $dataset_name \
--seed $seed \
--num_train_epochs $num_train_epochs \
--num_warmup_steps $num_warmup_steps \
--per_device_train_batch_size $per_device_train_batch_size \
--gradient_accumulation_steps $gradient_accumulation_steps \
--shot $shot \
--train_split $split \
--eval_split qta_question_validation${task}_${dataset_name}\
--per_device_eval_batch_size 10 \
--train \
--test\
--output_dir ./results/$input_dataset_name/shot_${shot}_split_${split}_model_${model_name_or_path}_seed_${seed}_lr_${lr}
done