pere commited on
Commit
91cf7d9
1 Parent(s): 612111e

more scandinavian pretraining scripts

Browse files
balanced_bokmaal_nynorsk_base.gin CHANGED
@@ -13,7 +13,7 @@ TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
13
  TRAIN_STEPS = 1_700_000
14
  DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
15
  INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_base/checkpoint_1500000"
16
- PjitPartitioner.num_partitions = 2
17
  utils.SaveCheckpointConfig.period = 5000
18
  utils.SaveCheckpointConfig.keep = 3
19
 
 
13
  TRAIN_STEPS = 1_700_000
14
  DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
15
  INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_base/checkpoint_1500000"
16
+ PjitPartitioner.num_partitions = 1
17
  utils.SaveCheckpointConfig.period = 5000
18
  utils.SaveCheckpointConfig.keep = 3
19
 
scandinavian_base.gin ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ include 't5x/examples/t5/mt5/base.gin'
2
+ include 'pretrain_cont.gin'
3
+ #include 't5x/configs/runs/pretrain.gin'
4
+ #iinclude 't5x/configs/runs/finetune.gin'
5
+
6
+
7
+ # Register necessary SeqIO Tasks/Mixtures.
8
+ import t5.data.mixtures
9
+ import tasks
10
+
11
+ MIXTURE_OR_TASK_NAME = "ncc_scandinavian_span_corruption_stream"
12
+ TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
13
+ TRAIN_STEPS = 1_500_000
14
+ DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
15
+ INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_base/checkpoint_1500000"
16
+ PjitPartitioner.num_partitions = 2
17
+
18
+
scandinavian_small.gin ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ include 't5x/examples/t5/mt5/small.gin'
2
+ include 'pretrain_cont.gin'
3
+ #include 't5x/configs/runs/pretrain.gin'
4
+ #iinclude 't5x/configs/runs/finetune.gin'
5
+
6
+
7
+ # Register necessary SeqIO Tasks/Mixtures.
8
+ import t5.data.mixtures
9
+ import tasks
10
+
11
+ MIXTURE_OR_TASK_NAME = "ncc_scandinavian_span_corruption_stream"
12
+ TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
13
+ TRAIN_STEPS = 1_500_000
14
+ DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
15
+ INITIAL_CHECKPOINT_PATH = "gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_small/checkpoint_1500000"
16
+ PjitPartitioner.num_partitions = 4
17
+
18
+
train_base_scandinavian.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ PROJECT_DIR=${HOME}"/models/pk-nb-t5x"
2
+ T5X_DIR="../../t5x" # directory where the t5x is cloned.
3
+ MODEL_DIR="gs://nb-t5x-us-central2/norwegian_NCC_plus_English_pluss200k_scandinavian_t5x_base"
4
+ export PYTHONPATH=${PROJECT_DIR}
5
+
6
+ python3 ${T5X_DIR}/t5x/train.py \
7
+ --gin_search_paths=${PROJECT_DIR} \
8
+ --gin_file="scandinavian_base.gin" \
9
+ --gin.MODEL_DIR="'${MODEL_DIR}'" \
train_small_scandinavian.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ PROJECT_DIR=${HOME}"/models/pk-nb-t5x"
2
+ T5X_DIR="../../t5x" # directory where the t5x is cloned.
3
+ MODEL_DIR="gs://nb-t5x-us-central2/norwegian_NCC_plus_English_pluss200k_scandinavian_t5x_small"
4
+ export PYTHONPATH=${PROJECT_DIR}
5
+
6
+ python3 ${T5X_DIR}/t5x/train.py \
7
+ --gin_search_paths=${PROJECT_DIR} \
8
+ --gin_file="scandinavian_small.gin" \
9
+ --gin.MODEL_DIR="'${MODEL_DIR}'" \