Model save
Browse files- config.json +37 -26
- preprocessor_config.json +2 -2
- pytorch_model.bin +2 -2
- run-test.shs +25 -0
- run.sh +16 -12
- special_tokens_map.json +1 -1
- training_args.bin +1 -1
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"activation_dropout": 0.0,
|
| 4 |
"adapter_kernel_size": 3,
|
| 5 |
"adapter_stride": 2,
|
|
@@ -11,23 +11,35 @@
|
|
| 11 |
"attention_dropout": 0.0,
|
| 12 |
"bos_token_id": 1,
|
| 13 |
"classifier_proj_size": 256,
|
| 14 |
-
"codevector_dim":
|
| 15 |
"contrastive_logits_temperature": 0.1,
|
| 16 |
-
"conv_bias":
|
| 17 |
"conv_dim": [
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
],
|
| 22 |
"conv_kernel": [
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
],
|
| 27 |
"conv_stride": [
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
],
|
| 32 |
"ctc_loss_reduction": "mean",
|
| 33 |
"ctc_zero_infinity": false,
|
|
@@ -42,31 +54,30 @@
|
|
| 42 |
"final_dropout": 0.0,
|
| 43 |
"hidden_act": "gelu",
|
| 44 |
"hidden_dropout": 0.0,
|
| 45 |
-
"
|
| 46 |
-
"hidden_size": 16,
|
| 47 |
"initializer_range": 0.02,
|
| 48 |
-
"intermediate_size":
|
| 49 |
"layer_norm_eps": 1e-05,
|
| 50 |
"layerdrop": 0.0,
|
| 51 |
-
"mask_feature_length":
|
| 52 |
"mask_feature_min_masks": 0,
|
| 53 |
-
"mask_feature_prob": 0.
|
| 54 |
"mask_time_length": 10,
|
| 55 |
"mask_time_min_masks": 2,
|
| 56 |
-
"mask_time_prob": 0.
|
| 57 |
"model_type": "wav2vec2",
|
| 58 |
"num_adapter_layers": 3,
|
| 59 |
-
"num_attention_heads":
|
| 60 |
"num_codevector_groups": 2,
|
| 61 |
"num_codevectors_per_group": 320,
|
| 62 |
-
"num_conv_pos_embedding_groups":
|
| 63 |
-
"num_conv_pos_embeddings":
|
| 64 |
-
"num_feat_extract_layers":
|
| 65 |
-
"num_hidden_layers":
|
| 66 |
-
"num_negatives":
|
| 67 |
-
"output_hidden_size":
|
| 68 |
"pad_token_id": 38,
|
| 69 |
-
"proj_codevector_dim":
|
| 70 |
"tdnn_dilation": [
|
| 71 |
1,
|
| 72 |
2,
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "facebook/wav2vec2-xls-r-300m",
|
| 3 |
"activation_dropout": 0.0,
|
| 4 |
"adapter_kernel_size": 3,
|
| 5 |
"adapter_stride": 2,
|
|
|
|
| 11 |
"attention_dropout": 0.0,
|
| 12 |
"bos_token_id": 1,
|
| 13 |
"classifier_proj_size": 256,
|
| 14 |
+
"codevector_dim": 768,
|
| 15 |
"contrastive_logits_temperature": 0.1,
|
| 16 |
+
"conv_bias": true,
|
| 17 |
"conv_dim": [
|
| 18 |
+
512,
|
| 19 |
+
512,
|
| 20 |
+
512,
|
| 21 |
+
512,
|
| 22 |
+
512,
|
| 23 |
+
512,
|
| 24 |
+
512
|
| 25 |
],
|
| 26 |
"conv_kernel": [
|
| 27 |
+
10,
|
| 28 |
+
3,
|
| 29 |
+
3,
|
| 30 |
+
3,
|
| 31 |
+
3,
|
| 32 |
+
2,
|
| 33 |
+
2
|
| 34 |
],
|
| 35 |
"conv_stride": [
|
| 36 |
+
5,
|
| 37 |
+
2,
|
| 38 |
+
2,
|
| 39 |
+
2,
|
| 40 |
+
2,
|
| 41 |
+
2,
|
| 42 |
+
2
|
| 43 |
],
|
| 44 |
"ctc_loss_reduction": "mean",
|
| 45 |
"ctc_zero_infinity": false,
|
|
|
|
| 54 |
"final_dropout": 0.0,
|
| 55 |
"hidden_act": "gelu",
|
| 56 |
"hidden_dropout": 0.0,
|
| 57 |
+
"hidden_size": 1024,
|
|
|
|
| 58 |
"initializer_range": 0.02,
|
| 59 |
+
"intermediate_size": 4096,
|
| 60 |
"layer_norm_eps": 1e-05,
|
| 61 |
"layerdrop": 0.0,
|
| 62 |
+
"mask_feature_length": 64,
|
| 63 |
"mask_feature_min_masks": 0,
|
| 64 |
+
"mask_feature_prob": 0.1,
|
| 65 |
"mask_time_length": 10,
|
| 66 |
"mask_time_min_masks": 2,
|
| 67 |
+
"mask_time_prob": 0.3,
|
| 68 |
"model_type": "wav2vec2",
|
| 69 |
"num_adapter_layers": 3,
|
| 70 |
+
"num_attention_heads": 16,
|
| 71 |
"num_codevector_groups": 2,
|
| 72 |
"num_codevectors_per_group": 320,
|
| 73 |
+
"num_conv_pos_embedding_groups": 16,
|
| 74 |
+
"num_conv_pos_embeddings": 128,
|
| 75 |
+
"num_feat_extract_layers": 7,
|
| 76 |
+
"num_hidden_layers": 24,
|
| 77 |
+
"num_negatives": 100,
|
| 78 |
+
"output_hidden_size": 1024,
|
| 79 |
"pad_token_id": 38,
|
| 80 |
+
"proj_codevector_dim": 768,
|
| 81 |
"tdnn_dilation": [
|
| 82 |
1,
|
| 83 |
2,
|
preprocessor_config.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"feature_extractor_type": "Wav2Vec2FeatureExtractor",
|
| 4 |
"feature_size": 1,
|
| 5 |
"padding_side": "right",
|
| 6 |
-
"padding_value": 0
|
| 7 |
-
"return_attention_mask":
|
| 8 |
"sampling_rate": 16000
|
| 9 |
}
|
|
|
|
| 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
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc548f439611bd98eab1f2cbb578ef3fd4344acf3ed24a78ee45778dbdd9db60
|
| 3 |
+
size 1262091761
|
run-test.shs
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
python run_speech_recognition_ctc.py \
|
| 2 |
+
--dataset_name="common_voice" \
|
| 3 |
+
--model_name_or_path="hf-test/xls-r-dummy" \
|
| 4 |
+
--dataset_config_name="tr" \
|
| 5 |
+
--output_dir="./" \
|
| 6 |
+
--overwrite_output_dir \
|
| 7 |
+
--num_train_epochs="5" \
|
| 8 |
+
--per_device_train_batch_size="16" \
|
| 9 |
+
--gradient_accumulation_steps="2" \
|
| 10 |
+
--learning_rate="3e-4" \
|
| 11 |
+
--warmup_steps="500" \
|
| 12 |
+
--evaluation_strategy="steps" \
|
| 13 |
+
--text_column_name="sentence" \
|
| 14 |
+
--length_column_name="input_length" \
|
| 15 |
+
--save_steps="400" \
|
| 16 |
+
--eval_steps="100" \
|
| 17 |
+
--layerdrop="0.0" \
|
| 18 |
+
--save_total_limit="3" \
|
| 19 |
+
--freeze_feature_encoder \
|
| 20 |
+
--gradient_checkpointing \
|
| 21 |
+
--chars_to_ignore , ? . ! - \; \: \" “ % ‘ ” � \
|
| 22 |
+
--fp16 \
|
| 23 |
+
--group_by_length \
|
| 24 |
+
--push_to_hub \
|
| 25 |
+
--do_train --do_eval
|
run.sh
CHANGED
|
@@ -1,25 +1,29 @@
|
|
| 1 |
python run_speech_recognition_ctc.py \
|
| 2 |
--dataset_name="common_voice" \
|
| 3 |
-
--model_name_or_path="
|
| 4 |
--dataset_config_name="tr" \
|
| 5 |
--output_dir="./" \
|
| 6 |
--overwrite_output_dir \
|
| 7 |
-
--num_train_epochs="
|
| 8 |
-
--per_device_train_batch_size="
|
| 9 |
-
--gradient_accumulation_steps="
|
| 10 |
-
--learning_rate="
|
| 11 |
--warmup_steps="500" \
|
| 12 |
--evaluation_strategy="steps" \
|
| 13 |
--text_column_name="sentence" \
|
| 14 |
-
--
|
| 15 |
-
--
|
| 16 |
-
--
|
| 17 |
--layerdrop="0.0" \
|
| 18 |
-
--
|
| 19 |
-
--
|
| 20 |
-
--
|
|
|
|
|
|
|
|
|
|
| 21 |
--chars_to_ignore , ? . ! - \; \: \" “ % ‘ ” � \
|
| 22 |
--fp16 \
|
| 23 |
--group_by_length \
|
| 24 |
--push_to_hub \
|
| 25 |
-
--do_train --do_eval
|
|
|
|
|
|
| 1 |
python run_speech_recognition_ctc.py \
|
| 2 |
--dataset_name="common_voice" \
|
| 3 |
+
--model_name_or_path="facebook/wav2vec2-xls-r-300m" \
|
| 4 |
--dataset_config_name="tr" \
|
| 5 |
--output_dir="./" \
|
| 6 |
--overwrite_output_dir \
|
| 7 |
+
--num_train_epochs="2" \
|
| 8 |
+
--per_device_train_batch_size="32" \
|
| 9 |
+
--gradient_accumulation_steps="1" \
|
| 10 |
+
--learning_rate="5e-4" \
|
| 11 |
--warmup_steps="500" \
|
| 12 |
--evaluation_strategy="steps" \
|
| 13 |
--text_column_name="sentence" \
|
| 14 |
+
--save_steps="500" \
|
| 15 |
+
--eval_steps="500" \
|
| 16 |
+
--logging_steps="1" \
|
| 17 |
--layerdrop="0.0" \
|
| 18 |
+
--eval_metrics wer cer \
|
| 19 |
+
--save_total_limit="1" \
|
| 20 |
+
--mask_time_prob="0.3" \
|
| 21 |
+
--mask_time_length="10" \
|
| 22 |
+
--mask_feature_prob="0.1" \
|
| 23 |
+
--mask_feature_length="64" \
|
| 24 |
--chars_to_ignore , ? . ! - \; \: \" “ % ‘ ” � \
|
| 25 |
--fp16 \
|
| 26 |
--group_by_length \
|
| 27 |
--push_to_hub \
|
| 28 |
+
--do_train --do_eval \
|
| 29 |
+
--gradient_checkpointing
|
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}]}
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 2991
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c741e2d2d858980a8cfdf104cef10aacd51be9a34f3f0fb299372de4f16f9e54
|
| 3 |
size 2991
|