-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_all_mini_finetuning.sh
82 lines (71 loc) · 2.93 KB
/
run_all_mini_finetuning.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
for ft_model in "bart_mini-MLM_PS" "bart_mini-MLM" "bart_mini-PS" "bart_mini-SI_bart" "bart_mini-SI_mass" "bart_mini-SI_t5"; do
for seed in 23 42 1984; do
# # finetune on CSD if not already done
# output_dir="resources/models/seed_${seed}/CSD/${ft_model}"
# if [ ! -d "$output_dir" ]; then
# sbatch --wait jobs/run_finetuning.sh \
# -i "tannonk/${ft_model}-s${seed}" -s $seed \
# -o "${output_dir}" \
# -d "resources/data/Commonsense-Dialogues/CSD"
# else
# echo "Model already exists: $output_dir"
# fi
# # finetune on DD if not already done
# output_dir="resources/models/seed_${seed}/DD/${ft_model}"
# if [ ! -d "$output_dir" ]; then
# sbatch --wait jobs/run_finetuning.sh \
# -i "tannonk/${ft_model}-s${seed}" -s $seed \
# -o "${output_dir}" \
# -d "resources/data/Daily-Dialog/DD"
# else
# echo "Model already exists: $output_dir"
# fi
# finetune on TC if not already done
output_dir="resources/models/seed_${seed}/TC/${ft_model}"
if [ ! -d "$output_dir" ]; then
sbatch jobs/run_finetuning.sh \
-i "tannonk/${ft_model}-s${seed}" -s $seed \
-o "${output_dir}" \
-d "resources/data/Topical-Chat/TC"
else
echo "Model already exists: $output_dir"
fi
done
done
# random inits - take the config from the MLM_PS model, but we init the weights randomly
for seed in 23 42 1984; do
# # finetune on CSD if not already done
# output_dir="resources/models/seed_${seed}/CSD/bart_mini-rndm"
# if [ ! -d "$output_dir" ]; then
# sbatch --wait jobs/run_finetuning.sh \
# -i "tannonk/bart_mini-MLM_PS-s${seed}" -s $seed \
# -o "${output_dir}" \
# -d "resources/data/Commonsense-Dialogues/CSD" \
# --init_as_random True
# else
# echo "Model already exists: $output_dir"
# fi
# # finetune on DD if not already done
# output_dir="resources/models/seed_${seed}/DD/bart_mini-rndm"
# if [ ! -d "$output_dir" ]; then
# sbatch --wait jobs/run_finetuning.sh \
# -i "tannonk/bart_mini-MLM_PS-s${seed}" -s $seed \
# -o "${output_dir}" \
# -d "resources/data/Daily-Dialog/DD" \
# --init_as_random True
# else
# echo "Model already exists: $output_dir"
# fi
output_dir="resources/models/seed_${seed}/TC/bart_mini-rndm"
if [ ! -d "$output_dir" ]; then
sbatch jobs/run_finetuning.sh \
-i "tannonk/bart_mini-MLM_PS-s${seed}" -s $seed \
-o "${output_dir}" \
-d "resources/data/Topical-Chat/TC" \
--init_as_random True
else
echo "Model already exists: $output_dir"
fi
done