lm models for nynorsk
Browse files- balanced_bokmaal_nynorsk_lm_base.gin +21 -0
- balanced_bokmaal_nynorsk_lm_large.gin +21 -0
- balanced_bokmaal_nynorsk_lm_small.gin +21 -0
- balanced_bokmaal_nynorsk_lm_xl.gin +21 -0
- balanced_bokmaal_nynorsk_lm_xxl.gin +21 -0
- train_balanced_bokmaal_nynorsk_lm_base.sh +9 -0
- train_balanced_bokmaal_nynorsk_lm_large.sh +9 -0
- train_balanced_bokmaal_nynorsk_lm_small.sh +9 -0
- train_balanced_bokmaal_nynorsk_lm_xl.sh +9 -0
- train_balanced_bokmaal_nynorsk_lm_xxl.sh +9 -0
balanced_bokmaal_nynorsk_lm_base.gin
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = "balanced_bokmaal_nynorsk_lm_stream"
|
12 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
13 |
+
TRAIN_STEPS = 1_800_000
|
14 |
+
DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
|
15 |
+
INITIAL_CHECKPOINT_PATH = "gs://north-t5x/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_t5x_base/checkpoint_1700000"
|
16 |
+
#PjitPartitioner.num_partitions = 2
|
17 |
+
utils.SaveCheckpointConfig.period = 5000
|
18 |
+
utils.SaveCheckpointConfig.keep = 3
|
19 |
+
|
20 |
+
|
21 |
+
|
balanced_bokmaal_nynorsk_lm_large.gin
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include 't5x/examples/t5/mt5/large.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 = "balanced_bokmaal_nynorsk_lm_stream"
|
12 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
13 |
+
TRAIN_STEPS = 1_800_000
|
14 |
+
DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
|
15 |
+
INITIAL_CHECKPOINT_PATH = "gs://north-t5x/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_t5x_large/checkpoint_1700000"
|
16 |
+
#PjitPartitioner.num_partitions = 2
|
17 |
+
utils.SaveCheckpointConfig.period = 5000
|
18 |
+
utils.SaveCheckpointConfig.keep = 3
|
19 |
+
|
20 |
+
|
21 |
+
|
balanced_bokmaal_nynorsk_lm_small.gin
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = "balanced_bokmaal_nynorsk_lm_stream"
|
12 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
13 |
+
TRAIN_STEPS = 1_800_000
|
14 |
+
DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
|
15 |
+
INITIAL_CHECKPOINT_PATH = "gs://north-t5x/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_t5x_small/checkpoint_1700000"
|
16 |
+
#PjitPartitioner.num_partitions = 2
|
17 |
+
utils.SaveCheckpointConfig.period = 5000
|
18 |
+
utils.SaveCheckpointConfig.keep = 3
|
19 |
+
|
20 |
+
|
21 |
+
|
balanced_bokmaal_nynorsk_lm_xl.gin
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include 't5x/examples/t5/mt5/xl.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 = "balanced_bokmaal_nynorsk_lm_stream"
|
12 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
13 |
+
TRAIN_STEPS = 1_800_000
|
14 |
+
DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
|
15 |
+
INITIAL_CHECKPOINT_PATH = "gs://north-t5x/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_t5x_xl/checkpoint_1700000"
|
16 |
+
#PjitPartitioner.num_partitions = 2
|
17 |
+
utils.SaveCheckpointConfig.period = 5000
|
18 |
+
utils.SaveCheckpointConfig.keep = 3
|
19 |
+
|
20 |
+
|
21 |
+
|
balanced_bokmaal_nynorsk_lm_xxl.gin
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
include 't5x/examples/t5/mt5/xxl.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 = "balanced_bokmaal_nynorsk_lm_stream"
|
12 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
13 |
+
TRAIN_STEPS = 1_800_000
|
14 |
+
DROPOUT_RATE = 0.0 # Changed from the default since T5-1.1 recomments this.
|
15 |
+
INITIAL_CHECKPOINT_PATH = "gs://north-t5x/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_t5x_xxl/checkpoint_1700000"
|
16 |
+
#PjitPartitioner.num_partitions = 2
|
17 |
+
utils.SaveCheckpointConfig.period = 5000
|
18 |
+
utils.SaveCheckpointConfig.keep = 3
|
19 |
+
|
20 |
+
|
21 |
+
|
train_balanced_bokmaal_nynorsk_lm_base.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://t5x-training/pretrained_models/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_pluss100k_lm_t5x_base/"
|
4 |
+
export PYTHONPATH=${PROJECT_DIR}
|
5 |
+
|
6 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
7 |
+
--gin_search_paths=${PROJECT_DIR} \
|
8 |
+
--gin_file="balanced_bokmaal_nynorsk_lm_base.gin" \
|
9 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'" \
|
train_balanced_bokmaal_nynorsk_lm_large.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://t5x-training/pretrained_models/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_pluss100k_lm_t5x_large/"
|
4 |
+
export PYTHONPATH=${PROJECT_DIR}
|
5 |
+
|
6 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
7 |
+
--gin_search_paths=${PROJECT_DIR} \
|
8 |
+
--gin_file="balanced_bokmaal_nynorsk_lm_large.gin" \
|
9 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'" \
|
train_balanced_bokmaal_nynorsk_lm_small.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://t5x-training/pretrained_models/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_pluss100k_lm_t5x_small/"
|
4 |
+
export PYTHONPATH=${PROJECT_DIR}
|
5 |
+
|
6 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
7 |
+
--gin_search_paths=${PROJECT_DIR} \
|
8 |
+
--gin_file="balanced_bokmaal_nynorsk_lm_small.gin" \
|
9 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'" \
|
train_balanced_bokmaal_nynorsk_lm_xl.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://t5x-training/pretrained_models/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_pluss100k_lm_t5x_xl/"
|
4 |
+
export PYTHONPATH=${PROJECT_DIR}
|
5 |
+
|
6 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
7 |
+
--gin_search_paths=${PROJECT_DIR} \
|
8 |
+
--gin_file="balanced_bokmaal_nynorsk_lm_xl.gin" \
|
9 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'" \
|
train_balanced_bokmaal_nynorsk_lm_xxl.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://t5x-training/pretrained_models/norwegian_NCC_plus_English_pluss200k_balanced_bokmaal_nynorsk_pluss100k_lm_t5x_xxl/"
|
4 |
+
export PYTHONPATH=${PROJECT_DIR}
|
5 |
+
|
6 |
+
python3 ${T5X_DIR}/t5x/train.py \
|
7 |
+
--gin_search_paths=${PROJECT_DIR} \
|
8 |
+
--gin_file="balanced_bokmaal_nynorsk_lm_xxl.gin" \
|
9 |
+
--gin.MODEL_DIR="'${MODEL_DIR}'" \
|