update
Browse files- finetune_categorisation_base.gin +5 -4
- finetune_categorisation_large.gin +4 -3
- train_base.sh +1 -1
- train_large.sh +11 -0
finetune_categorisation_base.gin
CHANGED
@@ -12,7 +12,7 @@ include "t5x/configs/runs/finetune.gin"
|
|
12 |
|
13 |
MIXTURE_OR_TASK_NAME = "categorise"
|
14 |
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
|
15 |
-
TRAIN_STEPS =
|
16 |
USE_CACHED_TASKS = False
|
17 |
DROPOUT_RATE = 0.1
|
18 |
RANDOM_SEED = 0
|
@@ -26,9 +26,10 @@ RANDOM_SEED = 0
|
|
26 |
|
27 |
#INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
|
28 |
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_run1/checkpoint_1100000"
|
29 |
-
INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_t5x_base/
|
30 |
-
|
31 |
-
|
|
|
32 |
|
33 |
#train_script.train:
|
34 |
# eval_period = 500
|
|
|
12 |
|
13 |
MIXTURE_OR_TASK_NAME = "categorise"
|
14 |
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
|
15 |
+
TRAIN_STEPS = 1_635_000 # 1000000 pre-trained steps + 10000 fine-tuning steps.
|
16 |
USE_CACHED_TASKS = False
|
17 |
DROPOUT_RATE = 0.1
|
18 |
RANDOM_SEED = 0
|
|
|
26 |
|
27 |
#INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
|
28 |
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_run1/checkpoint_1100000"
|
29 |
+
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_t5x_base/checkpoint_1360000"
|
30 |
+
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_run1_lr_1/checkpoint_1100000"
|
31 |
+
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_scandinavian/checkpoint_1100000"
|
32 |
+
INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_t5x_base/checkpoint_1630000"
|
33 |
|
34 |
#train_script.train:
|
35 |
# eval_period = 500
|
finetune_categorisation_large.gin
CHANGED
@@ -7,12 +7,12 @@ from t5x import models
|
|
7 |
from t5x import partitioning
|
8 |
from t5x import utils
|
9 |
|
10 |
-
include "t5x/examples/t5/mt5/
|
11 |
include "t5x/configs/runs/finetune.gin"
|
12 |
|
13 |
MIXTURE_OR_TASK_NAME = "categorise"
|
14 |
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
|
15 |
-
TRAIN_STEPS =
|
16 |
USE_CACHED_TASKS = False
|
17 |
DROPOUT_RATE = 0.1
|
18 |
RANDOM_SEED = 0
|
@@ -25,8 +25,9 @@ RANDOM_SEED = 0
|
|
25 |
#LOSS_NORMALIZING_FACTOR = 234496
|
26 |
|
27 |
#INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
|
|
|
28 |
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_run1/checkpoint_1100000"
|
29 |
-
INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_t5x_base/checkpoint_1294000"
|
30 |
|
31 |
|
32 |
|
|
|
7 |
from t5x import partitioning
|
8 |
from t5x import utils
|
9 |
|
10 |
+
include "t5x/examples/t5/mt5/large.gin"
|
11 |
include "t5x/configs/runs/finetune.gin"
|
12 |
|
13 |
MIXTURE_OR_TASK_NAME = "categorise"
|
14 |
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 2}
|
15 |
+
TRAIN_STEPS = 1_005_000 # 1000000 pre-trained steps + 10000 fine-tuning steps.
|
16 |
USE_CACHED_TASKS = False
|
17 |
DROPOUT_RATE = 0.1
|
18 |
RANDOM_SEED = 0
|
|
|
25 |
#LOSS_NORMALIZING_FACTOR = 234496
|
26 |
|
27 |
#INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_base/checkpoint_1000000"
|
28 |
+
INITIAL_CHECKPOINT_PATH = "gs://t5-data/pretrained_models/t5x/mt5_large/checkpoint_1000000"
|
29 |
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/pk_nb_t5x_base_run1/checkpoint_1100000"
|
30 |
+
#INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_t5x_base/checkpoint_1294000"
|
31 |
|
32 |
|
33 |
|
train_base.sh
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
PROJECT_DIR=${HOME}"/models/t5-parliament-categorisation"
|
2 |
T5X_DIR="../../t5x" # directory where the t5x is cloned.
|
3 |
#Needs to be updated when moving to tpu-v4 it should then be in another zone
|
4 |
-
MODEL_DIR="gs://nb-t5x/
|
5 |
export PYTHONPATH=${PROJECT_DIR}
|
6 |
|
7 |
python3 ${T5X_DIR}/t5x/train.py \
|
|
|
1 |
PROJECT_DIR=${HOME}"/models/t5-parliament-categorisation"
|
2 |
T5X_DIR="../../t5x" # directory where the t5x is cloned.
|
3 |
#Needs to be updated when moving to tpu-v4 it should then be in another zone
|
4 |
+
MODEL_DIR="gs://nb-t5x/eval_norwegian_1_163_000"
|
5 |
export PYTHONPATH=${PROJECT_DIR}
|
6 |
|
7 |
python3 ${T5X_DIR}/t5x/train.py \
|
train_large.sh
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
PROJECT_DIR=${HOME}"/models/t5-parliament-categorisation"
|
2 |
+
T5X_DIR="../../t5x" # directory where the t5x is cloned.
|
3 |
+
#Needs to be updated when moving to tpu-v4 it should then be in another zone
|
4 |
+
MODEL_DIR="gs://nb-t5x/eval_large"
|
5 |
+
export PYTHONPATH=${PROJECT_DIR}
|
6 |
+
|
7 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
8 |
+
--gin_search_paths=${PROJECT_DIR} \
|
9 |
+
--gin_file="finetune_categorisation_large.gin" \
|
10 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'"
|
11 |
+
|