pere commited on
Commit
634a1b6
1 Parent(s): d205336

Commit from model create scripts

Browse files
.gitattributes CHANGED
@@ -25,3 +25,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
config.gin ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from __gin__ import dynamic_registration
2
+ import __main__ as train_script
3
+ import seqio
4
+ import t5.data.mixtures
5
+ from t5x import adafactor
6
+ from t5x.examples.t5 import network
7
+ from t5x import gin_utils
8
+ from t5x import models
9
+ from t5x import partitioning
10
+ from t5x import trainer
11
+ from t5x import utils
12
+ import tasks
13
+
14
+ # Macros:
15
+ # ==============================================================================
16
+ BATCH_SIZE = 128
17
+ DROPOUT_RATE = 0.0
18
+ INITIAL_CHECKPOINT_PATH = \
19
+ 'gs://nb-t5x-us-central2/norwegian_NCC_plus_English_t5x_large/checkpoint_1500000'
20
+ LABEL_SMOOTHING = 0.0
21
+ LOSS_NORMALIZING_FACTOR = None
22
+ MIXTURE_OR_TASK_MODULE = None
23
+ MIXTURE_OR_TASK_NAME = 'ncc_english_prefix_lm_stream'
24
+ MODEL = @models.EncoderDecoderModel()
25
+ MODEL_DIR = \
26
+ 'gs://nb-t5x-us-central2/norwegian_NCC_plus_English_pluss100k_lm_t5x_large'
27
+ OPTIMIZER = @adafactor.Adafactor()
28
+ RANDOM_SEED = None
29
+ SHUFFLE_TRAIN_EXAMPLES = True
30
+ TASK_FEATURE_LENGTHS = {'inputs': 512, 'targets': 512}
31
+ TRAIN_STEPS = 1600000
32
+ USE_CACHED_TASKS = True
33
+ USE_HARDWARE_RNG = False
34
+ VOCABULARY = @seqio.SentencePieceVocabulary()
35
+ Z_LOSS = 0.0001
36
+
37
+ # Parameters for adafactor.Adafactor:
38
+ # ==============================================================================
39
+ adafactor.Adafactor.decay_rate = 0.8
40
+ adafactor.Adafactor.logical_factor_rules = \
41
+ @adafactor.standard_logical_factor_rules()
42
+ adafactor.Adafactor.step_offset = 0
43
+
44
+ # Parameters for utils.CheckpointConfig:
45
+ # ==============================================================================
46
+ utils.CheckpointConfig.restore = @utils.RestoreCheckpointConfig()
47
+ utils.CheckpointConfig.save = @utils.SaveCheckpointConfig()
48
+
49
+ # Parameters for utils.create_learning_rate_scheduler:
50
+ # ==============================================================================
51
+ utils.create_learning_rate_scheduler.base_learning_rate = 0.5
52
+ utils.create_learning_rate_scheduler.factors = 'constant * rsqrt_decay'
53
+ utils.create_learning_rate_scheduler.warmup_steps = 10000
54
+
55
+ # Parameters for train/utils.DatasetConfig:
56
+ # ==============================================================================
57
+ train/utils.DatasetConfig.batch_size = %BATCH_SIZE
58
+ train/utils.DatasetConfig.mixture_or_task_name = %MIXTURE_OR_TASK_NAME
59
+ train/utils.DatasetConfig.module = %MIXTURE_OR_TASK_MODULE
60
+ train/utils.DatasetConfig.pack = True
61
+ train/utils.DatasetConfig.seed = None
62
+ train/utils.DatasetConfig.shuffle = %SHUFFLE_TRAIN_EXAMPLES
63
+ train/utils.DatasetConfig.split = 'train'
64
+ train/utils.DatasetConfig.task_feature_lengths = %TASK_FEATURE_LENGTHS
65
+ train/utils.DatasetConfig.use_cached = %USE_CACHED_TASKS
66
+
67
+ # Parameters for train_eval/utils.DatasetConfig:
68
+ # ==============================================================================
69
+ train_eval/utils.DatasetConfig.batch_size = %BATCH_SIZE
70
+ train_eval/utils.DatasetConfig.mixture_or_task_name = %MIXTURE_OR_TASK_NAME
71
+ train_eval/utils.DatasetConfig.module = %MIXTURE_OR_TASK_MODULE
72
+ train_eval/utils.DatasetConfig.pack = True
73
+ train_eval/utils.DatasetConfig.seed = 42
74
+ train_eval/utils.DatasetConfig.shuffle = False
75
+ train_eval/utils.DatasetConfig.split = 'validation'
76
+ train_eval/utils.DatasetConfig.task_feature_lengths = %TASK_FEATURE_LENGTHS
77
+ train_eval/utils.DatasetConfig.use_cached = %USE_CACHED_TASKS
78
+
79
+ # Parameters for models.EncoderDecoderModel:
80
+ # ==============================================================================
81
+ models.EncoderDecoderModel.input_vocabulary = %VOCABULARY
82
+ models.EncoderDecoderModel.label_smoothing = %LABEL_SMOOTHING
83
+ models.EncoderDecoderModel.loss_normalizing_factor = %LOSS_NORMALIZING_FACTOR
84
+ models.EncoderDecoderModel.module = @network.Transformer()
85
+ models.EncoderDecoderModel.optimizer_def = %OPTIMIZER
86
+ models.EncoderDecoderModel.output_vocabulary = %VOCABULARY
87
+ models.EncoderDecoderModel.z_loss = %Z_LOSS
88
+
89
+ # Parameters for partitioning.PjitPartitioner:
90
+ # ==============================================================================
91
+ partitioning.PjitPartitioner.logical_axis_rules = \
92
+ @partitioning.standard_logical_axis_rules()
93
+ partitioning.PjitPartitioner.model_parallel_submesh = None
94
+ partitioning.PjitPartitioner.num_partitions = 8
95
+
96
+ # Parameters for utils.RestoreCheckpointConfig:
97
+ # ==============================================================================
98
+ utils.RestoreCheckpointConfig.dtype = 'float32'
99
+ utils.RestoreCheckpointConfig.mode = 'specific'
100
+ utils.RestoreCheckpointConfig.path = %INITIAL_CHECKPOINT_PATH
101
+
102
+ # Parameters for utils.SaveCheckpointConfig:
103
+ # ==============================================================================
104
+ utils.SaveCheckpointConfig.dtype = 'float32'
105
+ utils.SaveCheckpointConfig.keep = 3
106
+ utils.SaveCheckpointConfig.period = 5000
107
+ utils.SaveCheckpointConfig.save_dataset = False
108
+
109
+ # Parameters for seqio.SentencePieceVocabulary:
110
+ # ==============================================================================
111
+ seqio.SentencePieceVocabulary.sentencepiece_model_file = \
112
+ 'gs://t5-data/vocabs/mc4.250000.100extra/sentencepiece.model'
113
+
114
+ # Parameters for network.T5Config:
115
+ # ==============================================================================
116
+ network.T5Config.dropout_rate = %DROPOUT_RATE
117
+ network.T5Config.dtype = 'bfloat16'
118
+ network.T5Config.emb_dim = 1024
119
+ network.T5Config.head_dim = 64
120
+ network.T5Config.logits_via_embedding = False
121
+ network.T5Config.mlp_activations = ('gelu', 'linear')
122
+ network.T5Config.mlp_dim = 2816
123
+ network.T5Config.num_decoder_layers = 24
124
+ network.T5Config.num_encoder_layers = 24
125
+ network.T5Config.num_heads = 16
126
+ network.T5Config.vocab_size = 250112
127
+
128
+ # Parameters for train_script.train:
129
+ # ==============================================================================
130
+ train_script.train.checkpoint_cfg = @utils.CheckpointConfig()
131
+ train_script.train.eval_period = 1000
132
+ train_script.train.eval_steps = 20
133
+ train_script.train.infer_eval_dataset_cfg = None
134
+ train_script.train.model = %MODEL
135
+ train_script.train.model_dir = %MODEL_DIR
136
+ train_script.train.partitioner = @partitioning.PjitPartitioner()
137
+ train_script.train.random_seed = %RANDOM_SEED
138
+ train_script.train.summarize_config_fn = @gin_utils.summarize_gin_config
139
+ train_script.train.total_steps = %TRAIN_STEPS
140
+ train_script.train.train_dataset_cfg = @train/utils.DatasetConfig()
141
+ train_script.train.train_eval_dataset_cfg = @train_eval/utils.DatasetConfig()
142
+ train_script.train.trainer_cls = @trainer.Trainer
143
+ train_script.train.use_hardware_rng = %USE_HARDWARE_RNG
144
+
145
+ # Parameters for trainer.Trainer:
146
+ # ==============================================================================
147
+ trainer.Trainer.learning_rate_fn = @utils.create_learning_rate_scheduler()
148
+ trainer.Trainer.num_microbatches = None
149
+
150
+ # Parameters for network.Transformer:
151
+ # ==============================================================================
152
+ network.Transformer.config = @network.T5Config()
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/patrick/hugging_face/t5/mt5-large",
3
+ "architectures": [
4
+ "T5ForConditionalGeneration"
5
+ ],
6
+ "d_ff": 2816,
7
+ "d_kv": 64,
8
+ "d_model": 1024,
9
+ "decoder_start_token_id": 0,
10
+ "dropout_rate": 0.1,
11
+ "eos_token_id": 1,
12
+ "feed_forward_proj": "gated-gelu",
13
+ "initializer_factor": 1.0,
14
+ "is_encoder_decoder": true,
15
+ "layer_norm_epsilon": 1e-06,
16
+ "model_type": "t5",
17
+ "num_decoder_layers": 24,
18
+ "num_heads": 16,
19
+ "num_layers": 24,
20
+ "output_past": true,
21
+ "pad_token_id": 0,
22
+ "relative_attention_max_distance": 128,
23
+ "relative_attention_num_buckets": 32,
24
+ "tie_word_embeddings": false,
25
+ "tokenizer_class": "T5Tokenizer",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.19.2",
28
+ "use_cache": true,
29
+ "vocab_size": 250112
30
+ }
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83eed42166e80b0f9aea221bb28fd44303476f3d8775e12f44f6956a6f5023d9
3
+ size 4918349339
model-info.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:972a3e0b7c2054a7fbb3b77fc8fa8c1467b93a7664d4195b06a0ec6d36b6816c
3
+ size 4918507641
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
spiece.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef78f86560d809067d12bac6c09f19a462cb3af3f54d2b8acbba26e1433125d6
3
+ size 4309802
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:13edf9346263c231557abbd4b42fd847571a957f938e4f48b2d23ec2f1c58acc
3
+ size 9760
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:93c3578052e1605d8332eb961bc08d72e246071974e4cc54aa6991826b802aa5
3
+ size 16330369
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>", "extra_ids": 0, "additional_special_tokens": null, "special_tokens_map_file": "/home/patrick/.cache/torch/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276", "name_or_path": "/home/perk/models/t5_large_NCC_lm", "sp_model_kwargs": {}, "tokenizer_class": "T5Tokenizer"}
train/events.out.tfevents.1652037761.t1v-n-ff6f7fbf-w-0.1287819.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a73516f7c7194a41a448cd938cfe99218e2923ad5f5629c1c3ff43798c2f7dc1
3
+ size 6353
train/events.out.tfevents.1652044868.t1v-n-ff6f7fbf-w-0.1295780.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7afb7610107cf81a77225282669a56f090d1ebb657bbb66e8e844f2be85b01fb
3
+ size 6353
train/events.out.tfevents.1652045182.t1v-n-ff6f7fbf-w-0.1297929.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0643c5085991a24f4c0e2b77d3226b347bca1be3e83e272986b4cfa25edfd2eb
3
+ size 6353
train/events.out.tfevents.1652076342.t1v-n-ff6f7fbf-w-0.1325850.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ba05131853303ef40385302c77923c0f8fc0521c60ec648eb254b01c6cbefe3
3
+ size 6353
train/events.out.tfevents.1652077752.t1v-n-ff6f7fbf-w-0.1329117.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1dc7b5b4c70a9f28114d4e0d21035e19c66099fdc80c858a453e6ca4345c8a3
3
+ size 6353
train/events.out.tfevents.1652461875.t1v-n-27037e77-w-0.68537.0.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb69a26765d157a4defb1e6a1ce2e58610ef3ad828d637f48596ad48fc419fa7
3
+ size 154051
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652037763.t1v-n-ff6f7fbf-w-0.1287819.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59e01a0af341bc6e31dfd276db4090ae5bb12d1f030701728dc495281e5b3127
3
+ size 40
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652044869.t1v-n-ff6f7fbf-w-0.1295780.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c6bac08ec31acb4cbed3b34c62e6fed4a01ad24629eaccbfae15cb30d6d07354
3
+ size 40
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652045182.t1v-n-ff6f7fbf-w-0.1297929.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adc621ad035c9e8a2d0a8f6bb63482fbe1af5ce319167e68c9adf732573287b1
3
+ size 40
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652076342.t1v-n-ff6f7fbf-w-0.1325850.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d3ee1de55148d77d9b51a3966550f6cd925cf56cbbc6dd942b633a2bd7577c5
3
+ size 40
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652077752.t1v-n-ff6f7fbf-w-0.1329117.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2e3cb1643193bfbf205386c9219cd8ac3b34b685bbf3fccf20de730df98eb6f
3
+ size 40
training_eval/ncc_english_prefix_lm_stream/events.out.tfevents.1652461876.t1v-n-27037e77-w-0.68537.1.v2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6efc62ba4cd14eb608357f5d2aa024e9315c20e163b44ed9ae7152d74162774a
3
+ size 130626