-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.sh
124 lines (121 loc) · 3.54 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/sh
source "${HOME}/bin/activate-tf1"
set -x
if [ -z $TPU_HOST ]
then
1>&2 echo "Set \$TPU_HOST"
exit 1
fi
#export TPU_CORES=8
#params=117M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test117m-0
#tpu=tpu-euw4a-69
#
#params=1.5B.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-0
#tpu=tpu-euw4a-69
#
#params=1558M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-1
#tpu=tpu-euw4a-68
#
#params=1558M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-2
#tpu=tpu-euw4a-67
#
#params=117M_memory_saving_gradients.json
#model_dir=gs://danbooru-euw4a/checkpoint/test117m-1
#tpu=tpu-euw4a-66
#
#params=117M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test117m-2
#tpu=tpu-euw4a-65
#
#params=1558M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-3
#tpu=tpu-euw4a-65
#
#params=1558M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-65
#tpu=tpu-euw4a-65
##export TPU_CORES=2
#
#params=1.5B.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-69
#tpu=tpu-euw4a-69
#
#params=1.5B_adam.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-67
#tpu=tpu-euw4a-67
#
#params=1.5B_adam.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-65
#tpu=tpu-euw4a-65
#
#params=1.5B_adam.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-70
#tpu=tpu-euw4a-70
#
#params=1.5B_adam.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-71
#tpu=tpu-euw4a-71
#restore_dir=gs://gpt-2/models/1558M
#
#params=1.5B_adam.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-78
#tpu=tpu-euw4a-78
#restore_dir=gs://danbooru-euw4a/models/1558M
#
#params=1.5B.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-76
#tpu=tpu-euw4a-76
##restore_dir=gs://danbooru-euw4a/models/1558M
#unset restore_dir
#
#params=1.5B.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-69
#tpu=tpu-euw4a-69
#restore_dir=gs://danbooru-euw4a/models/1558M
##unset restore_dir
##gsutil -m rm -rf "${model_dir}"
#
#params=1.5B.json
#model_dir=gs://danbooru-euw4a/checkpoint/test1558m-77
#tpu=tpu-euw4a-77
#restore_dir=gs://danbooru-euw4a/models/1558M
#unset restore_dir
#
#params=117M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test117m-71-2
#tpu=tpu-euw4a-71
#restore_dir=gs://danbooru-euw4a/models/117M
#dataset="--dataset combined-pgpf-ftfy.txt.npz"
##unset restore_dir
#
#params=117M.json
#model_dir=gs://danbooru-euw4a/checkpoint/test117m-76
#tpu=tpu-euw4a-76
##restore_dir=gs://danbooru-euw4a/models/117M
##restore_trainable="--restore_trainable_variables true"
#restore_dir="${model_dir}"
#dataset="--dataset combined-pgpf-ftfy.txt.npz"
##unset restore_dir
##gsutil -m rm -rf "${model_dir}"
#
export TPU_NAME="${TPU_NAME:-tpu-v3-128-euw4a-50}"
export TPU_CORES=128
params=117M.json
model_dir=gs://danbooru-euw4a/runs/gpt-2/run0-117m-tensorflow
restore_dir=gs://danbooru-euw4a/models/gpt-2/117M
restore_trainable="--restore_trainable_variables true"
#dataset="--dataset train.txt.tok16 --export_dataset datasets/train"
#dataset="--dataset train.txt.tok16"
#dataset="--dataset combined-pgpf-ftfy.txt.npz --export_dataset datasets/combined-pgpf-ftfy"
#dataset="--dataset gs://danbooru-euw4a/datasets/combined-pgpf-ftfy/*.tfrecords"
dataset="--dataset gs://dota-euw4a/data/tensorflow.tok16"
if [ ! -z "$restore_dir" ]
then
restore_dir="--restore_dir ${restore_dir} ${restore_trainable}"
fi
#exec python3 001_sharing.py --tpu "${tpu}" --model_dir "${model_dir}" --restore_dir "${restore_dir}" --params "${params}" "$@"
exec python3 -m pdb -c continue main_gpt2.py --tpu "${tpu}" --model_dir "${model_dir}" ${restore_dir} --params "${params}" --num_cores "${TPU_CORES}" ${dataset} "$@"