versae commited on
Commit
3c3d1d1
1 Parent(s): 64b71f2

End of training

Browse files
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
all_results.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 9.97,
3
+ "eval_loss": 3.5006210803985596,
4
+ "eval_runtime": 5.9779,
5
+ "eval_samples": 99,
6
+ "eval_samples_per_second": 16.561,
7
+ "eval_steps_per_second": 1.171,
8
+ "eval_wer": 1.0,
9
+ "train_loss": 5.883141581217448,
10
+ "train_runtime": 4312.7885,
11
+ "train_samples": 990,
12
+ "train_samples_per_second": 2.295,
13
+ "train_steps_per_second": 0.035
14
+ }
eval_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 9.97,
3
+ "eval_loss": 3.5006210803985596,
4
+ "eval_runtime": 5.9779,
5
+ "eval_samples": 99,
6
+ "eval_samples_per_second": 16.561,
7
+ "eval_steps_per_second": 1.171,
8
+ "eval_wer": 1.0
9
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55429e58f4eb26fda2b961b91a4dd01fb47f8aa7726aebde52b93d4d8d08f34a
3
+ size 1262075377
run.sh CHANGED
@@ -4,6 +4,7 @@ python run_speech_recognition_ctc.py \
4
  --dataset_config_name="48K_mp3" \
5
  --output_dir="./" \
6
  --overwrite_output_dir \
 
7
  --num_train_epochs="10" \
8
  --per_device_train_batch_size="8" \
9
  --per_device_eval_batch_size="8" \
@@ -31,4 +32,6 @@ python run_speech_recognition_ctc.py \
31
  --fp16 \
32
  --group_by_length \
33
  --do_train --do_eval \
 
 
34
  --push_to_hub
 
4
  --dataset_config_name="48K_mp3" \
5
  --output_dir="./" \
6
  --overwrite_output_dir \
7
+ --hub_model_id="NbAiLab/xls-npsc" \
8
  --num_train_epochs="10" \
9
  --per_device_train_batch_size="8" \
10
  --per_device_eval_batch_size="8" \
 
32
  --fp16 \
33
  --group_by_length \
34
  --do_train --do_eval \
35
+ --max_train_samples="1000" \
36
+ --max_eval_samples="100" \
37
  --push_to_hub
runs/Jan25_14-51-02_ficino/1643118713.0966976/events.out.tfevents.1643118713.ficino.3248974.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3555c0c0a150e385db0b5031964177d10a7c633791a951b63d8ec5312ee13509
3
+ size 4740
runs/Jan25_14-51-02_ficino/events.out.tfevents.1643118713.ficino.3248974.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af15f65528353fa4db3871698c47b5194bf87721b62db855027380cda424ad26
3
+ size 5182
runs/Jan25_14-51-02_ficino/events.out.tfevents.1643123033.ficino.3248974.2 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0eceb881945082b4d551472836fd7eda3a0627c3ef9a4bee226ef3fabfc41392
3
+ size 358
special_tokens_map.json CHANGED
@@ -1 +1 @@
1
- {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]", "additional_special_tokens": [{"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}]}
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]", "additional_special_tokens": [{"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}]}
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 9.97,
3
+ "train_loss": 5.883141581217448,
4
+ "train_runtime": 4312.7885,
5
+ "train_samples": 990,
6
+ "train_samples_per_second": 2.295,
7
+ "train_steps_per_second": 0.035
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 9.967741935483872,
5
+ "global_step": 150,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 6.65,
12
+ "learning_rate": 1.4999999999999999e-05,
13
+ "loss": 6.9618,
14
+ "step": 100
15
+ },
16
+ {
17
+ "epoch": 9.97,
18
+ "step": 150,
19
+ "total_flos": 2.264182160412142e+18,
20
+ "train_loss": 5.883141581217448,
21
+ "train_runtime": 4312.7885,
22
+ "train_samples_per_second": 2.295,
23
+ "train_steps_per_second": 0.035
24
+ }
25
+ ],
26
+ "max_steps": 150,
27
+ "num_train_epochs": 10,
28
+ "total_flos": 2.264182160412142e+18,
29
+ "trial_name": null,
30
+ "trial_params": null
31
+ }
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:7469ac235d7305d53f498fff8ceaeb79ff708b37e6e935641044ed8bad4c5f81
3
  size 2991
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2acea8b96056a730756b356a273dd919c15332d43f021e9bac157e290e7b2389
3
  size 2991
vocab.json CHANGED
@@ -1 +1 @@
1
- {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5, "f": 6, "g": 7, "h": 8, "i": 9, "j": 10, "k": 11, "l": 12, "m": 13, "n": 14, "o": 15, "p": 16, "q": 17, "r": 18, "s": 19, "t": 20, "u": 21, "v": 22, "w": 23, "x": 24, "y": 25, "z": 26, "ä": 27, "å": 28, "é": 29, "ô": 30, "ö": 31, "ü": 32, "|": 0, "[UNK]": 33, "[PAD]": 34}
 
1
+ {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5, "f": 6, "g": 7, "h": 8, "i": 9, "j": 10, "k": 11, "l": 12, "m": 13, "n": 14, "o": 15, "p": 16, "q": 17, "r": 18, "s": 19, "t": 20, "u": 21, "v": 22, "w": 23, "x": 24, "y": 25, "z": 26, "å": 27, "æ": 28, "è": 29, "ò": 30, "ô": 31, "ø": 32, "|": 0, "[UNK]": 33, "[PAD]": 34}
wandb/debug-internal.log ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220125_145153-1ghti100/logs/debug-internal.log
wandb/debug.log ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220125_145153-1ghti100/logs/debug.log
wandb/latest-run ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220125_145153-1ghti100
wandb/run-20220125_145153-1ghti100/files/code/run_speech_recognition_ctc.py ADDED
@@ -0,0 +1,758 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # coding=utf-8
3
+ # Copyright 2021 The HuggingFace Inc. team. All rights reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+
16
+ """ Fine-tuning a 🤗 Transformers CTC model for automatic speech recognition"""
17
+
18
+ import functools
19
+ import json
20
+ import logging
21
+ import os
22
+ import re
23
+ import sys
24
+ import warnings
25
+ from dataclasses import dataclass, field
26
+ from typing import Dict, List, Optional, Union
27
+
28
+ import datasets
29
+ import numpy as np
30
+ import torch
31
+ from datasets import DatasetDict, load_dataset, load_metric
32
+
33
+ import transformers
34
+ from transformers import (
35
+ AutoConfig,
36
+ AutoFeatureExtractor,
37
+ AutoModelForCTC,
38
+ AutoProcessor,
39
+ AutoTokenizer,
40
+ HfArgumentParser,
41
+ Trainer,
42
+ TrainingArguments,
43
+ Wav2Vec2Processor,
44
+ set_seed,
45
+ )
46
+ from transformers.trainer_utils import get_last_checkpoint, is_main_process
47
+ from transformers.utils import check_min_version
48
+ from transformers.utils.versions import require_version
49
+
50
+
51
+ # Will error if the minimal version of Transformers is not installed. Remove at your own risks.
52
+ check_min_version("4.16.0.dev0")
53
+
54
+ require_version("datasets>=1.13.3", "To fix: pip install -r examples/pytorch/text-classification/requirements.txt")
55
+
56
+
57
+ logger = logging.getLogger(__name__)
58
+
59
+
60
+ def list_field(default=None, metadata=None):
61
+ return field(default_factory=lambda: default, metadata=metadata)
62
+
63
+
64
+ @dataclass
65
+ class ModelArguments:
66
+ """
67
+ Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
68
+ """
69
+
70
+ model_name_or_path: str = field(
71
+ metadata={"help": "Path to pretrained model or model identifier from huggingface.co/models"}
72
+ )
73
+ tokenizer_name_or_path: Optional[str] = field(
74
+ default=None,
75
+ metadata={"help": "Path to pretrained tokenizer or tokenizer identifier from huggingface.co/models"},
76
+ )
77
+ cache_dir: Optional[str] = field(
78
+ default=None,
79
+ metadata={"help": "Where do you want to store the pretrained models downloaded from huggingface.co"},
80
+ )
81
+ freeze_feature_encoder: bool = field(
82
+ default=True, metadata={"help": "Whether to freeze the feature encoder layers of the model."}
83
+ )
84
+ attention_dropout: float = field(
85
+ default=0.0, metadata={"help": "The dropout ratio for the attention probabilities."}
86
+ )
87
+ activation_dropout: float = field(
88
+ default=0.0, metadata={"help": "The dropout ratio for activations inside the fully connected layer."}
89
+ )
90
+ feat_proj_dropout: float = field(default=0.0, metadata={"help": "The dropout ratio for the projected features."})
91
+ hidden_dropout: float = field(
92
+ default=0.0,
93
+ metadata={
94
+ "help": "The dropout probability for all fully connected layers in the embeddings, encoder, and pooler."
95
+ },
96
+ )
97
+ final_dropout: float = field(
98
+ default=0.0,
99
+ metadata={"help": "The dropout probability for the final projection layer."},
100
+ )
101
+ mask_time_prob: float = field(
102
+ default=0.05,
103
+ metadata={
104
+ "help": "Probability of each feature vector along the time axis to be chosen as the start of the vector"
105
+ "span to be masked. Approximately ``mask_time_prob * sequence_length // mask_time_length`` feature"
106
+ "vectors will be masked along the time axis."
107
+ },
108
+ )
109
+ mask_time_length: int = field(
110
+ default=10,
111
+ metadata={"help": "Length of vector span to mask along the time axis."},
112
+ )
113
+ mask_feature_prob: float = field(
114
+ default=0.0,
115
+ metadata={
116
+ "help": "Probability of each feature vector along the feature axis to be chosen as the start of the vector"
117
+ "span to be masked. Approximately ``mask_feature_prob * sequence_length // mask_feature_length`` feature bins will be masked along the time axis."
118
+ },
119
+ )
120
+ mask_feature_length: int = field(
121
+ default=10,
122
+ metadata={"help": "Length of vector span to mask along the feature axis."},
123
+ )
124
+ layerdrop: float = field(default=0.0, metadata={"help": "The LayerDrop probability."})
125
+ ctc_loss_reduction: Optional[str] = field(
126
+ default="mean", metadata={"help": "The way the ctc loss should be reduced. Should be one of 'mean' or 'sum'."}
127
+ )
128
+
129
+
130
+ @dataclass
131
+ class DataTrainingArguments:
132
+ """
133
+ Arguments pertaining to what data we are going to input our model for training and eval.
134
+
135
+ Using `HfArgumentParser` we can turn this class
136
+ into argparse arguments to be able to specify them on
137
+ the command line.
138
+ """
139
+
140
+ dataset_name: str = field(
141
+ metadata={"help": "The configuration name of the dataset to use (via the datasets library)."}
142
+ )
143
+ dataset_config_name: str = field(
144
+ default=None, metadata={"help": "The configuration name of the dataset to use (via the datasets library)."}
145
+ )
146
+ train_split_name: str = field(
147
+ default="train+validation",
148
+ metadata={
149
+ "help": "The name of the training data set split to use (via the datasets library). Defaults to 'train'"
150
+ },
151
+ )
152
+ eval_split_name: str = field(
153
+ default="test",
154
+ metadata={
155
+ "help": "The name of the training data set split to use (via the datasets library). Defaults to 'train'"
156
+ },
157
+ )
158
+ audio_column_name: str = field(
159
+ default="audio",
160
+ metadata={"help": "The name of the dataset column containing the audio data. Defaults to 'audio'"},
161
+ )
162
+ text_column_name: str = field(
163
+ default="text",
164
+ metadata={"help": "The name of the dataset column containing the text data. Defaults to 'text'"},
165
+ )
166
+ overwrite_cache: bool = field(
167
+ default=False, metadata={"help": "Overwrite the cached preprocessed datasets or not."}
168
+ )
169
+ preprocessing_num_workers: Optional[int] = field(
170
+ default=None,
171
+ metadata={"help": "The number of processes to use for the preprocessing."},
172
+ )
173
+ max_train_samples: Optional[int] = field(
174
+ default=None,
175
+ metadata={
176
+ "help": "For debugging purposes or quicker training, truncate the number of training examples to this "
177
+ "value if set."
178
+ },
179
+ )
180
+ max_eval_samples: Optional[int] = field(
181
+ default=None,
182
+ metadata={
183
+ "help": "For debugging purposes or quicker training, truncate the number of validation examples to this "
184
+ "value if set."
185
+ },
186
+ )
187
+ chars_to_ignore: Optional[List[str]] = list_field(
188
+ default=None,
189
+ metadata={"help": "A list of characters to remove from the transcripts."},
190
+ )
191
+ eval_metrics: List[str] = list_field(
192
+ default=["wer"],
193
+ metadata={"help": "A list of metrics the model should be evaluated on. E.g. `'wer cer'`"},
194
+ )
195
+ max_duration_in_seconds: float = field(
196
+ default=20.0,
197
+ metadata={
198
+ "help": "Filter audio files that are longer than `max_duration_in_seconds` seconds to 'max_duration_in_seconds`"
199
+ },
200
+ )
201
+ min_duration_in_seconds: float = field(
202
+ default=0.0, metadata={"help": "Filter audio files that are shorter than `min_duration_in_seconds` seconds"}
203
+ )
204
+ preprocessing_only: bool = field(
205
+ default=False,
206
+ metadata={
207
+ "help": "Whether to only do data preprocessing and skip training. "
208
+ "This is especially useful when data preprocessing errors out in distributed training due to timeout. "
209
+ "In this case, one should run the preprocessing in a non-distributed setup with `preprocessing_only=True` "
210
+ "so that the cached datasets can consequently be loaded in distributed training"
211
+ },
212
+ )
213
+ use_auth_token: bool = field(
214
+ default=False,
215
+ metadata={
216
+ "help": "If :obj:`True`, will use the token generated when running"
217
+ ":obj:`transformers-cli login` as HTTP bearer authorization for remote files."
218
+ },
219
+ )
220
+ unk_token: str = field(
221
+ default="[UNK]",
222
+ metadata={"help": "The unk token for the tokenizer"},
223
+ )
224
+ pad_token: str = field(
225
+ default="[PAD]",
226
+ metadata={"help": "The padding token for the tokenizer"},
227
+ )
228
+ word_delimiter_token: str = field(
229
+ default="|",
230
+ metadata={"help": "The word delimiter token for the tokenizer"},
231
+ )
232
+ phoneme_language: Optional[str] = field(
233
+ default=None,
234
+ metadata={
235
+ "help": "The target language that should be used be"
236
+ " passed to the tokenizer for tokenization. Note that"
237
+ " this is only relevant if the model classifies the"
238
+ " input audio to a sequence of phoneme sequences."
239
+ },
240
+ )
241
+
242
+
243
+ @dataclass
244
+ class DataCollatorCTCWithPadding:
245
+ """
246
+ Data collator that will dynamically pad the inputs received.
247
+ Args:
248
+ processor (:class:`~transformers.AutoProcessor`)
249
+ The processor used for proccessing the data.
250
+ padding (:obj:`bool`, :obj:`str` or :class:`~transformers.tokenization_utils_base.PaddingStrategy`, `optional`, defaults to :obj:`True`):
251
+ Select a strategy to pad the returned sequences (according to the model's padding side and padding index)
252
+ among:
253
+ * :obj:`True` or :obj:`'longest'`: Pad to the longest sequence in the batch (or no padding if only a single
254
+ sequence if provided).
255
+ * :obj:`'max_length'`: Pad to a maximum length specified with the argument :obj:`max_length` or to the
256
+ maximum acceptable input length for the model if that argument is not provided.
257
+ * :obj:`False` or :obj:`'do_not_pad'` (default): No padding (i.e., can output a batch with sequences of
258
+ different lengths).
259
+ max_length (:obj:`int`, `optional`):
260
+ Maximum length of the ``input_values`` of the returned list and optionally padding length (see above).
261
+ max_length_labels (:obj:`int`, `optional`):
262
+ Maximum length of the ``labels`` returned list and optionally padding length (see above).
263
+ pad_to_multiple_of (:obj:`int`, `optional`):
264
+ If set will pad the sequence to a multiple of the provided value.
265
+ This is especially useful to enable the use of Tensor Cores on NVIDIA hardware with compute capability >=
266
+ 7.5 (Volta).
267
+ """
268
+
269
+ processor: AutoProcessor
270
+ padding: Union[bool, str] = "longest"
271
+ pad_to_multiple_of: Optional[int] = None
272
+ pad_to_multiple_of_labels: Optional[int] = None
273
+
274
+ def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> Dict[str, torch.Tensor]:
275
+ # split inputs and labels since they have to be of different lenghts and need
276
+ # different padding methods
277
+ input_features = [{"input_values": feature["input_values"]} for feature in features]
278
+ label_features = [{"input_ids": feature["labels"]} for feature in features]
279
+
280
+ batch = self.processor.pad(
281
+ input_features,
282
+ padding=self.padding,
283
+ pad_to_multiple_of=self.pad_to_multiple_of,
284
+ return_tensors="pt",
285
+ )
286
+
287
+ with self.processor.as_target_processor():
288
+ labels_batch = self.processor.pad(
289
+ label_features,
290
+ padding=self.padding,
291
+ pad_to_multiple_of=self.pad_to_multiple_of_labels,
292
+ return_tensors="pt",
293
+ )
294
+
295
+ # replace padding with -100 to ignore loss correctly
296
+ labels = labels_batch["input_ids"].masked_fill(labels_batch.attention_mask.ne(1), -100)
297
+
298
+ batch["labels"] = labels
299
+
300
+ return batch
301
+
302
+
303
+ def create_vocabulary_from_data(
304
+ datasets: DatasetDict,
305
+ word_delimiter_token: Optional[str] = None,
306
+ unk_token: Optional[str] = None,
307
+ pad_token: Optional[str] = None,
308
+ ):
309
+ # Given training and test labels create vocabulary
310
+ def extract_all_chars(batch):
311
+ all_text = " ".join(batch["target_text"])
312
+ vocab = list(set(all_text))
313
+ return {"vocab": [vocab], "all_text": [all_text]}
314
+
315
+ vocabs = datasets.map(
316
+ extract_all_chars,
317
+ batched=True,
318
+ batch_size=-1,
319
+ keep_in_memory=True,
320
+ remove_columns=datasets["train"].column_names,
321
+ )
322
+
323
+ # take union of all unique characters in each dataset
324
+ vocab_set = functools.reduce(
325
+ lambda vocab_1, vocab_2: set(vocab_1["vocab"][0]) | set(vocab_2["vocab"][0]), vocabs.values()
326
+ )
327
+
328
+ vocab_dict = {v: k for k, v in enumerate(sorted(list(vocab_set)))}
329
+
330
+ # replace white space with delimiter token
331
+ if word_delimiter_token is not None:
332
+ vocab_dict[word_delimiter_token] = vocab_dict[" "]
333
+ del vocab_dict[" "]
334
+
335
+ # add unk and pad token
336
+ if unk_token is not None:
337
+ vocab_dict[unk_token] = len(vocab_dict)
338
+
339
+ if pad_token is not None:
340
+ vocab_dict[pad_token] = len(vocab_dict)
341
+
342
+ return vocab_dict
343
+
344
+
345
+ def main():
346
+ # See all possible arguments in src/transformers/training_args.py
347
+ # or by passing the --help flag to this script.
348
+ # We now keep distinct sets of args, for a cleaner separation of concerns.
349
+
350
+ parser = HfArgumentParser((ModelArguments, DataTrainingArguments, TrainingArguments))
351
+ if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
352
+ # If we pass only one argument to the script and it's the path to a json file,
353
+ # let's parse it to get our arguments.
354
+ model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
355
+ else:
356
+ model_args, data_args, training_args = parser.parse_args_into_dataclasses()
357
+
358
+ # Detecting last checkpoint.
359
+ last_checkpoint = None
360
+ if os.path.isdir(training_args.output_dir) and training_args.do_train and not training_args.overwrite_output_dir:
361
+ last_checkpoint = get_last_checkpoint(training_args.output_dir)
362
+ if last_checkpoint is None and len(os.listdir(training_args.output_dir)) > 0:
363
+ raise ValueError(
364
+ f"Output directory ({training_args.output_dir}) already exists and is not empty. "
365
+ "Use --overwrite_output_dir to overcome."
366
+ )
367
+ elif last_checkpoint is not None:
368
+ logger.info(
369
+ f"Checkpoint detected, resuming training at {last_checkpoint}. To avoid this behavior, change "
370
+ "the `--output_dir` or add `--overwrite_output_dir` to train from scratch."
371
+ )
372
+
373
+ # Setup logging
374
+ logging.basicConfig(
375
+ format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
376
+ datefmt="%m/%d/%Y %H:%M:%S",
377
+ handlers=[logging.StreamHandler(sys.stdout)],
378
+ )
379
+ logger.setLevel(logging.INFO if is_main_process(training_args.local_rank) else logging.WARN)
380
+
381
+ # Log on each process the small summary:
382
+ logger.warning(
383
+ f"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
384
+ f"distributed training: {bool(training_args.local_rank != -1)}, 16-bits training: {training_args.fp16}"
385
+ )
386
+ # Set the verbosity to info of the Transformers logger (on main process only):
387
+ if is_main_process(training_args.local_rank):
388
+ transformers.utils.logging.set_verbosity_info()
389
+ logger.info("Training/evaluation parameters %s", training_args)
390
+
391
+ # Set seed before initializing model.
392
+ set_seed(training_args.seed)
393
+
394
+ # Pre-processing dataset
395
+ def preprocess_dataset(entry):
396
+ return (
397
+ "<INAUDIBLE>" not in entry["text"]
398
+ and entry["sentence_language_code"].lower() == "nb-no"
399
+ )
400
+
401
+ def map_dataset(entry):
402
+ return {"text": (entry["text"]
403
+ .lower()
404
+ .replace("<ee>", "eee")
405
+ .replace("<mm>", "mmm")
406
+ .replace("<qq>", "qqq")
407
+ .replace("ó", "o")
408
+ .replace("é", "e")
409
+ )}
410
+
411
+ # 1. First, let's load the dataset
412
+ raw_datasets = DatasetDict()
413
+
414
+ if training_args.do_train:
415
+ raw_datasets["train"] = load_dataset(
416
+ data_args.dataset_name,
417
+ data_args.dataset_config_name,
418
+ split=data_args.train_split_name,
419
+ use_auth_token=data_args.use_auth_token,
420
+ )
421
+ raw_datasets["train"] = raw_datasets["train"].filter(preprocess_dataset)
422
+ raw_datasets["train"] = raw_datasets["train"].map(map_dataset)
423
+
424
+ if data_args.audio_column_name not in raw_datasets["train"].column_names:
425
+ raise ValueError(
426
+ f"--audio_column_name '{data_args.audio_column_name}' not found in dataset '{data_args.dataset_name}'. "
427
+ "Make sure to set `--audio_column_name` to the correct audio column - one of "
428
+ f"{', '.join(raw_datasets['train'].column_names)}."
429
+ )
430
+
431
+ if data_args.text_column_name not in raw_datasets["train"].column_names:
432
+ raise ValueError(
433
+ f"--text_column_name {data_args.text_column_name} not found in dataset '{data_args.dataset_name}'. "
434
+ "Make sure to set `--text_column_name` to the correct text column - one of "
435
+ f"{', '.join(raw_datasets['train'].column_names)}."
436
+ )
437
+
438
+ if data_args.max_train_samples is not None:
439
+ raw_datasets["train"] = raw_datasets["train"].select(range(data_args.max_train_samples))
440
+
441
+ if training_args.do_eval:
442
+ raw_datasets["eval"] = load_dataset(
443
+ data_args.dataset_name,
444
+ data_args.dataset_config_name,
445
+ split=data_args.eval_split_name,
446
+ use_auth_token=data_args.use_auth_token,
447
+ )
448
+ raw_datasets["eval"] = raw_datasets["eval"].filter(preprocess_dataset)
449
+ raw_datasets["eval"] = raw_datasets["eval"].map(map_dataset)
450
+
451
+ if data_args.max_eval_samples is not None:
452
+ raw_datasets["eval"] = raw_datasets["eval"].select(range(data_args.max_eval_samples))
453
+
454
+ # 2. We remove some special characters from the datasets
455
+ # that make training complicated and do not help in transcribing the speech
456
+ # E.g. characters, such as `,` and `.` do not really have an acoustic characteristic
457
+ # that could be easily picked up by the model
458
+ chars_to_ignore_regex = (
459
+ f'[{"".join(data_args.chars_to_ignore)}]' if data_args.chars_to_ignore is not None else None
460
+ )
461
+ text_column_name = data_args.text_column_name
462
+
463
+ def remove_special_characters(batch):
464
+ if chars_to_ignore_regex is not None:
465
+ batch["target_text"] = re.sub(chars_to_ignore_regex, "", batch[text_column_name]).lower() + " "
466
+ else:
467
+ batch["target_text"] = batch[text_column_name].lower() + " "
468
+ return batch
469
+
470
+ with training_args.main_process_first(desc="dataset map special characters removal"):
471
+ raw_datasets = raw_datasets.map(
472
+ remove_special_characters,
473
+ remove_columns=[text_column_name],
474
+ desc="remove special characters from datasets",
475
+ )
476
+
477
+ # save special tokens for tokenizer
478
+ word_delimiter_token = data_args.word_delimiter_token
479
+ unk_token = data_args.unk_token
480
+ pad_token = data_args.pad_token
481
+
482
+ # 3. Next, let's load the config as we might need it to create
483
+ # the tokenizer
484
+ # load config
485
+ config = AutoConfig.from_pretrained(
486
+ model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
487
+ )
488
+
489
+ # 4. Next, if no tokenizer file is defined,
490
+ # we create the vocabulary of the model by extracting all unique characters from
491
+ # the training and evaluation datasets
492
+ # We need to make sure that only first rank saves vocabulary
493
+ # make sure all processes wait until vocab is created
494
+ tokenizer_name_or_path = model_args.tokenizer_name_or_path
495
+ tokenizer_kwargs = {}
496
+ if tokenizer_name_or_path is None:
497
+ # save vocab in training output dir
498
+ tokenizer_name_or_path = training_args.output_dir
499
+
500
+ vocab_file = os.path.join(tokenizer_name_or_path, "vocab.json")
501
+
502
+ with training_args.main_process_first():
503
+ if training_args.overwrite_output_dir and os.path.isfile(vocab_file):
504
+ os.remove(vocab_file)
505
+
506
+ with training_args.main_process_first(desc="dataset map vocabulary creation"):
507
+ if not os.path.isfile(vocab_file):
508
+ os.makedirs(tokenizer_name_or_path, exist_ok=True)
509
+ vocab_dict = create_vocabulary_from_data(
510
+ raw_datasets,
511
+ word_delimiter_token=word_delimiter_token,
512
+ unk_token=unk_token,
513
+ pad_token=pad_token,
514
+ )
515
+
516
+ # save vocab dict to be loaded into tokenizer
517
+ with open(vocab_file, "w") as file:
518
+ json.dump(vocab_dict, file)
519
+
520
+ # if tokenizer has just been created
521
+ # it is defined by `tokenizer_class` if present in config else by `model_type`
522
+ tokenizer_kwargs = {
523
+ "config": config if config.tokenizer_class is not None else None,
524
+ "tokenizer_type": config.model_type if config.tokenizer_class is None else None,
525
+ "unk_token": unk_token,
526
+ "pad_token": pad_token,
527
+ "word_delimiter_token": word_delimiter_token,
528
+ }
529
+
530
+ # 5. Now we can instantiate the feature extractor, tokenizer and model
531
+ # Note for distributed training, the .from_pretrained methods guarantee that only
532
+ # one local process can concurrently download model & vocab.
533
+
534
+ # load feature_extractor and tokenizer
535
+ tokenizer = AutoTokenizer.from_pretrained(
536
+ tokenizer_name_or_path,
537
+ use_auth_token=data_args.use_auth_token,
538
+ **tokenizer_kwargs,
539
+ )
540
+ feature_extractor = AutoFeatureExtractor.from_pretrained(
541
+ model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
542
+ )
543
+
544
+ # adapt config
545
+ config.update(
546
+ {
547
+ "feat_proj_dropout": model_args.feat_proj_dropout,
548
+ "attention_dropout": model_args.attention_dropout,
549
+ "hidden_dropout": model_args.hidden_dropout,
550
+ "final_dropout": model_args.final_dropout,
551
+ "mask_time_prob": model_args.mask_time_prob,
552
+ "mask_time_length": model_args.mask_time_length,
553
+ "mask_feature_prob": model_args.mask_feature_prob,
554
+ "mask_feature_length": model_args.mask_feature_length,
555
+ "gradient_checkpointing": training_args.gradient_checkpointing,
556
+ "layerdrop": model_args.layerdrop,
557
+ "ctc_loss_reduction": model_args.ctc_loss_reduction,
558
+ "pad_token_id": tokenizer.pad_token_id,
559
+ "vocab_size": len(tokenizer),
560
+ "activation_dropout": model_args.activation_dropout,
561
+ }
562
+ )
563
+
564
+ # create model
565
+ model = AutoModelForCTC.from_pretrained(
566
+ model_args.model_name_or_path,
567
+ cache_dir=model_args.cache_dir,
568
+ config=config,
569
+ use_auth_token=data_args.use_auth_token,
570
+ )
571
+
572
+ # freeze encoder
573
+ if model_args.freeze_feature_encoder:
574
+ model.freeze_feature_encoder()
575
+
576
+ # 6. Now we preprocess the datasets including loading the audio, resampling and normalization
577
+ # Thankfully, `datasets` takes care of automatically loading and resampling the audio,
578
+ # so that we just need to set the correct target sampling rate and normalize the input
579
+ # via the `feature_extractor`
580
+
581
+ # make sure that dataset decodes audio with correct sampling rate
582
+ dataset_sampling_rate = next(iter(raw_datasets.values())).features[data_args.audio_column_name].sampling_rate
583
+ if dataset_sampling_rate != feature_extractor.sampling_rate:
584
+ raw_datasets = raw_datasets.cast_column(
585
+ data_args.audio_column_name, datasets.features.Audio(sampling_rate=feature_extractor.sampling_rate)
586
+ )
587
+
588
+ # derive max & min input length for sample rate & max duration
589
+ max_input_length = data_args.max_duration_in_seconds * feature_extractor.sampling_rate
590
+ min_input_length = data_args.min_duration_in_seconds * feature_extractor.sampling_rate
591
+ audio_column_name = data_args.audio_column_name
592
+ num_workers = data_args.preprocessing_num_workers
593
+
594
+ # `phoneme_language` is only relevant if the model is fine-tuned on phoneme classification
595
+ phoneme_language = data_args.phoneme_language
596
+
597
+ # Preprocessing the datasets.
598
+ # We need to read the audio files as arrays and tokenize the targets.
599
+ def prepare_dataset(batch):
600
+ # load audio
601
+ sample = batch[audio_column_name]
602
+
603
+ inputs = feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"])
604
+ batch["input_values"] = inputs.input_values[0]
605
+ batch["input_length"] = len(batch["input_values"])
606
+
607
+ # encode targets
608
+ additional_kwargs = {}
609
+ if phoneme_language is not None:
610
+ additional_kwargs["phonemizer_lang"] = phoneme_language
611
+
612
+ batch["labels"] = tokenizer(batch["target_text"], **additional_kwargs).input_ids
613
+ return batch
614
+
615
+ with training_args.main_process_first(desc="dataset map preprocessing"):
616
+ vectorized_datasets = raw_datasets.map(
617
+ prepare_dataset,
618
+ remove_columns=next(iter(raw_datasets.values())).column_names,
619
+ num_proc=num_workers,
620
+ desc="preprocess datasets",
621
+ )
622
+
623
+ def is_audio_in_length_range(length):
624
+ return length > min_input_length and length < max_input_length
625
+
626
+ # filter data that is shorter than min_input_length
627
+ vectorized_datasets = vectorized_datasets.filter(
628
+ is_audio_in_length_range,
629
+ num_proc=num_workers,
630
+ input_columns=["input_length"],
631
+ )
632
+
633
+ # 7. Next, we can prepare the training.
634
+ # Let's use word error rate (WER) as our evaluation metric,
635
+ # instantiate a data collator and the trainer
636
+
637
+ # Define evaluation metrics during training, *i.e.* word error rate, character error rate
638
+ eval_metrics = {metric: load_metric(metric) for metric in data_args.eval_metrics}
639
+
640
+ # for large datasets it is advised to run the preprocessing on a
641
+ # single machine first with ``args.preprocessing_only`` since there will mostly likely
642
+ # be a timeout when running the script in distributed mode.
643
+ # In a second step ``args.preprocessing_only`` can then be set to `False` to load the
644
+ # cached dataset
645
+ if data_args.preprocessing_only:
646
+ logger.info(f"Data preprocessing finished. Files cached at {vectorized_datasets.cache_files}")
647
+ return
648
+
649
+ def compute_metrics(pred):
650
+ pred_logits = pred.predictions
651
+ pred_ids = np.argmax(pred_logits, axis=-1)
652
+
653
+ pred.label_ids[pred.label_ids == -100] = tokenizer.pad_token_id
654
+
655
+ pred_str = tokenizer.batch_decode(pred_ids)
656
+ # we do not want to group tokens when computing the metrics
657
+ label_str = tokenizer.batch_decode(pred.label_ids, group_tokens=False)
658
+
659
+ metrics = {k: v.compute(predictions=pred_str, references=label_str) for k, v in eval_metrics.items()}
660
+
661
+ return metrics
662
+
663
+ # Now save everything to be able to create a single processor later
664
+ if is_main_process(training_args.local_rank):
665
+ # save feature extractor, tokenizer and config
666
+ feature_extractor.save_pretrained(training_args.output_dir)
667
+ tokenizer.save_pretrained(training_args.output_dir)
668
+ config.save_pretrained(training_args.output_dir)
669
+
670
+ try:
671
+ processor = AutoProcessor.from_pretrained(training_args.output_dir)
672
+ except (OSError, KeyError):
673
+ warnings.warn(
674
+ "Loading a processor from a feature extractor config that does not"
675
+ " include a `processor_class` attribute is deprecated and will be removed in v5. Please add the following "
676
+ " attribute to your `preprocessor_config.json` file to suppress this warning: "
677
+ " `'processor_class': 'Wav2Vec2Processor'`",
678
+ FutureWarning,
679
+ )
680
+ processor = Wav2Vec2Processor.from_pretrained(training_args.output_dir)
681
+
682
+ # Instantiate custom data collator
683
+ data_collator = DataCollatorCTCWithPadding(processor=processor)
684
+
685
+ # Initialize Trainer
686
+ trainer = Trainer(
687
+ model=model,
688
+ data_collator=data_collator,
689
+ args=training_args,
690
+ compute_metrics=compute_metrics,
691
+ train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
692
+ eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
693
+ tokenizer=feature_extractor,
694
+ )
695
+
696
+ # 8. Finally, we can start training
697
+
698
+ # Training
699
+ if training_args.do_train:
700
+
701
+ # use last checkpoint if exist
702
+ if last_checkpoint is not None:
703
+ checkpoint = last_checkpoint
704
+ elif os.path.isdir(model_args.model_name_or_path):
705
+ checkpoint = model_args.model_name_or_path
706
+ else:
707
+ checkpoint = None
708
+
709
+ train_result = trainer.train(resume_from_checkpoint=checkpoint)
710
+ trainer.save_model()
711
+
712
+ metrics = train_result.metrics
713
+ max_train_samples = (
714
+ data_args.max_train_samples
715
+ if data_args.max_train_samples is not None
716
+ else len(vectorized_datasets["train"])
717
+ )
718
+ metrics["train_samples"] = min(max_train_samples, len(vectorized_datasets["train"]))
719
+
720
+ trainer.log_metrics("train", metrics)
721
+ trainer.save_metrics("train", metrics)
722
+ trainer.save_state()
723
+
724
+ # Evaluation
725
+ results = {}
726
+ if training_args.do_eval:
727
+ logger.info("*** Evaluate ***")
728
+ metrics = trainer.evaluate()
729
+ max_eval_samples = (
730
+ data_args.max_eval_samples if data_args.max_eval_samples is not None else len(vectorized_datasets["eval"])
731
+ )
732
+ metrics["eval_samples"] = min(max_eval_samples, len(vectorized_datasets["eval"]))
733
+
734
+ trainer.log_metrics("eval", metrics)
735
+ trainer.save_metrics("eval", metrics)
736
+
737
+ # Write model card and (optionally) push to hub
738
+ config_name = data_args.dataset_config_name if data_args.dataset_config_name is not None else "na"
739
+ kwargs = {
740
+ "finetuned_from": model_args.model_name_or_path,
741
+ "tasks": "speech-recognition",
742
+ "tags": ["automatic-speech-recognition", data_args.dataset_name],
743
+ "dataset_args": f"Config: {config_name}, Training split: {data_args.train_split_name}, Eval split: {data_args.eval_split_name}",
744
+ "dataset": f"{data_args.dataset_name.upper()} - {config_name.upper()}",
745
+ }
746
+ if "common_voice" in data_args.dataset_name:
747
+ kwargs["language"] = config_name
748
+
749
+ if training_args.push_to_hub:
750
+ trainer.push_to_hub(**kwargs)
751
+ else:
752
+ trainer.create_model_card(**kwargs)
753
+
754
+ return results
755
+
756
+
757
+ if __name__ == "__main__":
758
+ main()
wandb/run-20220125_145153-1ghti100/files/config.yaml ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220125_145153-1ghti100/files/diff.patch ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ diff --git a/config.json b/config.json
2
+ index e2b341d..c6e8001 100644
3
+ --- a/config.json
4
+ +++ b/config.json
5
+ @@ -6,7 +6,7 @@
6
+ "add_adapter": false,
7
+ "apply_spec_augment": true,
8
+ "architectures": [
9
+ - "Wav2Vec2ForCTC"
10
+ + "Wav2Vec2ForPreTraining"
11
+ ],
12
+ "attention_dropout": 0.0,
13
+ "bos_token_id": 1,
14
+ diff --git a/run.sh b/run.sh
15
+ index f854ea3..24b2efe 100755
16
+ --- a/run.sh
17
+ +++ b/run.sh
18
+ @@ -4,6 +4,7 @@ python run_speech_recognition_ctc.py \
19
+ --dataset_config_name="48K_mp3" \
20
+ --output_dir="./" \
21
+ --overwrite_output_dir \
22
+ + --hub_model_id="NbAiLab/xls-npsc" \
23
+ --num_train_epochs="10" \
24
+ --per_device_train_batch_size="8" \
25
+ --per_device_eval_batch_size="8" \
26
+ @@ -31,4 +32,6 @@ python run_speech_recognition_ctc.py \
27
+ --fp16 \
28
+ --group_by_length \
29
+ --do_train --do_eval \
30
+ + --max_train_samples="1000" \
31
+ + --max_eval_samples="100" \
32
+ --push_to_hub
33
+ diff --git a/special_tokens_map.json b/special_tokens_map.json
34
+ index 623bcb0..59f35a2 100644
35
+ --- a/special_tokens_map.json
36
+ +++ b/special_tokens_map.json
37
+ @@ -1 +1 @@
38
+ -{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]", "additional_special_tokens": [{"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}]}
39
+
40
+ +{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]", "additional_special_tokens": [{"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "<s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}, {"content": "</s>", "single_word": false, "lstrip": false, "rstrip": false, "normalized": true}]}
41
+
42
+ diff --git a/vocab.json b/vocab.json
43
+ index 6328bc8..5211c51 100644
44
+ --- a/vocab.json
45
+ +++ b/vocab.json
46
+ @@ -1 +1 @@
47
+ -{"a": 1, "b": 2, "c": 3, "d": 4, "e": 5, "f": 6, "g": 7, "h": 8, "i": 9, "j": 10, "k": 11, "l": 12, "m": 13, "n": 14, "o": 15, "p": 16, "q": 17, "r": 18, "s": 19, "t": 20, "u": 21, "v": 22, "w": 23, "x": 24, "y": 25, "z": 26, "ä": 27, "å": 28, "é": 29, "ô": 30, "ö": 31, "ü": 32, "|": 0, "[UNK]": 33, "[PAD]": 34}
48
+
49
+ +{"a": 1, "b": 2, "c": 3, "d": 4, "e": 5, "f": 6, "g": 7, "h": 8, "i": 9, "j": 10, "k": 11, "l": 12, "m": 13, "n": 14, "o": 15, "p": 16, "q": 17, "r": 18, "s": 19, "t": 20, "u": 21, "v": 22, "w": 23, "x": 24, "y": 25, "z": 26, "å": 27, "æ": 28, "è": 29, "ò": 30, "ô": 31, "ø": 32, "|": 0, "[UNK]": 33, "[PAD]": 34}
50
+
wandb/run-20220125_145153-1ghti100/files/output.log ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ 0%| | 0/150 [00:00<?, ?it/s]/home/javierr/venvs/notram/lib/python3.9/site-packages/torch/nn/parallel/_functions.py:68: UserWarning: Was asked to gather along dimension 0, but all input tensors were scalars; will instead unsqueeze and return a vector.
3
+ warnings.warn('Was asked to gather along dimension 0, but all '
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ 66%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████ | 99/150 [47:27<23:20, 27.46s/it]
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 149/150 [1:11:24<00:27, 27.93s/it]
153
+ 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 150/150 [1:11:49<00:00, 27.18s/it]
154
+ Training completed. Do not forget to share your model on huggingface.co/models =)
155
+ 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 150/150 [1:11:49<00:00, 28.73s/it]
156
+ Saving model checkpoint to ./
157
+ Configuration saved in ./config.json
158
+ ***** train metrics *****
159
+ epoch = 9.97
160
+ train_loss = 5.8831
161
+ train_runtime = 1:11:52.78
162
+ train_samples = 990
163
+ train_samples_per_second = 2.295
164
+ train_steps_per_second = 0.035
165
+ 01/25/2022 16:03:47 - INFO - __main__ - *** Evaluate ***
166
+ Model weights saved in ./pytorch_model.bin
167
+ Configuration saved in ./preprocessor_config.json
168
+ The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.
169
+ ***** Running Evaluation *****
170
+ Num examples = 99
171
+ Batch size = 16
172
+
173
+
174
+ 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████��████████████████████████████████████████████████████████████████████████| 7/7 [00:05<00:00, 1.38it/s]
175
+ ***** eval metrics *****
176
+ epoch = 9.97
177
+ eval_loss = 3.5006
178
+ eval_runtime = 0:00:05.97
179
+ eval_samples = 99
180
+ eval_samples_per_second = 16.561
181
+ eval_steps_per_second = 1.171
182
+ 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 7/7 [00:05<00:00, 1.28it/s]
183
+ Saving model checkpoint to ./
184
+ Configuration saved in ./config.json
185
+ Model weights saved in ./pytorch_model.bin
wandb/run-20220125_145153-1ghti100/files/requirements.txt ADDED
@@ -0,0 +1,185 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==0.15.0
2
+ aiohttp==3.7.4.post0
3
+ altair==4.1.0
4
+ appdirs==1.4.4
5
+ argon2-cffi==21.1.0
6
+ astor==0.8.1
7
+ astunparse==1.6.3
8
+ async-timeout==3.0.1
9
+ attrs==21.2.0
10
+ audioread==2.1.9
11
+ backcall==0.2.0
12
+ base58==2.1.0
13
+ bleach==4.1.0
14
+ blinker==1.4
15
+ cachetools==4.2.4
16
+ certifi==2021.10.8
17
+ cffi==1.15.0
18
+ chardet==4.0.0
19
+ charset-normalizer==2.0.7
20
+ chex==0.0.8
21
+ clang==5.0
22
+ click==7.1.2
23
+ colorama==0.4.4
24
+ configparser==5.0.2
25
+ conllu==4.4.1
26
+ cycler==0.10.0
27
+ datasets==1.18.1.dev0
28
+ debugpy==1.5.1
29
+ decorator==5.1.0
30
+ defusedxml==0.7.1
31
+ dill==0.3.4
32
+ dm-tree==0.1.6
33
+ docker-pycreds==0.4.0
34
+ entrypoints==0.3
35
+ filelock==3.3.0
36
+ flatbuffers==1.12
37
+ flax==0.3.5
38
+ fsspec==2021.10.0
39
+ gast==0.4.0
40
+ gitdb==4.0.9
41
+ gitpython==3.1.24
42
+ google-auth-oauthlib==0.4.6
43
+ google-auth==2.3.1
44
+ google-pasta==0.2.0
45
+ grpcio==1.41.1
46
+ h5py==3.1.0
47
+ huggingface-hub==0.4.0.dev0
48
+ idna==3.3
49
+ ipykernel==6.4.2
50
+ ipython-genutils==0.2.0
51
+ ipython==7.28.0
52
+ ipywidgets==7.6.5
53
+ jax==0.2.24
54
+ jaxlib==0.1.73
55
+ jedi==0.18.0
56
+ jinja2==3.0.2
57
+ jiwer==2.3.0
58
+ joblib==1.1.0
59
+ jsonschema==4.1.2
60
+ jupyter-client==7.0.6
61
+ jupyter-console==6.4.0
62
+ jupyter-core==4.8.1
63
+ jupyter==1.0.0
64
+ jupyterlab-pygments==0.1.2
65
+ jupyterlab-widgets==1.0.2
66
+ keras-preprocessing==1.1.2
67
+ keras==2.6.0
68
+ kiwisolver==1.3.2
69
+ librosa==0.8.1
70
+ libtpu-nightly==0.1.dev20211018
71
+ llvmlite==0.38.0
72
+ markdown==3.3.4
73
+ markupsafe==2.0.1
74
+ matplotlib-inline==0.1.3
75
+ matplotlib==3.4.3
76
+ mistune==0.8.4
77
+ msgpack==1.0.2
78
+ multidict==5.2.0
79
+ multiprocess==0.70.12.2
80
+ nbclient==0.5.4
81
+ nbconvert==6.2.0
82
+ nbformat==5.1.3
83
+ nest-asyncio==1.5.1
84
+ nltk==3.6.5
85
+ notebook==6.4.5
86
+ numba==0.55.0
87
+ numpy==1.19.5
88
+ oauthlib==3.1.1
89
+ opt-einsum==3.3.0
90
+ optax==0.0.9
91
+ packaging==21.0
92
+ pandas==1.3.4
93
+ pandocfilters==1.5.0
94
+ parso==0.8.2
95
+ pathtools==0.1.2
96
+ pexpect==4.8.0
97
+ pickleshare==0.7.5
98
+ pillow==8.3.2
99
+ pip==21.3.1
100
+ pkg-resources==0.0.0
101
+ pooch==1.6.0
102
+ portalocker==2.3.2
103
+ prometheus-client==0.11.0
104
+ promise==2.3
105
+ prompt-toolkit==3.0.20
106
+ protobuf==3.19.0
107
+ psutil==5.8.0
108
+ ptyprocess==0.7.0
109
+ pyarrow==5.0.0
110
+ pyasn1-modules==0.2.8
111
+ pyasn1==0.4.8
112
+ pycparser==2.20
113
+ pydeck==0.7.1
114
+ pygments==2.10.0
115
+ pymupdf==1.19.1
116
+ pyparsing==2.4.7
117
+ pyrsistent==0.18.0
118
+ python-dateutil==2.8.2
119
+ python-levenshtein==0.12.2
120
+ python-slugify==5.0.2
121
+ pytz-deprecation-shim==0.1.0.post0
122
+ pytz==2021.3
123
+ pyyaml==6.0
124
+ pyzmq==22.3.0
125
+ qtconsole==5.1.1
126
+ qtpy==1.11.2
127
+ regex==2021.10.8
128
+ requests-oauthlib==1.3.0
129
+ requests==2.26.0
130
+ resampy==0.2.2
131
+ rsa==4.7.2
132
+ sacrebleu==2.0.0
133
+ sacremoses==0.0.46
134
+ scikit-learn==1.0.1
135
+ scipy==1.7.1
136
+ send2trash==1.8.0
137
+ sentence-splitter==1.4
138
+ sentencepiece==0.1.96
139
+ sentry-sdk==1.4.3
140
+ seqeval==1.2.2
141
+ setuptools==44.1.1
142
+ shortuuid==1.0.1
143
+ simpletransformers==0.62.2
144
+ six==1.15.0
145
+ smmap==5.0.0
146
+ soundfile==0.10.3.post1
147
+ streamlit==1.1.0
148
+ subprocess32==3.5.4
149
+ tabulate==0.8.9
150
+ tensorboard-data-server==0.6.1
151
+ tensorboard-plugin-wit==1.8.0
152
+ tensorboard==2.7.0
153
+ tensorboardx==2.4
154
+ tensorflow-estimator==2.6.0
155
+ tensorflow==2.6.0
156
+ termcolor==1.1.0
157
+ terminado==0.12.1
158
+ testpath==0.5.0
159
+ text-unidecode==1.3
160
+ threadpoolctl==3.0.0
161
+ tokenizers==0.10.3
162
+ toml==0.10.2
163
+ toolz==0.11.1
164
+ torch==1.10.1
165
+ torchaudio==0.10.1
166
+ tornado==6.1
167
+ tqdm==4.62.3
168
+ traitlets==5.1.0
169
+ transformers==4.16.0.dev0
170
+ typing-extensions==3.7.4.3
171
+ tzdata==2021.5
172
+ tzlocal==4.0.2
173
+ urllib3==1.26.7
174
+ validators==0.18.2
175
+ wandb==0.12.7
176
+ watchdog==2.1.6
177
+ wcwidth==0.2.5
178
+ webencodings==0.5.1
179
+ werkzeug==2.0.2
180
+ wheel==0.37.0
181
+ widgetsnbextension==3.5.1
182
+ wrapt==1.12.1
183
+ xxhash==2.0.2
184
+ yarl==1.7.0
185
+ yaspin==2.1.0
wandb/run-20220125_145153-1ghti100/files/wandb-metadata.json ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "os": "Linux-5.13.0-25-generic-x86_64-with-glibc2.34",
3
+ "python": "3.9.7",
4
+ "heartbeatAt": "2022-01-25T13:51:55.755641",
5
+ "startedAt": "2022-01-25T13:51:53.776560",
6
+ "docker": null,
7
+ "gpu": "Quadro RTX 6000",
8
+ "gpu_count": 2,
9
+ "cpu_count": 96,
10
+ "cuda": null,
11
+ "args": [
12
+ "--dataset_name=NbAiLab/NPSC",
13
+ "--model_name_or_path=facebook/wav2vec2-xls-r-300m",
14
+ "--dataset_config_name=48K_mp3",
15
+ "--output_dir=./",
16
+ "--overwrite_output_dir",
17
+ "--hub_model_id=NbAiLab/xls-npsc",
18
+ "--num_train_epochs=10",
19
+ "--per_device_train_batch_size=8",
20
+ "--per_device_eval_batch_size=8",
21
+ "--gradient_accumulation_steps=4",
22
+ "--learning_rate=7.5e-5",
23
+ "--warmup_steps=500",
24
+ "--length_column_name=input_length",
25
+ "--evaluation_strategy=steps",
26
+ "--text_column_name=text",
27
+ "--chars_to_ignore",
28
+ ",",
29
+ "?",
30
+ ".",
31
+ "!",
32
+ "-",
33
+ ";",
34
+ ":",
35
+ "\"",
36
+ "\u201c",
37
+ "%",
38
+ "\u2018",
39
+ "\u201d",
40
+ "\ufffd",
41
+ "\u2014",
42
+ "\u2019",
43
+ "\u2026",
44
+ "\u2013",
45
+ "--save_steps=500",
46
+ "--eval_steps=500",
47
+ "--logging_steps=100",
48
+ "--layerdrop=0.0",
49
+ "--activation_dropout=0.1",
50
+ "--save_total_limit=3",
51
+ "--freeze_feature_encoder",
52
+ "--feat_proj_dropout=0.0",
53
+ "--mask_time_prob=0.75",
54
+ "--mask_time_length=10",
55
+ "--mask_feature_prob=0.25",
56
+ "--mask_feature_length=64",
57
+ "--gradient_checkpointing",
58
+ "--use_auth_token",
59
+ "--fp16",
60
+ "--group_by_length",
61
+ "--do_train",
62
+ "--do_eval",
63
+ "--max_train_samples=1000",
64
+ "--max_eval_samples=100",
65
+ "--push_to_hub"
66
+ ],
67
+ "state": "running",
68
+ "program": "/mnt/lv_ai_1_ficino/ml/xls-npsc/run_speech_recognition_ctc.py",
69
+ "codePath": "run_speech_recognition_ctc.py",
70
+ "git": {
71
+ "remote": "https://huggingface.co/NbAiLab/xls-npsc",
72
+ "commit": "64b71f2107460016dd1f487d6425c855f4f7dfe5"
73
+ },
74
+ "email": "versae@gmail.com",
75
+ "root": "/mnt/lv_ai_1_ficino/ml/xls-npsc",
76
+ "host": "ficino",
77
+ "username": "javierr",
78
+ "executable": "/home/javierr/venvs/notram/bin/python"
79
+ }
wandb/run-20220125_145153-1ghti100/files/wandb-summary.json ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220125_145153-1ghti100/logs/debug-internal.log ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220125_145153-1ghti100/logs/debug.log ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2022-01-25 14:51:53,779 INFO MainThread:3248974 [wandb_setup.py:_flush():71] setting env: {}
2
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_setup.py:_flush():71] setting login settings: {}
3
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_init.py:_log_setup():371] Logging user logs to /mnt/lv_ai_1_ficino/ml/xls-npsc/wandb/run-20220125_145153-1ghti100/logs/debug.log
4
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_init.py:_log_setup():372] Logging internal logs to /mnt/lv_ai_1_ficino/ml/xls-npsc/wandb/run-20220125_145153-1ghti100/logs/debug-internal.log
5
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_init.py:init():404] calling init triggers
6
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_init.py:init():409] wandb.init called with sweep_config: {}
7
+ config: {}
8
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [wandb_init.py:init():449] starting backend
9
+ 2022-01-25 14:51:53,780 INFO MainThread:3248974 [backend.py:_multiprocessing_setup():95] multiprocessing start_methods=fork,spawn,forkserver, using: spawn
10
+ 2022-01-25 14:51:53,835 INFO MainThread:3248974 [backend.py:ensure_launched():199] starting backend process...
11
+ 2022-01-25 14:51:53,865 INFO MainThread:3248974 [backend.py:ensure_launched():204] started backend process with pid: 3249965
12
+ 2022-01-25 14:51:53,867 INFO MainThread:3248974 [wandb_init.py:init():458] backend started and connected
13
+ 2022-01-25 14:51:53,869 INFO MainThread:3248974 [wandb_init.py:init():519] updated telemetry
14
+ 2022-01-25 14:51:53,944 INFO MainThread:3248974 [wandb_init.py:init():549] communicating current version
15
+ 2022-01-25 14:51:54,574 INFO MainThread:3248974 [wandb_init.py:init():554] got version response upgrade_message: "wandb version 0.12.9 is available! To upgrade, please run:\n $ pip install wandb --upgrade"
16
+
17
+ 2022-01-25 14:51:54,574 INFO MainThread:3248974 [wandb_init.py:init():564] communicating run to backend with 30 second timeout
18
+ 2022-01-25 14:51:54,883 INFO MainThread:3248974 [wandb_init.py:init():592] starting run threads in backend
19
+ 2022-01-25 14:51:55,945 INFO MainThread:3248974 [wandb_run.py:_console_start():1816] atexit reg
20
+ 2022-01-25 14:51:55,946 INFO MainThread:3248974 [wandb_run.py:_redirect():1690] redirect: SettingsConsole.REDIRECT
21
+ 2022-01-25 14:51:55,947 INFO MainThread:3248974 [wandb_run.py:_redirect():1695] Redirecting console.
22
+ 2022-01-25 14:51:55,950 INFO MainThread:3248974 [wandb_run.py:_redirect():1751] Redirects installed.
23
+ 2022-01-25 14:51:55,950 INFO MainThread:3248974 [wandb_init.py:init():619] run started, returning control to user process
24
+ 2022-01-25 14:51:55,954 INFO MainThread:3248974 [wandb_run.py:_config_callback():962] config_cb None None {'return_dict': True, 'output_hidden_states': False, 'output_attentions': False, 'torchscript': False, 'torch_dtype': 'float32', 'use_bfloat16': False, 'pruned_heads': {}, 'tie_word_embeddings': True, 'is_encoder_decoder': False, 'is_decoder': False, 'cross_attention_hidden_size': None, 'add_cross_attention': False, 'tie_encoder_decoder': False, 'max_length': 20, 'min_length': 0, 'do_sample': False, 'early_stopping': False, 'num_beams': 1, 'num_beam_groups': 1, 'diversity_penalty': 0.0, 'temperature': 1.0, 'top_k': 50, 'top_p': 1.0, 'repetition_penalty': 1.0, 'length_penalty': 1.0, 'no_repeat_ngram_size': 0, 'encoder_no_repeat_ngram_size': 0, 'bad_words_ids': None, 'num_return_sequences': 1, 'chunk_size_feed_forward': 0, 'output_scores': False, 'return_dict_in_generate': False, 'forced_bos_token_id': None, 'forced_eos_token_id': None, 'remove_invalid_values': False, 'architectures': ['Wav2Vec2ForPreTraining'], 'finetuning_task': None, 'id2label': {0: 'LABEL_0', 1: 'LABEL_1'}, 'label2id': {'LABEL_0': 0, 'LABEL_1': 1}, 'tokenizer_class': None, 'prefix': None, 'bos_token_id': 1, 'pad_token_id': 34, 'eos_token_id': 2, 'sep_token_id': None, 'decoder_start_token_id': None, 'task_specific_params': None, 'problem_type': None, '_name_or_path': 'facebook/wav2vec2-xls-r-300m', 'transformers_version': '4.16.0.dev0', 'feat_extract_dropout': 0.0, 'model_type': 'wav2vec2', 'num_feat_extract_layers': 7, 'hidden_size': 1024, 'feat_extract_norm': 'layer', 'feat_extract_activation': 'gelu', 'conv_dim': [512, 512, 512, 512, 512, 512, 512], 'conv_stride': [5, 2, 2, 2, 2, 2, 2], 'conv_kernel': [10, 3, 3, 3, 3, 2, 2], 'conv_bias': True, 'num_conv_pos_embeddings': 128, 'num_conv_pos_embedding_groups': 16, 'num_hidden_layers': 24, 'intermediate_size': 4096, 'hidden_act': 'gelu', 'num_attention_heads': 16, 'hidden_dropout': 0.0, 'attention_dropout': 0.0, 'activation_dropout': 0.1, 'feat_proj_dropout': 0.0, 'final_dropout': 0.0, 'layerdrop': 0.0, 'layer_norm_eps': 1e-05, 'initializer_range': 0.02, 'vocab_size': 37, 'do_stable_layer_norm': True, 'use_weighted_layer_sum': False, 'apply_spec_augment': True, 'mask_time_prob': 0.75, 'mask_time_length': 10, 'mask_time_min_masks': 2, 'mask_feature_prob': 0.25, 'mask_feature_length': 64, 'mask_feature_min_masks': 0, 'num_codevectors_per_group': 320, 'num_codevector_groups': 2, 'contrastive_logits_temperature': 0.1, 'feat_quantizer_dropout': 0.0, 'num_negatives': 100, 'codevector_dim': 768, 'proj_codevector_dim': 768, 'diversity_loss_weight': 0.1, 'ctc_loss_reduction': 'mean', 'ctc_zero_infinity': False, 'add_adapter': False, 'adapter_kernel_size': 3, 'adapter_stride': 2, 'num_adapter_layers': 3, 'output_hidden_size': 1024, 'classifier_proj_size': 256, 'tdnn_dim': [512, 512, 512, 512, 1500], 'tdnn_kernel': [5, 3, 3, 1, 1], 'tdnn_dilation': [1, 2, 3, 1, 1], 'xvector_output_dim': 512, 'output_dir': './', 'overwrite_output_dir': True, 'do_train': True, 'do_eval': True, 'do_predict': False, 'evaluation_strategy': 'steps', 'prediction_loss_only': False, 'per_device_train_batch_size': 8, 'per_device_eval_batch_size': 8, 'per_gpu_train_batch_size': 'None', 'per_gpu_eval_batch_size': 'None', 'gradient_accumulation_steps': 4, 'eval_accumulation_steps': 'None', 'learning_rate': 7.5e-05, 'weight_decay': 0.0, 'adam_beta1': 0.9, 'adam_beta2': 0.999, 'adam_epsilon': 1e-08, 'max_grad_norm': 1.0, 'num_train_epochs': 10.0, 'max_steps': -1, 'lr_scheduler_type': 'linear', 'warmup_ratio': 0.0, 'warmup_steps': 500, 'log_level': -1, 'log_level_replica': -1, 'log_on_each_node': True, 'logging_dir': './runs/Jan25_14-51-02_ficino', 'logging_strategy': 'steps', 'logging_first_step': False, 'logging_steps': 100, 'logging_nan_inf_filter': True, 'save_strategy': 'steps', 'save_steps': 500, 'save_total_limit': 3, 'save_on_each_node': False, 'no_cuda': False, 'seed': 42, 'bf16': False, 'fp16': True, 'fp16_opt_level': 'O1', 'half_precision_backend': 'amp', 'bf16_full_eval': False, 'fp16_full_eval': False, 'tf32': 'None', 'local_rank': -1, 'xpu_backend': 'None', 'tpu_num_cores': 'None', 'tpu_metrics_debug': False, 'debug': '[]', 'dataloader_drop_last': False, 'eval_steps': 500, 'dataloader_num_workers': 0, 'past_index': -1, 'run_name': './', 'disable_tqdm': False, 'remove_unused_columns': True, 'label_names': 'None', 'load_best_model_at_end': False, 'metric_for_best_model': 'None', 'greater_is_better': 'None', 'ignore_data_skip': False, 'sharded_ddp': '[]', 'deepspeed': 'None', 'label_smoothing_factor': 0.0, 'optim': 'adamw_hf', 'adafactor': False, 'group_by_length': True, 'length_column_name': 'input_length', 'report_to': "['tensorboard', 'wandb']", 'ddp_find_unused_parameters': 'None', 'ddp_bucket_cap_mb': 'None', 'dataloader_pin_memory': True, 'skip_memory_metrics': True, 'use_legacy_prediction_loop': False, 'push_to_hub': True, 'resume_from_checkpoint': 'None', 'hub_model_id': 'NbAiLab/xls-npsc', 'hub_strategy': 'every_save', 'hub_token': '<HUB_TOKEN>', 'gradient_checkpointing': True, 'fp16_backend': 'auto', 'push_to_hub_model_id': 'None', 'push_to_hub_organization': 'None', 'push_to_hub_token': '<PUSH_TO_HUB_TOKEN>', '_n_gpu': 2, 'mp_parameters': '', 'train_batch_size': 16, 'eval_batch_size': 16}
25
+ 2022-01-25 14:51:55,960 INFO MainThread:3248974 [wandb_watch.py:watch():43] Watching
wandb/run-20220125_145153-1ghti100/run-1ghti100.wandb ADDED
Binary file (863 kB). View file