sanchit-gandhi HF staff commited on
Commit
4dcbd05
1 Parent(s): 4a1e53e

Training in progress, step 500

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
+ wandb/run-20220503_172048-zotxt8wa/run-zotxt8wa.wandb filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
config.json ADDED
@@ -0,0 +1,285 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./",
3
+ "architectures": [
4
+ "SpeechEncoderDecoderModel"
5
+ ],
6
+ "decoder": {
7
+ "_name_or_path": "facebook/bart-large",
8
+ "activation_dropout": 0.1,
9
+ "activation_function": "gelu",
10
+ "add_bias_logits": false,
11
+ "add_cross_attention": true,
12
+ "add_final_layer_norm": false,
13
+ "architectures": [
14
+ "BartModel"
15
+ ],
16
+ "attention_dropout": 0.1,
17
+ "bad_words_ids": null,
18
+ "bos_token_id": 0,
19
+ "chunk_size_feed_forward": 0,
20
+ "classif_dropout": 0.1,
21
+ "classifier_dropout": 0.0,
22
+ "cross_attention_hidden_size": null,
23
+ "d_model": 1024,
24
+ "decoder_attention_heads": 16,
25
+ "decoder_ffn_dim": 4096,
26
+ "decoder_layerdrop": 0.0,
27
+ "decoder_layers": 12,
28
+ "decoder_start_token_id": 2,
29
+ "diversity_penalty": 0.0,
30
+ "do_sample": false,
31
+ "dropout": 0.1,
32
+ "early_stopping": true,
33
+ "encoder_attention_heads": 16,
34
+ "encoder_ffn_dim": 4096,
35
+ "encoder_layerdrop": 0.0,
36
+ "encoder_layers": 12,
37
+ "encoder_no_repeat_ngram_size": 0,
38
+ "eos_token_id": 2,
39
+ "exponential_decay_length_penalty": null,
40
+ "finetuning_task": null,
41
+ "forced_bos_token_id": 0,
42
+ "forced_eos_token_id": 2,
43
+ "gradient_checkpointing": false,
44
+ "id2label": {
45
+ "0": "LABEL_0",
46
+ "1": "LABEL_1",
47
+ "2": "LABEL_2"
48
+ },
49
+ "init_std": 0.02,
50
+ "is_decoder": true,
51
+ "is_encoder_decoder": false,
52
+ "label2id": {
53
+ "LABEL_0": 0,
54
+ "LABEL_1": 1,
55
+ "LABEL_2": 2
56
+ },
57
+ "length_penalty": 1.0,
58
+ "max_length": 20,
59
+ "max_position_embeddings": 1024,
60
+ "min_length": 0,
61
+ "model_type": "bart",
62
+ "no_repeat_ngram_size": 3,
63
+ "normalize_before": false,
64
+ "num_beam_groups": 1,
65
+ "num_beams": 4,
66
+ "num_hidden_layers": 12,
67
+ "num_return_sequences": 1,
68
+ "output_attentions": false,
69
+ "output_hidden_states": false,
70
+ "output_scores": false,
71
+ "pad_token_id": 1,
72
+ "prefix": null,
73
+ "problem_type": null,
74
+ "pruned_heads": {},
75
+ "remove_invalid_values": false,
76
+ "repetition_penalty": 1.0,
77
+ "return_dict": true,
78
+ "return_dict_in_generate": false,
79
+ "scale_embedding": false,
80
+ "sep_token_id": null,
81
+ "task_specific_params": {
82
+ "summarization": {
83
+ "length_penalty": 1.0,
84
+ "max_length": 128,
85
+ "min_length": 12,
86
+ "num_beams": 4
87
+ },
88
+ "summarization_cnn": {
89
+ "length_penalty": 2.0,
90
+ "max_length": 142,
91
+ "min_length": 56,
92
+ "num_beams": 4
93
+ },
94
+ "summarization_xsum": {
95
+ "length_penalty": 1.0,
96
+ "max_length": 62,
97
+ "min_length": 11,
98
+ "num_beams": 6
99
+ }
100
+ },
101
+ "temperature": 1.0,
102
+ "tie_encoder_decoder": false,
103
+ "tie_word_embeddings": true,
104
+ "tokenizer_class": null,
105
+ "top_k": 50,
106
+ "top_p": 1.0,
107
+ "torch_dtype": null,
108
+ "torchscript": false,
109
+ "transformers_version": "4.19.0.dev0",
110
+ "typical_p": 1.0,
111
+ "use_bfloat16": false,
112
+ "use_cache": true,
113
+ "vocab_size": 50265
114
+ },
115
+ "decoder_start_token_id": 0,
116
+ "encoder": {
117
+ "_name_or_path": "facebook/wav2vec2-xls-r-300m",
118
+ "activation_dropout": 0.0,
119
+ "adapter_kernel_size": 3,
120
+ "adapter_stride": 2,
121
+ "add_adapter": true,
122
+ "add_cross_attention": false,
123
+ "apply_spec_augment": true,
124
+ "architectures": [
125
+ "Wav2Vec2ForPreTraining"
126
+ ],
127
+ "attention_dropout": 0.1,
128
+ "bad_words_ids": null,
129
+ "bos_token_id": 1,
130
+ "chunk_size_feed_forward": 0,
131
+ "classifier_proj_size": 256,
132
+ "codevector_dim": 768,
133
+ "contrastive_logits_temperature": 0.1,
134
+ "conv_bias": true,
135
+ "conv_dim": [
136
+ 512,
137
+ 512,
138
+ 512,
139
+ 512,
140
+ 512,
141
+ 512,
142
+ 512
143
+ ],
144
+ "conv_kernel": [
145
+ 10,
146
+ 3,
147
+ 3,
148
+ 3,
149
+ 3,
150
+ 2,
151
+ 2
152
+ ],
153
+ "conv_stride": [
154
+ 5,
155
+ 2,
156
+ 2,
157
+ 2,
158
+ 2,
159
+ 2,
160
+ 2
161
+ ],
162
+ "cross_attention_hidden_size": null,
163
+ "ctc_loss_reduction": "sum",
164
+ "ctc_zero_infinity": false,
165
+ "decoder_start_token_id": null,
166
+ "diversity_loss_weight": 0.1,
167
+ "diversity_penalty": 0.0,
168
+ "do_sample": false,
169
+ "do_stable_layer_norm": true,
170
+ "early_stopping": false,
171
+ "encoder_no_repeat_ngram_size": 0,
172
+ "eos_token_id": 2,
173
+ "exponential_decay_length_penalty": null,
174
+ "feat_extract_activation": "gelu",
175
+ "feat_extract_dropout": 0.0,
176
+ "feat_extract_norm": "layer",
177
+ "feat_proj_dropout": 0.0,
178
+ "feat_quantizer_dropout": 0.0,
179
+ "final_dropout": 0.0,
180
+ "finetuning_task": null,
181
+ "forced_bos_token_id": null,
182
+ "forced_eos_token_id": null,
183
+ "gradient_checkpointing": false,
184
+ "hidden_act": "gelu",
185
+ "hidden_dropout": 0.1742341660721257,
186
+ "hidden_size": 1024,
187
+ "id2label": {
188
+ "0": "LABEL_0",
189
+ "1": "LABEL_1"
190
+ },
191
+ "initializer_range": 0.02,
192
+ "intermediate_size": 4096,
193
+ "is_decoder": false,
194
+ "is_encoder_decoder": false,
195
+ "label2id": {
196
+ "LABEL_0": 0,
197
+ "LABEL_1": 1
198
+ },
199
+ "layer_norm_eps": 1e-05,
200
+ "layerdrop": 0.0,
201
+ "length_penalty": 1.0,
202
+ "mask_feature_length": 10,
203
+ "mask_feature_min_masks": 0,
204
+ "mask_feature_prob": 0.0,
205
+ "mask_time_length": 10,
206
+ "mask_time_min_masks": 2,
207
+ "mask_time_prob": 0.1,
208
+ "max_length": 20,
209
+ "min_length": 0,
210
+ "model_type": "wav2vec2",
211
+ "no_repeat_ngram_size": 0,
212
+ "num_adapter_layers": 3,
213
+ "num_attention_heads": 16,
214
+ "num_beam_groups": 1,
215
+ "num_beams": 1,
216
+ "num_codevector_groups": 2,
217
+ "num_codevectors_per_group": 320,
218
+ "num_conv_pos_embedding_groups": 16,
219
+ "num_conv_pos_embeddings": 128,
220
+ "num_feat_extract_layers": 7,
221
+ "num_hidden_layers": 24,
222
+ "num_negatives": 100,
223
+ "num_return_sequences": 1,
224
+ "output_attentions": false,
225
+ "output_hidden_size": 1024,
226
+ "output_hidden_states": false,
227
+ "output_scores": false,
228
+ "pad_token_id": 0,
229
+ "prefix": null,
230
+ "problem_type": null,
231
+ "proj_codevector_dim": 768,
232
+ "pruned_heads": {},
233
+ "remove_invalid_values": false,
234
+ "repetition_penalty": 1.0,
235
+ "return_dict": true,
236
+ "return_dict_in_generate": false,
237
+ "sep_token_id": null,
238
+ "task_specific_params": null,
239
+ "tdnn_dilation": [
240
+ 1,
241
+ 2,
242
+ 3,
243
+ 1,
244
+ 1
245
+ ],
246
+ "tdnn_dim": [
247
+ 512,
248
+ 512,
249
+ 512,
250
+ 512,
251
+ 1500
252
+ ],
253
+ "tdnn_kernel": [
254
+ 5,
255
+ 3,
256
+ 3,
257
+ 1,
258
+ 1
259
+ ],
260
+ "temperature": 1.0,
261
+ "tie_encoder_decoder": false,
262
+ "tie_word_embeddings": true,
263
+ "tokenizer_class": null,
264
+ "top_k": 50,
265
+ "top_p": 1.0,
266
+ "torch_dtype": "float32",
267
+ "torchscript": false,
268
+ "transformers_version": "4.19.0.dev0",
269
+ "typical_p": 1.0,
270
+ "use_bfloat16": false,
271
+ "use_weighted_layer_sum": false,
272
+ "vocab_size": 32,
273
+ "xvector_output_dim": 512
274
+ },
275
+ "eos_token_id": 2,
276
+ "is_encoder_decoder": true,
277
+ "max_length": 40,
278
+ "model_type": "speech-encoder-decoder",
279
+ "pad_token_id": 1,
280
+ "processor_class": "Wav2Vec2Processor",
281
+ "tie_word_embeddings": false,
282
+ "torch_dtype": "float32",
283
+ "transformers_version": null,
284
+ "use_cache": false
285
+ }
create_model.py ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import SpeechEncoderDecoderModel, AutoFeatureExtractor, AutoTokenizer
2
+ import torch
3
+
4
+
5
+ encoder_id = "facebook/wav2vec2-xls-r-300m"
6
+ decoder_id = "facebook/bart-large"
7
+
8
+ model = SpeechEncoderDecoderModel.from_encoder_decoder_pretrained(encoder_id, decoder_id, encoder_add_adapter=True)
9
+ model.config.encoder.feat_proj_dropout = 0.0
10
+ model.config.encoder.final_dropout = 0.0
11
+ model.config.encoder.mask_time_prob = 0.1
12
+ model.config.decoder_start_token_id = model.decoder.config.bos_token_id
13
+ model.config.pad_token_id = model.decoder.config.pad_token_id
14
+ model.config.eos_token_id = model.decoder.config.eos_token_id
15
+ model.config.max_length = 40
16
+ model.config.num_beams = 1
17
+ model.config.encoder.layerdrop = 0.0
18
+ model.config.use_cache = False
19
+ model.config.processor_class = "Wav2Vec2Processor"
20
+
21
+ # check if generation works
22
+ out = model.generate(torch.ones((1, 2000)))
23
+
24
+ model.save_pretrained("./")
25
+
26
+ feature_etxractor = AutoFeatureExtractor.from_pretrained(encoder_id)
27
+ feature_etxractor.save_pretrained("./")
28
+ tokenizer = AutoTokenizer.from_pretrained(decoder_id)
29
+ tokenizer.save_pretrained("./")
30
+
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "feature_extractor_type": "Wav2Vec2FeatureExtractor",
4
+ "feature_size": 1,
5
+ "padding_side": "right",
6
+ "padding_value": 0,
7
+ "return_attention_mask": true,
8
+ "sampling_rate": 16000
9
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbc5b965029fbdc0a38c7eb9d58f8563cfee217953f92fde569dbc673dcfa6c0
3
+ size 2353867057
run.sh ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ CUDA_VISIBLE_DEVICES=0 python run_xtreme_s.py \
3
+ --model_name_or_path="./" \
4
+ --task="covost2" \
5
+ --language="fr.en" \
6
+ --eval_split_name="test" \
7
+ --output_dir="./" \
8
+ --overwrite_output_dir \
9
+ --num_train_epochs="3" \
10
+ --per_device_train_batch_size="4" \
11
+ --per_device_eval_batch_size="2" \
12
+ --gradient_accumulation_steps="2" \
13
+ --generation_max_length="40" \
14
+ --generation_num_beams="1" \
15
+ --learning_rate="3e-4" \
16
+ --warmup_steps="500" \
17
+ --evaluation_strategy="steps" \
18
+ --max_duration_in_seconds="20" \
19
+ --save_steps="500" \
20
+ --eval_steps="500" \
21
+ --logging_steps="1" \
22
+ --freeze_feature_encoder \
23
+ --gradient_checkpointing \
24
+ --fp16 \
25
+ --group_by_length \
26
+ --do_train \
27
+ --do_eval \
28
+ --metric_for_best_model="bleu" \
29
+ --greater_is_better=True \
30
+ --load_best_model_at_end \
31
+ --push_to_hub \
32
+ --use_auth_token
run_xtreme_s.py ADDED
@@ -0,0 +1,948 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+ # coding=utf-8
3
+ # Copyright 2022 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 pretrained speech model on the XTREME-S benchmark tasks"""
17
+
18
+ import json
19
+ import logging
20
+ import os
21
+ import re
22
+ import sys
23
+ from collections import OrderedDict, defaultdict
24
+ from dataclasses import dataclass, field
25
+ from typing import Dict, List, Optional, Union
26
+
27
+ import datasets
28
+ import numpy as np
29
+ import torch
30
+ from datasets import DatasetDict, load_dataset, load_metric
31
+
32
+ import transformers
33
+ from transformers import (
34
+ AutoConfig,
35
+ AutoFeatureExtractor,
36
+ AutoModelForAudioClassification,
37
+ AutoModelForCTC,
38
+ AutoModelForSpeechSeq2Seq,
39
+ AutoProcessor,
40
+ AutoTokenizer,
41
+ HfArgumentParser,
42
+ Seq2SeqTrainer,
43
+ Seq2SeqTrainingArguments,
44
+ SpeechEncoderDecoderModel,
45
+ Trainer,
46
+ set_seed,
47
+ )
48
+ from transformers.trainer_utils import get_last_checkpoint, is_main_process
49
+ from transformers.utils import check_min_version
50
+ from transformers.utils.versions import require_version
51
+
52
+
53
+ # Will error if the minimal version of Transformers is not installed. Remove at your own risks.
54
+ check_min_version("4.18.0.dev0")
55
+
56
+ require_version("datasets>=1.18.0", "To fix: pip install -r examples/pytorch/speech-recognition/requirements.txt")
57
+
58
+
59
+ logger = logging.getLogger(__name__)
60
+
61
+
62
+ def list_field(default=None, metadata=None):
63
+ return field(default_factory=lambda: default, metadata=metadata)
64
+
65
+
66
+ TASK_TO_TARGET_COLUMN_NAME = {
67
+ "fleurs-asr": "transcription",
68
+ "fleurs-lang_id": "lang_id",
69
+ "mls": "transcription",
70
+ "voxpopuli": "transcription",
71
+ "covost2": "translation",
72
+ "minds14": "intent_class",
73
+ "babel": "transcription",
74
+ }
75
+
76
+
77
+ @dataclass
78
+ class ModelArguments:
79
+ """
80
+ Arguments pertaining to which model/config/tokenizer we are going to fine-tune from.
81
+ """
82
+
83
+ model_name_or_path: str = field(
84
+ metadata={"help": "Path to pretrained model or model identifier from huggingface.co/models"}
85
+ )
86
+ tokenizer_name_or_path: Optional[str] = field(
87
+ default=None,
88
+ metadata={"help": "Path to pretrained tokenizer or tokenizer identifier from huggingface.co/models"},
89
+ )
90
+ cache_dir: Optional[str] = field(
91
+ default=None,
92
+ metadata={
93
+ "help": "Where do you want to store the pretrained models and datasets downloaded from " "huggingface.co"
94
+ },
95
+ )
96
+ freeze_feature_encoder: bool = field(
97
+ default=True, metadata={"help": "Whether to freeze the feature encoder layers of the model."}
98
+ )
99
+ attention_dropout: float = field(
100
+ default=0.0, metadata={"help": "The dropout ratio for the attention probabilities."}
101
+ )
102
+ activation_dropout: float = field(
103
+ default=0.0, metadata={"help": "The dropout ratio for activations inside the fully connected layer."}
104
+ )
105
+ feat_proj_dropout: float = field(default=0.0, metadata={"help": "The dropout ratio for the projected features."})
106
+ hidden_dropout: float = field(
107
+ default=0.0,
108
+ metadata={
109
+ "help": "The dropout probability for all fully connected layers in the embeddings, encoder, and pooler."
110
+ },
111
+ )
112
+ final_dropout: float = field(
113
+ default=0.0,
114
+ metadata={"help": "The dropout probability for the final projection layer."},
115
+ )
116
+ mask_time_prob: float = field(
117
+ default=0.05,
118
+ metadata={
119
+ "help": "Probability of each feature vector along the time axis to be chosen as the start of the vector"
120
+ "span to be masked. Approximately ``mask_time_prob * sequence_length // mask_time_length`` feature"
121
+ "vectors will be masked along the time axis."
122
+ },
123
+ )
124
+ mask_time_length: int = field(
125
+ default=10,
126
+ metadata={"help": "Length of vector span to mask along the time axis."},
127
+ )
128
+ mask_feature_prob: float = field(
129
+ default=0.0,
130
+ metadata={
131
+ "help": "Probability of each feature vector along the feature axis to be chosen as the start of the vector"
132
+ "span to be masked. Approximately ``mask_feature_prob * sequence_length // mask_feature_length`` feature bins will be masked along the time axis."
133
+ },
134
+ )
135
+ mask_feature_length: int = field(
136
+ default=10,
137
+ metadata={"help": "Length of vector span to mask along the feature axis."},
138
+ )
139
+ layerdrop: float = field(default=0.0, metadata={"help": "The LayerDrop probability."})
140
+ ctc_zero_infinity: bool = field(
141
+ default=False,
142
+ metadata={"help": "Whether to zero infinite losses and the associated gradients of `torch.nn.CTCLoss`."},
143
+ )
144
+ ctc_loss_reduction: Optional[str] = field(
145
+ default="mean", metadata={"help": "The way the ctc loss should be reduced. Should be one of 'mean' or 'sum'."}
146
+ )
147
+
148
+
149
+ @dataclass
150
+ class DataTrainingArguments:
151
+ """
152
+ Arguments pertaining to what data we are going to input our model for training and eval.
153
+
154
+ Using `HfArgumentParser` we can turn this class
155
+ into argparse arguments to be able to specify them on
156
+ the command line.
157
+ """
158
+
159
+ dataset_name: str = field(
160
+ default="google/xtreme_s",
161
+ metadata={"help": "The name of the dataset to use (via the datasets library). Defaults to 'google/xtreme_s'"},
162
+ )
163
+ task: str = field(
164
+ default=None,
165
+ metadata={
166
+ "help": "The task name of the benchmark to use (via the datasets library). Should be on of: "
167
+ "'fleurs-asr', 'mls', 'voxpopuli', 'covost2', 'minds14', 'fleurs-lang_id', 'babel'."
168
+ },
169
+ )
170
+ language: str = field(
171
+ default="all",
172
+ metadata={"help": "The language id as defined in the datasets config name or `all` for all languages."},
173
+ )
174
+ language_group: str = field(
175
+ default=None,
176
+ metadata={
177
+ "help": "The language group to select a subset of languages to train on. "
178
+ "This option is only used the 'fleurs-asr' task. Should be one of: "
179
+ "'western_european_we', 'eastern_european_ee', 'central_asia_middle_north_african_cmn', "
180
+ "'sub_saharan_african_ssa', 'south_asian_sa', 'south_east_asian_sea', 'chinese_japanase_korean_cjk'."
181
+ },
182
+ )
183
+ train_split_name: str = field(
184
+ default="train",
185
+ metadata={
186
+ "help": "The name of the training dataset split to use (via the datasets library). Defaults to 'train'"
187
+ },
188
+ )
189
+ eval_split_name: str = field(
190
+ default="validation",
191
+ metadata={
192
+ "help": "The name of the evaluation dataset split to use (via the datasets library). "
193
+ "Defaults to 'validation'"
194
+ },
195
+ )
196
+ predict_split_name: str = field(
197
+ default="test",
198
+ metadata={
199
+ "help": "The name of the prediction dataset split to use (via the datasets library). " "Defaults to 'test'"
200
+ },
201
+ )
202
+ audio_column_name: str = field(
203
+ default="audio",
204
+ metadata={"help": "The name of the dataset column containing the audio data. Defaults to 'audio'"},
205
+ )
206
+ target_column_name: str = field(
207
+ default=None,
208
+ metadata={
209
+ "help": "The name of the dataset column containing the target data "
210
+ "(transcription/translation/label). If None, the name will be inferred from the task. Defaults to None."
211
+ },
212
+ )
213
+ overwrite_cache: bool = field(
214
+ default=False, metadata={"help": "Overwrite the cached preprocessed datasets or not."}
215
+ )
216
+ preprocessing_num_workers: Optional[int] = field(
217
+ default=None,
218
+ metadata={"help": "The number of processes to use for the preprocessing."},
219
+ )
220
+ max_train_samples: Optional[int] = field(
221
+ default=None,
222
+ metadata={
223
+ "help": "For debugging purposes or quicker training, truncate the number of training examples to this "
224
+ "value if set."
225
+ },
226
+ )
227
+ max_eval_samples: Optional[int] = field(
228
+ default=None,
229
+ metadata={
230
+ "help": "For debugging purposes or quicker training, truncate the number of validation examples to this "
231
+ "value if set."
232
+ },
233
+ )
234
+ max_predict_samples: Optional[int] = field(
235
+ default=None,
236
+ metadata={
237
+ "help": "For debugging purposes or quicker training, truncate the number of prediction examples to this "
238
+ "value if set."
239
+ },
240
+ )
241
+ chars_to_ignore: Optional[List[str]] = list_field(
242
+ default=', ? . ! - ; : " “ % ‘ ” �'.split(" "),
243
+ metadata={"help": "A list of characters to remove from the transcripts."},
244
+ )
245
+ max_duration_in_seconds: float = field(
246
+ default=30.0,
247
+ metadata={
248
+ "help": "Filter audio files that are longer than `max_duration_in_seconds` seconds to 'max_duration_in_seconds`"
249
+ },
250
+ )
251
+ min_duration_in_seconds: float = field(
252
+ default=0.0, metadata={"help": "Filter audio files that are shorter than `min_duration_in_seconds` seconds"}
253
+ )
254
+ preprocessing_only: bool = field(
255
+ default=False,
256
+ metadata={
257
+ "help": "Whether to only do data preprocessing and skip training. "
258
+ "This is especially useful when data preprocessing errors out in distributed training due to timeout. "
259
+ "In this case, one should run the preprocessing in a non-distributed setup with `preprocessing_only=True` "
260
+ "so that the cached datasets can consequently be loaded in distributed training"
261
+ },
262
+ )
263
+ use_auth_token: bool = field(
264
+ default=False,
265
+ metadata={
266
+ "help": "If :obj:`True`, will use the token generated when running"
267
+ ":obj:`transformers-cli login` as HTTP bearer authorization for remote files."
268
+ },
269
+ )
270
+ unk_token: str = field(
271
+ default="[UNK]",
272
+ metadata={"help": "The unk token for the tokenizer"},
273
+ )
274
+ pad_token: str = field(
275
+ default="[PAD]",
276
+ metadata={"help": "The padding token for the tokenizer"},
277
+ )
278
+ word_delimiter_token: str = field(
279
+ default="|",
280
+ metadata={"help": "The word delimiter token for the tokenizer"},
281
+ )
282
+ phoneme_language: Optional[str] = field(
283
+ default=None,
284
+ metadata={
285
+ "help": "The target language that should be used be"
286
+ " passed to the tokenizer for tokenization. Note that"
287
+ " this is only relevant if the model classifies the"
288
+ " input audio to a sequence of phoneme sequences."
289
+ },
290
+ )
291
+ per_lang_metrics: bool = field(
292
+ default=True,
293
+ metadata={
294
+ "help": "If `True`, compute the test metrics separately for each language, and average the results. "
295
+ "If `False` compute the average test metrics in a single pass for all languages at once."
296
+ },
297
+ )
298
+
299
+
300
+ @dataclass
301
+ class SpeechDataCollatorWithPadding:
302
+
303
+ processor: AutoProcessor
304
+ decoder_start_token_id: Optional[int] = None
305
+ padding: Union[bool, str] = "longest"
306
+ pad_labels: Optional[int] = True
307
+ pad_to_multiple_of: Optional[int] = None
308
+ pad_to_multiple_of_labels: Optional[int] = None
309
+
310
+ def __call__(self, features: List[Dict[str, Union[List[int], torch.Tensor]]]) -> Dict[str, torch.Tensor]:
311
+ # split inputs and labels since they have to be of different lenghts and need
312
+ # different padding methods
313
+ input_features = [{"input_values": feature["input_values"]} for feature in features]
314
+
315
+ batch = self.processor.pad(
316
+ input_features,
317
+ padding=self.padding,
318
+ pad_to_multiple_of=self.pad_to_multiple_of,
319
+ return_tensors="pt",
320
+ )
321
+
322
+ if self.pad_labels:
323
+ label_features = [{"input_ids": feature["labels"]} for feature in features]
324
+ with self.processor.as_target_processor():
325
+ labels_batch = self.processor.pad(
326
+ label_features,
327
+ padding=self.padding,
328
+ pad_to_multiple_of=self.pad_to_multiple_of_labels,
329
+ return_tensors="pt",
330
+ )
331
+
332
+ # replace padding with -100 to ignore loss correctly
333
+ labels = labels_batch["input_ids"].masked_fill(labels_batch.attention_mask.ne(1), -100)
334
+
335
+ # if bos token is appended in previous tokenization step,
336
+ # cut bos token here as it's append later anyways
337
+ if (
338
+ self.decoder_start_token_id is not None
339
+ and (labels[:, 0] == self.decoder_start_token_id).all().cpu().item()
340
+ ):
341
+ labels = labels[:, 1:]
342
+
343
+ batch["labels"] = labels
344
+ else:
345
+ batch["labels"] = torch.tensor([feature["labels"] for feature in features])
346
+
347
+ return batch
348
+
349
+
350
+ def create_vocabulary_from_data(
351
+ datasets: DatasetDict,
352
+ word_delimiter_token: Optional[str] = None,
353
+ unk_token: Optional[str] = None,
354
+ pad_token: Optional[str] = None,
355
+ ):
356
+ # Given training and test labels create vocabulary
357
+ def extract_all_chars(batch):
358
+ all_text = " ".join(batch["target_text"])
359
+ vocab = list(set(all_text))
360
+ return {"vocab": [vocab], "all_text": [all_text]}
361
+
362
+ vocabs = datasets.map(
363
+ extract_all_chars,
364
+ batched=True,
365
+ batch_size=-1,
366
+ keep_in_memory=True,
367
+ remove_columns=datasets["train"].column_names,
368
+ )
369
+
370
+ # take union of all unique characters in each dataset
371
+ vocab_set = (
372
+ (set(vocabs["train"]["vocab"][0]) if "train" in vocabs else set())
373
+ | (set(vocabs["eval"]["vocab"][0]) if "eval" in vocabs else set())
374
+ | (set(vocabs["predict"]["vocab"][0]) if "predict" in vocabs else set())
375
+ )
376
+
377
+ vocab_dict = {v: k for k, v in enumerate(sorted(list(vocab_set)))}
378
+
379
+ # replace white space with delimiter token
380
+ if word_delimiter_token is not None:
381
+ vocab_dict[word_delimiter_token] = vocab_dict[" "]
382
+ del vocab_dict[" "]
383
+
384
+ # add unk and pad token
385
+ if unk_token is not None:
386
+ vocab_dict[unk_token] = len(vocab_dict)
387
+
388
+ if pad_token is not None:
389
+ vocab_dict[pad_token] = len(vocab_dict)
390
+
391
+ return vocab_dict
392
+
393
+
394
+ def main():
395
+ # See all possible arguments in src/transformers/training_args.py
396
+ # or by passing the --help flag to this script.
397
+ # We now keep distinct sets of args, for a cleaner separation of concerns.
398
+
399
+ parser = HfArgumentParser((ModelArguments, DataTrainingArguments, Seq2SeqTrainingArguments))
400
+ if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
401
+ # If we pass only one argument to the script and it's the path to a json file,
402
+ # let's parse it to get our arguments.
403
+ model_args, data_args, training_args = parser.parse_json_file(json_file=os.path.abspath(sys.argv[1]))
404
+ else:
405
+ model_args, data_args, training_args = parser.parse_args_into_dataclasses()
406
+
407
+ # Detecting last checkpoint.
408
+ last_checkpoint = None
409
+ if os.path.isdir(training_args.output_dir) and training_args.do_train and not training_args.overwrite_output_dir:
410
+ last_checkpoint = get_last_checkpoint(training_args.output_dir)
411
+ if last_checkpoint is None and len(os.listdir(training_args.output_dir)) > 0:
412
+ raise ValueError(
413
+ f"Output directory ({training_args.output_dir}) already exists and is not empty. "
414
+ "Use --overwrite_output_dir to overcome."
415
+ )
416
+ elif last_checkpoint is not None:
417
+ logger.info(
418
+ f"Checkpoint detected, resuming training at {last_checkpoint}. To avoid this behavior, change "
419
+ "the `--output_dir` or add `--overwrite_output_dir` to train from scratch."
420
+ )
421
+
422
+ # Setup logging
423
+ logging.basicConfig(
424
+ format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
425
+ datefmt="%m/%d/%Y %H:%M:%S",
426
+ handlers=[logging.StreamHandler(sys.stdout)],
427
+ )
428
+ logger.setLevel(logging.INFO if is_main_process(training_args.local_rank) else logging.WARN)
429
+
430
+ # Log on each process the small summary:
431
+ logger.warning(
432
+ f"Process rank: {training_args.local_rank}, device: {training_args.device}, n_gpu: {training_args.n_gpu}"
433
+ f"distributed training: {bool(training_args.local_rank != -1)}, 16-bits training: {training_args.fp16}"
434
+ )
435
+ # Set the verbosity to info of the Transformers logger (on main process only):
436
+ if is_main_process(training_args.local_rank):
437
+ transformers.utils.logging.set_verbosity_info()
438
+ logger.info("Training/evaluation parameters %s", training_args)
439
+
440
+ # Set seed before initializing model.
441
+ set_seed(training_args.seed)
442
+
443
+ # 1. First, let's load the dataset
444
+ raw_datasets = DatasetDict()
445
+ task_name = data_args.task
446
+ lang_id = data_args.language
447
+
448
+ if task_name is None:
449
+ raise ValueError(
450
+ "Set --task should be set to '<xtreme_s_task>' " "(e.g. 'fleurs-asr', 'mls', 'covost2', 'minds14') "
451
+ )
452
+ if lang_id is None:
453
+ raise ValueError(
454
+ "Set --language should be set to the language id of the sub dataset "
455
+ "config to be used (e.g. 'pl', 'en.tr', 'fr-FR') or 'all'"
456
+ " for multi-lingual fine-tuning."
457
+ )
458
+ if data_args.language_group is not None:
459
+ if data_args.task != "fleurs-asr":
460
+ raise ValueError("--language_group should only be used with --task=fleurs-asr")
461
+ if data_args.language != "all":
462
+ raise ValueError("--language_group should only be used with --language=all")
463
+
464
+ if data_args.target_column_name is None:
465
+ target_column_name = TASK_TO_TARGET_COLUMN_NAME[task_name]
466
+ else:
467
+ target_column_name = data_args.target_column_name
468
+
469
+ # here we differentiate between tasks with text as the target and classification tasks
470
+ is_text_target = target_column_name in ("transcription", "translation")
471
+
472
+ config_name = ".".join([task_name.split("-")[0], lang_id])
473
+
474
+ if training_args.do_train:
475
+ raw_datasets["train"] = load_dataset(
476
+ data_args.dataset_name,
477
+ config_name,
478
+ split=data_args.train_split_name,
479
+ use_auth_token=data_args.use_auth_token,
480
+ cache_dir=model_args.cache_dir,
481
+ )
482
+
483
+ if data_args.audio_column_name not in raw_datasets["train"].column_names:
484
+ raise ValueError(
485
+ f"--audio_column_name '{data_args.audio_column_name}' not found in dataset '{data_args.dataset_name}'. "
486
+ "Make sure to set `--audio_column_name` to the correct audio column - one of "
487
+ f"{', '.join(raw_datasets['train'].column_names)}."
488
+ )
489
+
490
+ if target_column_name not in raw_datasets["train"].column_names:
491
+ raise ValueError(
492
+ f"--target_column_name {target_column_name} not found in dataset '{data_args.dataset_name}'. "
493
+ "Make sure to set `--target_column_name` to the correct text column - one of "
494
+ f"{', '.join(raw_datasets['train'].column_names)}."
495
+ )
496
+
497
+ if data_args.max_train_samples is not None:
498
+ raw_datasets["train"] = raw_datasets["train"].select(range(data_args.max_train_samples))
499
+
500
+ if training_args.do_eval:
501
+ raw_datasets["eval"] = load_dataset(
502
+ data_args.dataset_name,
503
+ config_name,
504
+ split=data_args.eval_split_name,
505
+ use_auth_token=data_args.use_auth_token,
506
+ cache_dir=model_args.cache_dir,
507
+ )
508
+
509
+ if data_args.max_eval_samples is not None:
510
+ raw_datasets["eval"] = raw_datasets["eval"].select(range(data_args.max_eval_samples))
511
+
512
+ if training_args.do_predict:
513
+ raw_datasets["predict"] = load_dataset(
514
+ data_args.dataset_name,
515
+ config_name,
516
+ split=data_args.predict_split_name,
517
+ use_auth_token=data_args.use_auth_token,
518
+ cache_dir=model_args.cache_dir,
519
+ )
520
+
521
+ if data_args.max_predict_samples is not None:
522
+ raw_datasets["predict"] = raw_datasets["predict"].select(range(data_args.max_predict_samples))
523
+
524
+ lang_list = next(iter(raw_datasets.values())).features["lang_id"].names
525
+ if not is_text_target:
526
+ label_list = next(iter(raw_datasets.values())).features[target_column_name].names
527
+ num_labels = len(label_list)
528
+
529
+ num_workers = data_args.preprocessing_num_workers
530
+
531
+ lang_group = data_args.language_group
532
+ if lang_group is not None:
533
+ with training_args.main_process_first(desc="language group filter"):
534
+ lang_group_id = next(iter(raw_datasets.values())).features["lang_group_id"].str2int(lang_group)
535
+ raw_datasets = raw_datasets.filter(
536
+ lambda lang_group: lang_group == lang_group_id,
537
+ num_proc=num_workers,
538
+ input_columns=["lang_group_id"],
539
+ )
540
+
541
+ # 2. We remove some special characters from the datasets
542
+ # that make training complicated and do not help in transcribing the speech
543
+ # E.g. characters, such as `,` and `.` do not really have an acoustic characteristic
544
+ # that could be easily picked up by the model
545
+ chars_to_ignore_regex = (
546
+ f'[{"".join(data_args.chars_to_ignore)}]' if data_args.chars_to_ignore is not None else None
547
+ )
548
+
549
+ def remove_special_characters(batch):
550
+ if chars_to_ignore_regex is not None:
551
+ batch["target_text"] = re.sub(chars_to_ignore_regex, "", batch[target_column_name]).lower()
552
+ else:
553
+ batch["target_text"] = batch[target_column_name].lower()
554
+ return batch
555
+
556
+ if is_text_target:
557
+ with training_args.main_process_first(desc="dataset map special characters removal"):
558
+ raw_datasets = raw_datasets.map(
559
+ remove_special_characters,
560
+ remove_columns=[target_column_name],
561
+ desc="remove special characters from datasets",
562
+ )
563
+
564
+ # save special tokens for tokenizer
565
+ word_delimiter_token = data_args.word_delimiter_token
566
+ unk_token = data_args.unk_token
567
+ pad_token = data_args.pad_token
568
+
569
+
570
+ encoder_id = "facebook/wav2vec2-xls-r-300m"
571
+ decoder_id = "facebook/bart-large"
572
+
573
+ model = SpeechEncoderDecoderModel.from_encoder_decoder_pretrained(encoder_id, decoder_id, encoder_add_adapter=True)
574
+ model.config.encoder.feat_proj_dropout = 0.0
575
+ model.config.encoder.final_dropout = 0.0
576
+ model.config.encoder.mask_time_prob = 0.1
577
+ model.config.decoder_start_token_id = model.decoder.config.bos_token_id
578
+ model.config.pad_token_id = model.decoder.config.pad_token_id
579
+ model.config.eos_token_id = model.decoder.config.eos_token_id
580
+ model.config.max_length = 40
581
+ model.config.num_beams = 1
582
+ model.config.encoder.layerdrop = 0.0
583
+ model.config.use_cache = False
584
+ model.config.processor_class = "Wav2Vec2Processor"
585
+
586
+ model.save_pretrained(model_args.model_name_or_path)
587
+
588
+ feature_etxractor = AutoFeatureExtractor.from_pretrained(encoder_id)
589
+ feature_etxractor.save_pretrained(model_args.model_name_or_path)
590
+ tokenizer = AutoTokenizer.from_pretrained(decoder_id)
591
+ tokenizer.save_pretrained(model_args.model_name_or_path)
592
+
593
+ # 3. Next, let's load the config as we might need it to create
594
+ # the tokenizer
595
+ config = AutoConfig.from_pretrained(
596
+ model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
597
+ )
598
+
599
+ if is_text_target:
600
+ # 4. (Optional, for ASR and translation) If no tokenizer file is defined,
601
+ # we create the vocabulary of the model by extracting all unique characters from
602
+ # the training and evaluation datasets
603
+ # We need to make sure that only first rank saves vocabulary
604
+ # make sure all processes wait until vocab is created
605
+ tokenizer_name_or_path = model_args.tokenizer_name_or_path
606
+ tokenizer_kwargs = {}
607
+ if tokenizer_name_or_path is None:
608
+ # save vocab in training output dir
609
+ tokenizer_name_or_path = training_args.output_dir
610
+
611
+ vocab_file = os.path.join(tokenizer_name_or_path, "vocab.json")
612
+
613
+ with training_args.main_process_first():
614
+ if training_args.overwrite_output_dir and os.path.isfile(vocab_file):
615
+ os.remove(vocab_file)
616
+
617
+ with training_args.main_process_first(desc="dataset map vocabulary creation"):
618
+ if not os.path.isfile(vocab_file):
619
+ os.makedirs(tokenizer_name_or_path, exist_ok=True)
620
+ vocab_dict = create_vocabulary_from_data(
621
+ raw_datasets,
622
+ word_delimiter_token=word_delimiter_token,
623
+ unk_token=unk_token,
624
+ pad_token=pad_token,
625
+ )
626
+
627
+ # save vocab dict to be loaded into tokenizer
628
+ with open(vocab_file, "w") as file:
629
+ json.dump(vocab_dict, file)
630
+
631
+ # if tokenizer has just been created
632
+ # it is defined by `tokenizer_class` if present in config else by `model_type`
633
+ if not config.is_encoder_decoder:
634
+ tokenizer_kwargs = {
635
+ "config": config if config.tokenizer_class is not None else None,
636
+ "tokenizer_type": config.model_type if config.tokenizer_class is None else None,
637
+ "unk_token": unk_token,
638
+ "pad_token": pad_token,
639
+ "word_delimiter_token": word_delimiter_token,
640
+ }
641
+ else:
642
+ tokenizer_kwargs = {}
643
+
644
+ # 5. Now we can instantiate the feature extractor, tokenizer and model
645
+ # Note for distributed training, the .from_pretrained methods guarantee that only
646
+ # one local process can concurrently download model & vocab.
647
+
648
+ # load feature_extractor and tokenizer
649
+ if is_text_target:
650
+ tokenizer = AutoTokenizer.from_pretrained(
651
+ tokenizer_name_or_path,
652
+ use_auth_token=data_args.use_auth_token,
653
+ **tokenizer_kwargs,
654
+ )
655
+ feature_extractor = AutoFeatureExtractor.from_pretrained(
656
+ model_args.model_name_or_path, cache_dir=model_args.cache_dir, use_auth_token=data_args.use_auth_token
657
+ )
658
+
659
+ # adapt config
660
+ # (speech translation requires pre-configured seq2seq models)
661
+ if task_name != "covost2":
662
+ config.update(
663
+ {
664
+ "feat_proj_dropout": model_args.feat_proj_dropout,
665
+ "attention_dropout": model_args.attention_dropout,
666
+ "hidden_dropout": model_args.hidden_dropout,
667
+ "final_dropout": model_args.final_dropout,
668
+ "mask_time_prob": model_args.mask_time_prob,
669
+ "mask_time_length": model_args.mask_time_length,
670
+ "mask_feature_prob": model_args.mask_feature_prob,
671
+ "mask_feature_length": model_args.mask_feature_length,
672
+ "gradient_checkpointing": training_args.gradient_checkpointing,
673
+ "layerdrop": model_args.layerdrop,
674
+ "ctc_zero_infinity": model_args.ctc_zero_infinity,
675
+ "ctc_loss_reduction": model_args.ctc_loss_reduction,
676
+ "activation_dropout": model_args.activation_dropout,
677
+ }
678
+ )
679
+ if training_args.do_train:
680
+ if is_text_target:
681
+ config.pad_token_id = tokenizer.pad_token_id
682
+ config.vocab_size = len(tokenizer)
683
+ else:
684
+ label_to_id = {v: i for i, v in enumerate(label_list)}
685
+ config.label2id = label_to_id
686
+ config.id2label = {id: label for label, id in label_to_id.items()}
687
+ config.num_labels = num_labels
688
+ else:
689
+ config.encoder.update({"hidden_dropout": model_args.hidden_dropout})
690
+
691
+ # create model
692
+ if target_column_name == "transcription":
693
+ model = AutoModelForCTC.from_pretrained(
694
+ model_args.model_name_or_path,
695
+ cache_dir=model_args.cache_dir,
696
+ config=config,
697
+ use_auth_token=data_args.use_auth_token,
698
+ )
699
+ elif config.is_encoder_decoder:
700
+ model = AutoModelForSpeechSeq2Seq.from_pretrained(
701
+ model_args.model_name_or_path,
702
+ cache_dir=model_args.cache_dir,
703
+ config=config,
704
+ use_auth_token=data_args.use_auth_token,
705
+ )
706
+ if model.config.decoder_start_token_id is None:
707
+ raise ValueError("Make sure that `config.decoder_start_token_id` is correctly defined")
708
+ else:
709
+ model = AutoModelForAudioClassification.from_pretrained(
710
+ model_args.model_name_or_path,
711
+ cache_dir=model_args.cache_dir,
712
+ config=config,
713
+ use_auth_token=data_args.use_auth_token,
714
+ )
715
+
716
+ # freeze encoder
717
+ if model_args.freeze_feature_encoder:
718
+ model.freeze_feature_encoder()
719
+
720
+ # 6. Now we preprocess the datasets including loading the audio, resampling and normalization
721
+ # Thankfully, `datasets` takes care of automatically loading and resampling the audio,
722
+ # so that we just need to set the correct target sampling rate and normalize the input
723
+ # via the `feature_extractor`
724
+
725
+ # make sure that dataset decodes audio with correct sampling rate
726
+ dataset_sampling_rate = next(iter(raw_datasets.values())).features[data_args.audio_column_name].sampling_rate
727
+ if dataset_sampling_rate != feature_extractor.sampling_rate:
728
+ raw_datasets = raw_datasets.cast_column(
729
+ data_args.audio_column_name, datasets.features.Audio(sampling_rate=feature_extractor.sampling_rate)
730
+ )
731
+
732
+ # derive max & min input length for sample rate & max duration
733
+ max_input_length = data_args.max_duration_in_seconds * feature_extractor.sampling_rate
734
+ min_input_length = data_args.min_duration_in_seconds * feature_extractor.sampling_rate
735
+ audio_column_name = data_args.audio_column_name
736
+
737
+ # `phoneme_language` is only relevant if the model is fine-tuned on phoneme classification
738
+ phoneme_language = data_args.phoneme_language
739
+
740
+ # Preprocessing the datasets.
741
+ # We need to read the audio files as arrays and tokenize the targets.
742
+ def prepare_dataset(batch):
743
+ # load audio
744
+ sample = batch[audio_column_name]
745
+
746
+ inputs = feature_extractor(sample["array"], sampling_rate=sample["sampling_rate"])
747
+ batch["input_values"] = inputs.input_values[0]
748
+ batch["length"] = len(batch["input_values"])
749
+
750
+ # encode targets
751
+ additional_kwargs = {}
752
+ if phoneme_language is not None:
753
+ additional_kwargs["phonemizer_lang"] = phoneme_language
754
+
755
+ if is_text_target:
756
+ batch["labels"] = tokenizer(batch["target_text"], **additional_kwargs).input_ids
757
+ else:
758
+ batch["labels"] = batch[target_column_name]
759
+
760
+ batch["lang"] = batch["lang_id"]
761
+
762
+ return batch
763
+
764
+ with training_args.main_process_first(desc="dataset map preprocessing"):
765
+ vectorized_datasets = raw_datasets.map(
766
+ prepare_dataset,
767
+ remove_columns=next(iter(raw_datasets.values())).column_names,
768
+ num_proc=num_workers,
769
+ desc="preprocess datasets",
770
+ )
771
+
772
+ if training_args.do_train:
773
+
774
+ def is_audio_in_length_range(length):
775
+ return length > min_input_length and length < max_input_length
776
+
777
+ # filter data that is shorter than min_input_length
778
+ vectorized_datasets["train"] = vectorized_datasets["train"].filter(
779
+ is_audio_in_length_range,
780
+ num_proc=num_workers,
781
+ input_columns=["length"],
782
+ )
783
+
784
+ # 7. Next, we can prepare for the training step.
785
+ # Let's use the appropriate XTREME-S evaluation metric,
786
+ # instantiate a data collator and the trainer
787
+
788
+ # Define evaluation metrics during training, *i.e.* word error rate, character error rate
789
+ eval_metric = load_metric("xtreme_s", task_name)
790
+
791
+ # for large datasets it is advised to run the preprocessing on a
792
+ # single machine first with ``args.preprocessing_only`` since there will mostly likely
793
+ # be a timeout when running the script in distributed mode.
794
+ # In a second step ``args.preprocessing_only`` can then be set to `False` to load the
795
+ # cached dataset
796
+ if data_args.preprocessing_only:
797
+ logger.info(f"Data preprocessing finished. Files cached at {vectorized_datasets.cache_files}")
798
+ return
799
+
800
+ def asr_logits_argmax(logits, labels):
801
+ return logits.argmax(dim=-1)
802
+
803
+ def compute_asr_metric(pred):
804
+ pred.label_ids[pred.label_ids == -100] = tokenizer.pad_token_id
805
+
806
+ pred_str = tokenizer.batch_decode(pred.predictions)
807
+ # we do not want to group tokens when computing the metrics
808
+ label_str = tokenizer.batch_decode(pred.label_ids, group_tokens=False)
809
+
810
+ metric = eval_metric.compute(predictions=pred_str, references=label_str)
811
+ return metric
812
+
813
+ def compute_classification_metric(pred):
814
+ pred_ids = np.argmax(pred.predictions, axis=1)
815
+ metric = eval_metric.compute(predictions=pred_ids, references=pred.label_ids)
816
+ return metric
817
+
818
+ # Now save everything to be able to create a single processor later
819
+ if is_main_process(training_args.local_rank):
820
+ # save feature extractor, tokenizer and config
821
+ feature_extractor.save_pretrained(training_args.output_dir)
822
+ if is_text_target:
823
+ tokenizer.save_pretrained(training_args.output_dir)
824
+ config.save_pretrained(training_args.output_dir)
825
+ # wait until configs are saved in the main process before loading the processor
826
+ if training_args.local_rank != -1:
827
+ torch.distributed.barrier()
828
+
829
+ if is_text_target:
830
+ processor = AutoProcessor.from_pretrained(training_args.output_dir)
831
+ else:
832
+ processor = AutoFeatureExtractor.from_pretrained(training_args.output_dir)
833
+
834
+ # Instantiate custom data collator
835
+ data_collator = SpeechDataCollatorWithPadding(processor=processor, pad_labels=is_text_target)
836
+
837
+ # Initialize Trainer
838
+ if target_column_name == "translation":
839
+ trainer = Seq2SeqTrainer(
840
+ model=model,
841
+ data_collator=data_collator,
842
+ args=training_args,
843
+ preprocess_logits_for_metrics=asr_logits_argmax if training_args.predict_with_generate else None,
844
+ compute_metrics=compute_asr_metric if training_args.predict_with_generate else None,
845
+ train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
846
+ eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
847
+ tokenizer=feature_extractor,
848
+ )
849
+ else:
850
+ trainer = Trainer(
851
+ model=model,
852
+ data_collator=data_collator,
853
+ args=training_args,
854
+ preprocess_logits_for_metrics=asr_logits_argmax if is_text_target else None,
855
+ compute_metrics=compute_asr_metric if is_text_target else compute_classification_metric,
856
+ train_dataset=vectorized_datasets["train"] if training_args.do_train else None,
857
+ eval_dataset=vectorized_datasets["eval"] if training_args.do_eval else None,
858
+ tokenizer=feature_extractor,
859
+ )
860
+
861
+ # 8. Finally, we can start training
862
+
863
+ # Training
864
+ if training_args.do_train:
865
+
866
+ # use last checkpoint if exist
867
+ if last_checkpoint is not None:
868
+ checkpoint = last_checkpoint
869
+ elif os.path.isdir(model_args.model_name_or_path):
870
+ checkpoint = model_args.model_name_or_path
871
+ else:
872
+ checkpoint = None
873
+
874
+ train_result = trainer.train(resume_from_checkpoint=checkpoint)
875
+ trainer.save_model()
876
+
877
+ metrics = train_result.metrics
878
+ max_train_samples = (
879
+ data_args.max_train_samples
880
+ if data_args.max_train_samples is not None
881
+ else len(vectorized_datasets["train"])
882
+ )
883
+ metrics["train_samples"] = min(max_train_samples, len(vectorized_datasets["train"]))
884
+
885
+ trainer.log_metrics("train", metrics)
886
+ trainer.save_metrics("train", metrics)
887
+ trainer.save_state()
888
+
889
+ # Evaluation on the test set
890
+ results = {}
891
+ if training_args.do_predict:
892
+ logger.info(f"*** Evaluating on the `{data_args.predict_split_name}` set ***")
893
+ if data_args.per_lang_metrics:
894
+ # separate the `test` dataset into language-specific subsets and compute metrics for each of them
895
+ metrics = {}
896
+ average_metrics = defaultdict(list)
897
+ for lang_id in range(len(lang_list)):
898
+ lang_name = lang_list[lang_id]
899
+ with training_args.main_process_first(desc="per-language dataset filter"):
900
+ lang_dataset = vectorized_datasets["predict"].filter(
901
+ lambda lang: lang == lang_id,
902
+ num_proc=num_workers,
903
+ input_columns=["lang"],
904
+ )
905
+ lang_metrics = trainer.evaluate(lang_dataset)
906
+ redundant_metrics = ["eval_runtime", "eval_samples_per_second", "eval_steps_per_second", "eval_epoch"]
907
+ for metric_name, value in lang_metrics.items():
908
+ average_metrics[metric_name].append(value)
909
+ if metric_name not in redundant_metrics:
910
+ metrics[f"{metric_name}_{lang_name}"] = value
911
+ for metric_name, value in average_metrics.items():
912
+ metrics[metric_name] = np.mean(value)
913
+ else:
914
+ metrics = trainer.evaluate(vectorized_datasets["predict"])
915
+ max_predict_samples = (
916
+ data_args.max_predict_samples
917
+ if data_args.max_predict_samples is not None
918
+ else len(vectorized_datasets["predict"])
919
+ )
920
+ metrics["predict_samples"] = min(max_predict_samples, len(vectorized_datasets["predict"]))
921
+
922
+ # make sure that the `predict` metrics end up in the log history for the model card
923
+ trainer.log(OrderedDict(sorted(metrics.items())))
924
+
925
+ trainer.log_metrics("predict", metrics)
926
+ trainer.save_metrics("predict", metrics)
927
+
928
+ # Write model card and (optionally) push to hub
929
+ kwargs = {
930
+ "finetuned_from": model_args.model_name_or_path,
931
+ "tasks": task_name,
932
+ "tags": [task_name, data_args.dataset_name],
933
+ "dataset_args": f"Config: {config_name}, Training split: {data_args.train_split_name}, Eval split: {data_args.eval_split_name}, Predict split: {data_args.predict_split_name}",
934
+ "dataset": f"{data_args.dataset_name.upper()} - {config_name.upper()}",
935
+ "language": data_args.language,
936
+ }
937
+
938
+ if training_args.push_to_hub:
939
+ trainer.push_to_hub(**kwargs)
940
+ else:
941
+ trainer.create_model_card(**kwargs)
942
+
943
+ return results
944
+
945
+
946
+ if __name__ == "__main__":
947
+ main()
948
+
runs/May03_17-16-03_sanchit--v100/1651598448.3713684/events.out.tfevents.1651598448.sanchit--v100.42221.1 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea167348a68dc064903b7a4500be8967f52e37932e357739fc5e86418ffd5fde
3
+ size 5184
runs/May03_17-16-03_sanchit--v100/events.out.tfevents.1651598448.sanchit--v100.42221.0 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dff672b4cd76795691566537e009fdc3f176349f08439c6863a345fed62d8a29
3
+ size 88290
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
sweep.yaml ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ command:
2
+ - python3
3
+ - ${program}
4
+ - --overwrite_output_dir
5
+ - --freeze_feature_encoder
6
+ - --gradient_checkpointing
7
+ - --predict_with_generate
8
+ - --fp16
9
+ - --group_by_length
10
+ - --do_train
11
+ - --do_eval
12
+ - --load_best_model_at_end
13
+ - --push_to_hub
14
+ - --use_auth_token
15
+ - ${args}
16
+ method: random
17
+ metric:
18
+ goal: maximize
19
+ name: eval/bleu
20
+ parameters:
21
+ model_name_or_path:
22
+ value: ./
23
+ task:
24
+ value: covost2
25
+ language:
26
+ value: fr.en
27
+ eval_split_name:
28
+ value: test
29
+ output_dir:
30
+ value: ./output_dir
31
+ num_train_epochs:
32
+ value: 3
33
+ per_device_train_batch_size:
34
+ value: 4
35
+ per_device_eval_batch_size:
36
+ value: 4
37
+ gradient_accumulation_steps:
38
+ value: 8
39
+ generation_max_length:
40
+ value: 40
41
+ generation_num_beams:
42
+ value: 1
43
+ learning_rate:
44
+ distribution: log_uniform
45
+ max: -6.9
46
+ min: -9.2
47
+ hidden_dropout:
48
+ distribution: log_uniform
49
+ max: -1.6
50
+ min: -3.4
51
+ warmup_steps:
52
+ value: 500
53
+ evaluation_strategy:
54
+ value: steps
55
+ max_duration_in_seconds:
56
+ value: 20
57
+ save_steps:
58
+ value: 500
59
+ eval_steps:
60
+ value: 500
61
+ logging_steps:
62
+ value: 1
63
+ metric_for_best_model:
64
+ value: bleu
65
+ greater_is_better:
66
+ value: True
67
+ program: run_xtreme_s.py
68
+ project: xtreme_s_xlsr_2_bart_covost2_fr_en
69
+
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"errors": "replace", "bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": "<mask>", "add_prefix_space": false, "trim_offsets": true, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "./", "tokenizer_class": "BartTokenizer"}
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c92db708d094fc9c984268e3892bb61b788af2f22d46c8a70029d68f2645d771
3
+ size 3247
vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
wandb/debug-internal.log ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220503_172048-zotxt8wa/logs/debug-internal.log
wandb/debug.log ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220503_172048-zotxt8wa/logs/debug.log
wandb/latest-run ADDED
@@ -0,0 +1 @@
 
 
1
+ run-20220503_172048-zotxt8wa
wandb/run-20220503_172048-zotxt8wa/files/config.yaml ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220503_172048-zotxt8wa/files/output.log ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220503_172048-zotxt8wa/files/requirements.txt ADDED
@@ -0,0 +1,287 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ absl-py==1.0.0
2
+ aiohttp==3.8.1
3
+ aiosignal==1.2.0
4
+ alembic==1.7.7
5
+ anyio==3.5.0
6
+ appdirs==1.4.4
7
+ apscheduler==3.9.1
8
+ argon2-cffi-bindings==21.2.0
9
+ argon2-cffi==21.3.0
10
+ arrow==1.2.2
11
+ asttokens==2.0.5
12
+ astunparse==1.6.3
13
+ async-timeout==4.0.2
14
+ attrs==21.4.0
15
+ audioread==2.1.9
16
+ autopage==0.5.0
17
+ babel==2.9.1
18
+ backcall==0.2.0
19
+ backoff==1.11.1
20
+ binaryornot==0.4.4
21
+ bitsandbytes-cuda113==0.26.0
22
+ black==22.1.0
23
+ bleach==4.1.0
24
+ boto3==1.16.34
25
+ botocore==1.19.63
26
+ brotli==1.0.9
27
+ cachetools==5.0.0
28
+ certifi==2021.10.8
29
+ cffi==1.15.0
30
+ chardet==4.0.0
31
+ charset-normalizer==2.0.11
32
+ chex==0.1.0
33
+ click==8.0.3
34
+ cliff==3.10.1
35
+ clldutils==3.10.1
36
+ cmaes==0.8.2
37
+ cmd2==2.4.0
38
+ codecarbon==1.2.0
39
+ colorlog==6.6.0
40
+ cookiecutter==1.7.3
41
+ cryptography==36.0.2
42
+ csvw==1.11.0
43
+ cycler==0.11.0
44
+ dash-bootstrap-components==1.1.0
45
+ dash-core-components==2.0.0
46
+ dash-html-components==2.0.0
47
+ dash-table==5.0.0
48
+ dash==2.3.1
49
+ datasets==2.1.1.dev0
50
+ debugpy==1.5.1
51
+ decorator==5.1.1
52
+ defusedxml==0.7.1
53
+ deprecated==1.2.13
54
+ dill==0.3.4
55
+ dlinfo==1.2.1
56
+ dm-tree==0.1.6
57
+ docker-pycreds==0.4.0
58
+ docker==4.4.4
59
+ entrypoints==0.4
60
+ execnet==1.9.0
61
+ executing==0.8.2
62
+ faiss-cpu==1.7.2
63
+ filelock==3.4.2
64
+ fire==0.4.0
65
+ flake8==4.0.1
66
+ flask-compress==1.11
67
+ flask==2.1.1
68
+ flatbuffers==1.12
69
+ flax==0.4.0
70
+ fonttools==4.29.1
71
+ frozenlist==1.3.0
72
+ fsspec==2022.1.0
73
+ fugashi==1.1.2
74
+ gast==0.5.3
75
+ gitdb==4.0.9
76
+ gitpython==3.1.18
77
+ google-auth-oauthlib==0.4.6
78
+ google-auth==2.6.0
79
+ google-pasta==0.2.0
80
+ greenlet==1.1.2
81
+ grpcio==1.43.0
82
+ h5py==3.6.0
83
+ hf-doc-builder==0.2.0
84
+ huggingface-hub==0.4.0
85
+ hypothesis==6.36.1
86
+ idna==3.3
87
+ importlib-metadata==4.10.1
88
+ iniconfig==1.1.1
89
+ ipadic==1.0.0
90
+ ipdb==0.13.9
91
+ ipykernel==6.8.0
92
+ ipython-genutils==0.2.0
93
+ ipython==8.0.1
94
+ ipywidgets==7.6.5
95
+ isodate==0.6.1
96
+ isort==5.10.1
97
+ itsdangerous==2.1.2
98
+ jax==0.2.28
99
+ jaxlib==0.1.76+cuda11.cudnn82
100
+ jedi==0.18.1
101
+ jinja2-time==0.2.0
102
+ jinja2==3.0.3
103
+ jiwer==2.3.0
104
+ jmespath==0.10.0
105
+ joblib==1.1.0
106
+ json5==0.9.6
107
+ jsonschema==4.4.0
108
+ jupyter-client==7.1.2
109
+ jupyter-console==6.4.0
110
+ jupyter-core==4.9.1
111
+ jupyter-server==1.13.5
112
+ jupyter==1.0.0
113
+ jupyterlab-pygments==0.1.2
114
+ jupyterlab-server==2.10.3
115
+ jupyterlab-widgets==1.0.2
116
+ jupyterlab==3.2.9
117
+ keras-preprocessing==1.1.2
118
+ keras==2.8.0
119
+ kiwisolver==1.3.2
120
+ kubernetes==12.0.1
121
+ libclang==13.0.0
122
+ librosa==0.8.1
123
+ llvmlite==0.38.0
124
+ mako==1.2.0
125
+ markdown==3.3.6
126
+ markupsafe==2.0.1
127
+ matplotlib-inline==0.1.3
128
+ matplotlib==3.5.1
129
+ mccabe==0.6.1
130
+ mistune==0.8.4
131
+ msgpack==1.0.3
132
+ multidict==6.0.2
133
+ multiprocess==0.70.12.2
134
+ mypy-extensions==0.4.3
135
+ nbclassic==0.3.5
136
+ nbclient==0.5.10
137
+ nbconvert==6.4.1
138
+ nbformat==5.1.3
139
+ nest-asyncio==1.5.4
140
+ nltk==3.7
141
+ notebook==6.4.8
142
+ numba==0.55.1
143
+ numpy==1.21.5
144
+ oauthlib==3.2.0
145
+ onnx==1.11.0
146
+ onnxconverter-common==1.9.0
147
+ opt-einsum==3.3.0
148
+ optax==0.1.0
149
+ optuna==2.10.0
150
+ packaging==21.3
151
+ pandas==1.4.0
152
+ pandocfilters==1.5.0
153
+ parameterized==0.8.1
154
+ parso==0.8.3
155
+ pathspec==0.9.0
156
+ pathtools==0.1.2
157
+ pbr==5.8.1
158
+ pexpect==4.8.0
159
+ phonemizer==3.0.1
160
+ pickleshare==0.7.5
161
+ pillow==9.0.0
162
+ pint==0.16.1
163
+ pip==22.0.2
164
+ pkg-resources==0.0.0
165
+ plac==1.3.5
166
+ platformdirs==2.4.1
167
+ plotly==5.6.0
168
+ pluggy==1.0.0
169
+ pooch==1.6.0
170
+ portalocker==2.0.0
171
+ poyo==0.5.0
172
+ prettytable==3.2.0
173
+ prometheus-client==0.13.1
174
+ promise==2.3
175
+ prompt-toolkit==3.0.26
176
+ protobuf==3.19.4
177
+ psutil==5.9.0
178
+ ptyprocess==0.7.0
179
+ pure-eval==0.2.2
180
+ py-cpuinfo==8.0.0
181
+ py==1.11.0
182
+ pyarrow==6.0.1
183
+ pyasn1-modules==0.2.8
184
+ pyasn1==0.4.8
185
+ pycodestyle==2.8.0
186
+ pycparser==2.21
187
+ pyctcdecode==0.3.0
188
+ pyflakes==2.4.0
189
+ pygments==2.11.2
190
+ pygtrie==2.4.2
191
+ pynvml==11.4.1
192
+ pyopenssl==22.0.0
193
+ pyparsing==3.0.7
194
+ pyperclip==1.8.2
195
+ pypng==0.0.21
196
+ pyrsistent==0.18.1
197
+ pytest-forked==1.4.0
198
+ pytest-timeout==2.1.0
199
+ pytest-xdist==2.5.0
200
+ pytest==7.1.1
201
+ python-dateutil==2.8.2
202
+ python-levenshtein==0.12.2
203
+ python-slugify==6.1.1
204
+ pytz-deprecation-shim==0.1.0.post0
205
+ pytz==2021.3
206
+ pyyaml==5.4.1
207
+ pyzmq==22.3.0
208
+ qtconsole==5.2.2
209
+ qtpy==2.0.1
210
+ ray==1.11.0
211
+ redis==4.2.2
212
+ regex==2022.1.18
213
+ requests-oauthlib==1.3.1
214
+ requests==2.27.1
215
+ resampy==0.2.2
216
+ responses==0.18.0
217
+ rfc3986==2.0.0
218
+ rouge-score==0.0.4
219
+ rsa==4.8
220
+ s3transfer==0.3.7
221
+ sacrebleu==1.5.1
222
+ sacremoses==0.0.47
223
+ scikit-learn==1.0.2
224
+ scipy==1.7.3
225
+ segments==2.2.0
226
+ send2trash==1.8.0
227
+ sentencepiece==0.1.96
228
+ sentry-sdk==1.5.6
229
+ setuptools==44.1.1
230
+ shortuuid==1.0.8
231
+ sigopt==8.3.0
232
+ six==1.16.0
233
+ smmap==5.0.0
234
+ sniffio==1.2.0
235
+ sortedcontainers==2.4.0
236
+ soundfile==0.10.3.post1
237
+ sqlalchemy==1.4.34
238
+ stack-data==0.1.4
239
+ stevedore==3.5.0
240
+ tabulate==0.8.9
241
+ tenacity==8.0.1
242
+ tensorboard-data-server==0.6.1
243
+ tensorboard-plugin-wit==1.8.1
244
+ tensorboard==2.8.0
245
+ tensorboardx==2.5
246
+ tensorflow-io-gcs-filesystem==0.24.0
247
+ tensorflow==2.8.0
248
+ termcolor==1.1.0
249
+ terminado==0.13.1
250
+ testpath==0.5.0
251
+ text-unidecode==1.3
252
+ tf-estimator-nightly==2.8.0.dev2021122109
253
+ tf2onnx==1.9.3
254
+ threadpoolctl==3.1.0
255
+ timeout-decorator==0.5.0
256
+ timm==0.5.4
257
+ tokenizers==0.11.4
258
+ toml==0.10.2
259
+ tomli==2.0.0
260
+ toolz==0.11.2
261
+ torch==1.10.2+cu113
262
+ torchaudio==0.10.2+cu113
263
+ torchvision==0.11.3
264
+ tornado==6.1
265
+ tqdm==4.62.3
266
+ traitlets==5.1.1
267
+ transformers==4.18.0.dev0
268
+ typing-extensions==3.10.0.2
269
+ tzdata==2022.1
270
+ tzlocal==4.2
271
+ unidic-lite==1.0.8
272
+ unidic==1.1.0
273
+ uritemplate==4.1.1
274
+ urllib3==1.26.8
275
+ wandb==0.12.10
276
+ wasabi==0.9.1
277
+ wcwidth==0.2.5
278
+ webencodings==0.5.1
279
+ websocket-client==1.2.3
280
+ werkzeug==2.0.2
281
+ wheel==0.37.1
282
+ widgetsnbextension==3.5.2
283
+ wrapt==1.14.0
284
+ xxhash==2.0.2
285
+ yarl==1.7.2
286
+ yaspin==2.1.0
287
+ zipp==3.7.0
wandb/run-20220503_172048-zotxt8wa/files/wandb-metadata.json ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "os": "Linux-5.11.0-1028-gcp-x86_64-with-glibc2.33",
3
+ "python": "3.9.5",
4
+ "heartbeatAt": "2022-05-03T17:20:52.153839",
5
+ "startedAt": "2022-05-03T17:20:48.627760",
6
+ "docker": null,
7
+ "gpu": "Tesla V100-SXM2-16GB",
8
+ "gpu_count": 2,
9
+ "cpu_count": 16,
10
+ "cuda": null,
11
+ "args": [
12
+ "--overwrite_output_dir",
13
+ "--freeze_feature_encoder",
14
+ "--gradient_checkpointing",
15
+ "--predict_with_generate",
16
+ "--fp16",
17
+ "--group_by_length",
18
+ "--do_train",
19
+ "--do_eval",
20
+ "--load_best_model_at_end",
21
+ "--push_to_hub",
22
+ "--use_auth_token",
23
+ "--eval_split_name=test",
24
+ "--eval_steps=500",
25
+ "--evaluation_strategy=steps",
26
+ "--generation_max_length=40",
27
+ "--generation_num_beams=1",
28
+ "--gradient_accumulation_steps=8",
29
+ "--greater_is_better=True",
30
+ "--hidden_dropout=0.1742341660721257",
31
+ "--language=fr.en",
32
+ "--learning_rate=0.00035649266341974674",
33
+ "--logging_steps=1",
34
+ "--max_duration_in_seconds=20",
35
+ "--metric_for_best_model=bleu",
36
+ "--model_name_or_path=./",
37
+ "--num_train_epochs=3",
38
+ "--output_dir=./",
39
+ "--per_device_eval_batch_size=4",
40
+ "--per_device_train_batch_size=4",
41
+ "--save_steps=500",
42
+ "--task=covost2",
43
+ "--warmup_steps=500"
44
+ ],
45
+ "state": "running",
46
+ "program": "/home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2/run_xtreme_s.py",
47
+ "codePath": "run_xtreme_s.py",
48
+ "git": {
49
+ "remote": "https://huggingface.co/sanchit-gandhi/xtreme_s_xlsr_2_bart_covost2_fr_en_2",
50
+ "commit": "4a1e53efb07a7f21a4565c7cde36af76fa2f74ac"
51
+ },
52
+ "email": "sanchit@huggingface.co",
53
+ "root": "/home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2",
54
+ "host": "sanchit--v100",
55
+ "username": "sanchit_huggingface_co",
56
+ "executable": "/home/sanchit_huggingface_co/gcp/bin/python3"
57
+ }
wandb/run-20220503_172048-zotxt8wa/files/wandb-summary.json ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220503_172048-zotxt8wa/logs/debug-internal.log ADDED
The diff for this file is too large to render. See raw diff
 
wandb/run-20220503_172048-zotxt8wa/logs/debug.log ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_setup.py:_flush():75] Loading settings from /home/sanchit_huggingface_co/.config/wandb/settings
2
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_setup.py:_flush():75] Loading settings from wandb/settings
3
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_setup.py:_flush():75] Loading settings from environment variables: {'entity': 'sanchit-gandhi', 'project': 'xtreme_s_xlsr_2_bart_covost2_fr_en', 'sweep_id': '39ci3gkf', 'root_dir': '/home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2', 'run_id': 'zotxt8wa', 'sweep_param_path': '/home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2/wandb/sweep-39ci3gkf/config-zotxt8wa.yaml'}
4
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_setup.py:_flush():75] Inferring run settings from compute environment: {'program_relpath': 'run_xtreme_s.py', 'program': '/home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2/run_xtreme_s.py'}
5
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_init.py:_log_setup():386] Logging user logs to /home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2/wandb/run-20220503_172048-zotxt8wa/logs/debug.log
6
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_init.py:_log_setup():387] Logging internal logs to /home/sanchit_huggingface_co/xtreme_s_xlsr_2_bart_covost2_fr_en_2/wandb/run-20220503_172048-zotxt8wa/logs/debug-internal.log
7
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_init.py:init():420] calling init triggers
8
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_init.py:init():425] wandb.init called with sweep_config: {'eval_split_name': 'test', 'eval_steps': 500, 'evaluation_strategy': 'steps', 'generation_max_length': 40, 'generation_num_beams': 1, 'gradient_accumulation_steps': 8, 'greater_is_better': True, 'hidden_dropout': 0.1742341660721257, 'language': 'fr.en', 'learning_rate': 0.00035649266341974674, 'logging_steps': 1, 'max_duration_in_seconds': 20, 'metric_for_best_model': 'bleu', 'model_name_or_path': './', 'num_train_epochs': 3, 'output_dir': './', 'per_device_eval_batch_size': 4, 'per_device_train_batch_size': 4, 'save_steps': 500, 'task': 'covost2', 'warmup_steps': 500}
9
+ config: {}
10
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [wandb_init.py:init():471] starting backend
11
+ 2022-05-03 17:20:48,630 INFO MainThread:42221 [backend.py:_multiprocessing_setup():99] multiprocessing start_methods=fork,spawn,forkserver, using: spawn
12
+ 2022-05-03 17:20:48,711 INFO MainThread:42221 [backend.py:ensure_launched():219] starting backend process...
13
+ 2022-05-03 17:20:48,796 INFO MainThread:42221 [backend.py:ensure_launched():224] started backend process with pid: 42489
14
+ 2022-05-03 17:20:48,798 INFO MainThread:42221 [wandb_init.py:init():480] backend started and connected
15
+ 2022-05-03 17:20:48,801 INFO MainThread:42221 [wandb_run.py:_config_callback():966] config_cb None None {'eval_split_name': 'test', 'eval_steps': 500, 'evaluation_strategy': 'steps', 'generation_max_length': 40, 'generation_num_beams': 1, 'gradient_accumulation_steps': 8, 'greater_is_better': True, 'hidden_dropout': 0.1742341660721257, 'language': 'fr.en', 'learning_rate': 0.00035649266341974674, 'logging_steps': 1, 'max_duration_in_seconds': 20, 'metric_for_best_model': 'bleu', 'model_name_or_path': './', 'num_train_epochs': 3, 'output_dir': './', 'per_device_eval_batch_size': 4, 'per_device_train_batch_size': 4, 'save_steps': 500, 'task': 'covost2', 'warmup_steps': 500}
16
+ 2022-05-03 17:20:48,815 INFO MainThread:42221 [wandb_init.py:init():550] updated telemetry
17
+ 2022-05-03 17:20:48,995 INFO MainThread:42221 [wandb_init.py:init():581] communicating current version
18
+ 2022-05-03 17:20:49,748 INFO MainThread:42221 [wandb_init.py:init():586] got version response upgrade_message: "wandb version 0.12.16 is available! To upgrade, please run:\n $ pip install wandb --upgrade"
19
+
20
+ 2022-05-03 17:20:49,748 INFO MainThread:42221 [wandb_init.py:init():596] communicating run to backend with 30 second timeout
21
+ 2022-05-03 17:20:49,841 INFO MainThread:42221 [wandb_init.py:init():624] starting run threads in backend
22
+ 2022-05-03 17:20:52,204 INFO MainThread:42221 [wandb_run.py:_console_start():1827] atexit reg
23
+ 2022-05-03 17:20:52,204 INFO MainThread:42221 [wandb_run.py:_redirect():1701] redirect: SettingsConsole.REDIRECT
24
+ 2022-05-03 17:20:52,205 INFO MainThread:42221 [wandb_run.py:_redirect():1706] Redirecting console.
25
+ 2022-05-03 17:20:52,206 INFO MainThread:42221 [wandb_run.py:_redirect():1762] Redirects installed.
26
+ 2022-05-03 17:20:52,207 INFO MainThread:42221 [wandb_init.py:init():651] run started, returning control to user process
27
+ 2022-05-03 17:20:52,210 INFO MainThread:42221 [wandb_run.py:_config_callback():966] config_cb None None {'return_dict': True, 'output_hidden_states': False, 'output_attentions': False, 'torchscript': False, 'torch_dtype': 'torch.float32', 'use_bfloat16': False, 'pruned_heads': {}, 'tie_word_embeddings': False, 'is_encoder_decoder': True, 'is_decoder': False, 'cross_attention_hidden_size': None, 'add_cross_attention': False, 'tie_encoder_decoder': False, 'max_length': 40, '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, 'typical_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, 'exponential_decay_length_penalty': None, 'architectures': ['SpeechEncoderDecoderModel'], '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': None, 'pad_token_id': 1, 'eos_token_id': 2, 'sep_token_id': None, 'decoder_start_token_id': 0, 'task_specific_params': None, 'problem_type': None, '_name_or_path': './', 'transformers_version': None, 'decoder': {'vocab_size': 50265, 'max_position_embeddings': 1024, 'd_model': 1024, 'encoder_ffn_dim': 4096, 'encoder_layers': 12, 'encoder_attention_heads': 16, 'decoder_ffn_dim': 4096, 'decoder_layers': 12, 'decoder_attention_heads': 16, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.1, 'activation_function': 'gelu', 'init_std': 0.02, 'encoder_layerdrop': 0.0, 'decoder_layerdrop': 0.0, 'classifier_dropout': 0.0, 'use_cache': True, 'num_hidden_layers': 12, 'scale_embedding': False, 'return_dict': True, 'output_hidden_states': False, 'output_attentions': False, 'torchscript': False, 'torch_dtype': None, 'use_bfloat16': False, 'pruned_heads': {}, 'tie_word_embeddings': True, 'is_encoder_decoder': False, 'is_decoder': True, 'cross_attention_hidden_size': None, 'add_cross_attention': True, 'tie_encoder_decoder': False, 'max_length': 20, 'min_length': 0, 'do_sample': False, 'early_stopping': True, 'num_beams': 4, 'num_beam_groups': 1, 'diversity_penalty': 0.0, 'temperature': 1.0, 'top_k': 50, 'top_p': 1.0, 'typical_p': 1.0, 'repetition_penalty': 1.0, 'length_penalty': 1.0, 'no_repeat_ngram_size': 3, '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': 0, 'forced_eos_token_id': 2, 'remove_invalid_values': False, 'exponential_decay_length_penalty': None, 'architectures': ['BartModel'], 'finetuning_task': None, 'id2label': {0: 'LABEL_0', 1: 'LABEL_1', 2: 'LABEL_2'}, 'label2id': {'LABEL_0': 0, 'LABEL_1': 1, 'LABEL_2': 2}, 'tokenizer_class': None, 'prefix': None, 'bos_token_id': 0, 'pad_token_id': 1, 'eos_token_id': 2, 'sep_token_id': None, 'decoder_start_token_id': 2, 'task_specific_params': {'summarization': {'length_penalty': 1.0, 'max_length': 128, 'min_length': 12, 'num_beams': 4}, 'summarization_cnn': {'length_penalty': 2.0, 'max_length': 142, 'min_length': 56, 'num_beams': 4}, 'summarization_xsum': {'length_penalty': 1.0, 'max_length': 62, 'min_length': 11, 'num_beams': 6}}, 'problem_type': None, '_name_or_path': 'facebook/bart-large', 'transformers_version': '4.19.0.dev0', 'add_bias_logits': False, 'add_final_layer_norm': False, 'classif_dropout': 0.1, 'gradient_checkpointing': False, 'normalize_before': False, 'model_type': 'bart'}, 'encoder': {'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, 'typical_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, 'exponential_decay_length_penalty': None, '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': 0, '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.19.0.dev0', 'feat_extract_dropout': 0.0, 'gradient_checkpointing': False, '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.1742341660721257, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'feat_proj_dropout': 0.0, 'final_dropout': 0.0, 'layerdrop': 0.0, 'layer_norm_eps': 1e-05, 'initializer_range': 0.02, 'vocab_size': 32, 'do_stable_layer_norm': True, 'use_weighted_layer_sum': False, 'apply_spec_augment': True, 'mask_time_prob': 0.1, 'mask_time_length': 10, 'mask_time_min_masks': 2, 'mask_feature_prob': 0.0, 'mask_feature_length': 10, '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': 'sum', 'ctc_zero_infinity': False, 'add_adapter': True, '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, 'model_type': 'wav2vec2'}, 'model_type': 'speech-encoder-decoder', 'processor_class': 'Wav2Vec2Processor', 'use_cache': False, 'overwrite_output_dir': True, 'do_train': True, 'do_eval': True, 'do_predict': False, 'prediction_loss_only': False, 'per_gpu_train_batch_size': 'None', 'per_gpu_eval_batch_size': 'None', 'eval_accumulation_steps': 'None', 'eval_delay': 0, 'weight_decay': 0.0, 'adam_beta1': 0.9, 'adam_beta2': 0.999, 'adam_epsilon': 1e-08, 'max_grad_norm': 1.0, 'max_steps': -1, 'lr_scheduler_type': 'linear', 'warmup_ratio': 0.0, 'log_level': -1, 'log_level_replica': -1, 'log_on_each_node': True, 'logging_dir': './runs/May03_17-16-03_sanchit--v100', 'logging_strategy': 'steps', 'logging_first_step': False, 'logging_nan_inf_filter': True, 'save_strategy': 'steps', 'save_total_limit': 'None', 'save_on_each_node': False, 'no_cuda': False, 'seed': 42, 'data_seed': 'None', '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, 'dataloader_num_workers': 0, 'past_index': -1, 'run_name': './', 'disable_tqdm': False, 'remove_unused_columns': True, 'label_names': 'None', 'load_best_model_at_end': True, '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': 'length', 'report_to': "['tensorboard', 'wandb', 'codecarbon']", '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': 'None', 'hub_strategy': 'every_save', 'hub_token': '<HUB_TOKEN>', 'hub_private_repo': False, 'gradient_checkpointing': True, 'include_inputs_for_metrics': False, 'fp16_backend': 'auto', 'push_to_hub_model_id': 'None', 'push_to_hub_organization': 'None', 'push_to_hub_token': '<PUSH_TO_HUB_TOKEN>', '_n_gpu': 1, 'mp_parameters': '', 'sortish_sampler': False, 'predict_with_generate': True, 'train_batch_size': 4, 'eval_batch_size': 4}
28
+ 2022-05-03 17:20:52,212 INFO MainThread:42221 [wandb_watch.py:watch():43] Watching
wandb/run-20220503_172048-zotxt8wa/run-zotxt8wa.wandb ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:39ee857ff7ba287756a4142fe8d7fb3049c8e0b476904588a4d85b1d51778a2b
3
+ size 53675652
wandb/sweep-39ci3gkf/config-zotxt8wa.yaml ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ wandb_version: 1
2
+
3
+ eval_split_name:
4
+ value: test
5
+ eval_steps:
6
+ value: 500
7
+ evaluation_strategy:
8
+ value: steps
9
+ generation_max_length:
10
+ value: 40
11
+ generation_num_beams:
12
+ value: 1
13
+ gradient_accumulation_steps:
14
+ value: 8
15
+ greater_is_better:
16
+ value: true
17
+ hidden_dropout:
18
+ value: 0.1742341660721257
19
+ language:
20
+ value: fr.en
21
+ learning_rate:
22
+ value: 0.00035649266341974674
23
+ logging_steps:
24
+ value: 1
25
+ max_duration_in_seconds:
26
+ value: 20
27
+ metric_for_best_model:
28
+ value: bleu
29
+ model_name_or_path:
30
+ value: ./
31
+ num_train_epochs:
32
+ value: 3
33
+ output_dir:
34
+ value: ./
35
+ per_device_eval_batch_size:
36
+ value: 4
37
+ per_device_train_batch_size:
38
+ value: 4
39
+ save_steps:
40
+ value: 500
41
+ task:
42
+ value: covost2
43
+ warmup_steps:
44
+ value: 500