pycache
Browse files
__pycache__/my_metrics.cpython-38.pyc
DELETED
Binary file (458 Bytes)
|
|
__pycache__/tasks.cpython-38.pyc
DELETED
Binary file (4.82 kB)
|
|
finetune_classification_large_mt5.gin
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from __gin__ import dynamic_registration
|
2 |
+
import tasks
|
3 |
+
import seqio
|
4 |
+
|
5 |
+
import __main__ as train_script
|
6 |
+
from t5.data import mixtures
|
7 |
+
from t5x import models
|
8 |
+
from t5x import partitioning
|
9 |
+
from t5x import utils
|
10 |
+
|
11 |
+
include 't5x/examples/t5/mt5/large.gin'
|
12 |
+
include "t5x/configs/runs/finetune.gin"
|
13 |
+
|
14 |
+
MIXTURE_OR_TASK_NAME = %gin.REQUIRED
|
15 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
16 |
+
INITIAL_CHECKPOINT_PATH = %gin.REQUIRED
|
17 |
+
TRAIN_STEPS = %gin.REQUIRED # 1000000 pre-trained steps + 10000 fine-tuning steps.
|
18 |
+
USE_CACHED_TASKS = False
|
19 |
+
DROPOUT_RATE = 0.1
|
20 |
+
RANDOM_SEED = 0
|
21 |
+
|
22 |
+
#Fixing a small error
|
23 |
+
infer_eval/utils.DatasetConfig:
|
24 |
+
task_feature_lengths = %TASK_FEATURE_LENGTHS
|
25 |
+
|
26 |
+
#Saving every 1000 steps
|
27 |
+
utils.SaveCheckpointConfig:
|
28 |
+
period = 1000
|
29 |
+
keep = 1 # number of checkpoints to keep
|
30 |
+
|
31 |
+
# Might have to ba changed based on architecture
|
32 |
+
# partitioning.PjitPartitioner.num_partitions = 1
|
33 |
+
|
34 |
+
|
finetune_classification_large_scand.gin
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from __gin__ import dynamic_registration
|
2 |
+
import tasks
|
3 |
+
import seqio
|
4 |
+
|
5 |
+
import __main__ as train_script
|
6 |
+
from t5.data import mixtures
|
7 |
+
from t5x import models
|
8 |
+
from t5x import partitioning
|
9 |
+
from t5x import utils
|
10 |
+
|
11 |
+
include "t5x/examples/t5/t5_1_1/large.gin"
|
12 |
+
include "t5x/configs/runs/finetune.gin"
|
13 |
+
|
14 |
+
MIXTURE_OR_TASK_NAME = %gin.REQUIRED
|
15 |
+
TASK_FEATURE_LENGTHS = {"inputs": 512, "targets": 512}
|
16 |
+
INITIAL_CHECKPOINT_PATH = %gin.REQUIRED
|
17 |
+
TRAIN_STEPS = %gin.REQUIRED # 1000000 pre-trained steps + 10000 fine-tuning steps.
|
18 |
+
USE_CACHED_TASKS = False
|
19 |
+
DROPOUT_RATE = 0.1
|
20 |
+
RANDOM_SEED = 0
|
21 |
+
|
22 |
+
#Fixing a small error
|
23 |
+
infer_eval/utils.DatasetConfig:
|
24 |
+
task_feature_lengths = %TASK_FEATURE_LENGTHS
|
25 |
+
|
26 |
+
#Saving every 1000 steps
|
27 |
+
utils.SaveCheckpointConfig:
|
28 |
+
period = 1000
|
29 |
+
keep = 1 # number of checkpoints to keep
|
30 |
+
|
31 |
+
# Might have to ba changed based on architecture
|
32 |
+
# partitioning.PjitPartitioner.num_partitions = 1
|
33 |
+
|
34 |
+
VOCABULARY = @seqio.SentencePieceVocabulary()
|
35 |
+
seqio.SentencePieceVocabulary.sentencepiece_model_file = "gs://nb-t5/t5/vocabs/wikipedia/no-da-en-sv-nn-is_32000_unigram.sp.model"
|
36 |
+
seqio.SentencePieceVocabulary.extra_ids = 100
|
37 |
+
|