emre commited on
Commit
19cf7e0
1 Parent(s): 8b1a65a

Initial commit

Browse files
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: tr
3
+ datasets:
4
+ - common_voice
5
+ metrics:
6
+ - wer
7
+ tags:
8
+ - audio
9
+ - automatic-speech-recognition
10
+ - speech
11
+
12
+ license: apache-2.0
13
+ model-index:
14
+ - name: XLSR Wav2Vec2 Turkish by Davut Emre TASAR
15
+ results:
16
+ - task:
17
+ name: Speech Recognition
18
+ type: automatic-speech-recognition
19
+ dataset:
20
+ name: Common Voice tr
21
+ type: common_voice
22
+ args: tr
23
+ metrics:
24
+ - name: Test WER
25
+ type: wer
26
+
27
+ ---
28
+
29
+ # wav2vec-tr-lite-AG
30
+
31
+ ## Usage
32
+
33
+ The model can be used directly (without a language model) as follows:
34
+
35
+ ```python
36
+ import torch
37
+ import torchaudio
38
+ from datasets import load_dataset
39
+ from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
40
+
41
+ test_dataset = load_dataset("common_voice", "tr", split="test[:2%]")
42
+
43
+ processor = Wav2Vec2Processor.from_pretrained("emre/wav2vec-tr-lite-AG")
44
+ model = Wav2Vec2ForCTC.from_pretrained("emre/wav2vec-tr-lite-AG")
45
+
46
+ resampler = torchaudio.transforms.Resample(48_000, 16_000)
47
+
48
+ **Test Result**: 27.30 %
49
+
50
+
51
+ [here](https://adresgezgini.com)
52
+
config.json ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "facebook/wav2vec2-large-xlsr-53",
3
+ "activation_dropout": 0.0,
4
+ "apply_spec_augment": true,
5
+ "architectures": [
6
+ "Wav2Vec2ForCTC"
7
+ ],
8
+ "attention_dropout": 0.1,
9
+ "bos_token_id": 1,
10
+ "conv_bias": true,
11
+ "conv_dim": [
12
+ 512,
13
+ 512,
14
+ 512,
15
+ 512,
16
+ 512,
17
+ 512,
18
+ 512
19
+ ],
20
+ "conv_kernel": [
21
+ 10,
22
+ 3,
23
+ 3,
24
+ 3,
25
+ 3,
26
+ 2,
27
+ 2
28
+ ],
29
+ "conv_stride": [
30
+ 5,
31
+ 2,
32
+ 2,
33
+ 2,
34
+ 2,
35
+ 2,
36
+ 2
37
+ ],
38
+ "ctc_loss_reduction": "mean",
39
+ "ctc_zero_infinity": false,
40
+ "do_stable_layer_norm": true,
41
+ "eos_token_id": 2,
42
+ "feat_extract_activation": "gelu",
43
+ "feat_extract_dropout": 0.0,
44
+ "feat_extract_norm": "layer",
45
+ "feat_proj_dropout": 0.0,
46
+ "final_dropout": 0.0,
47
+ "gradient_checkpointing": true,
48
+ "hidden_act": "gelu",
49
+ "hidden_dropout": 0.1,
50
+ "hidden_size": 1024,
51
+ "initializer_range": 0.02,
52
+ "intermediate_size": 4096,
53
+ "layer_norm_eps": 1e-05,
54
+ "layerdrop": 0.1,
55
+ "mask_channel_length": 10,
56
+ "mask_channel_min_space": 1,
57
+ "mask_channel_other": 0.0,
58
+ "mask_channel_prob": 0.0,
59
+ "mask_channel_selection": "static",
60
+ "mask_feature_length": 10,
61
+ "mask_feature_prob": 0.0,
62
+ "mask_time_length": 10,
63
+ "mask_time_min_space": 1,
64
+ "mask_time_other": 0.0,
65
+ "mask_time_prob": 0.05,
66
+ "mask_time_selection": "static",
67
+ "model_type": "wav2vec2",
68
+ "num_attention_heads": 16,
69
+ "num_conv_pos_embedding_groups": 16,
70
+ "num_conv_pos_embeddings": 128,
71
+ "num_feat_extract_layers": 7,
72
+ "num_hidden_layers": 24,
73
+ "pad_token_id": 39,
74
+ "transformers_version": "4.4.0",
75
+ "vocab_size": 40
76
+ }
preprocessor_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_normalize": true,
3
+ "feature_size": 1,
4
+ "padding_side": "right",
5
+ "padding_value": 0.0,
6
+ "return_attention_mask": true,
7
+ "sampling_rate": 16000
8
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:721f3731148ec50eb9a3884b730f28079078ce2ed4fa90dbcb1d8a8fd5ef4633
3
+ size 1262097815
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4fbdd95cbb152ba0c0f75f3312676c3c1de2346ccbe8f408f9381dbfd9f76c8a
3
+ size 623
trainer_state.json ADDED
@@ -0,0 +1,128 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 29.357798165137616,
5
+ "global_step": 3200,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 3.67,
12
+ "learning_rate": 0.00023999999999999998,
13
+ "loss": 5.0456,
14
+ "step": 400
15
+ },
16
+ {
17
+ "epoch": 3.67,
18
+ "eval_loss": 2.805786609649658,
19
+ "eval_runtime": 214.876,
20
+ "eval_samples_per_second": 7.665,
21
+ "eval_wer": 1.0,
22
+ "step": 400
23
+ },
24
+ {
25
+ "epoch": 7.34,
26
+ "learning_rate": 0.0002675090252707581,
27
+ "loss": 0.8437,
28
+ "step": 800
29
+ },
30
+ {
31
+ "epoch": 7.34,
32
+ "eval_loss": 0.437711238861084,
33
+ "eval_runtime": 217.8287,
34
+ "eval_samples_per_second": 7.561,
35
+ "eval_wer": 0.5915636809314677,
36
+ "step": 800
37
+ },
38
+ {
39
+ "epoch": 11.01,
40
+ "learning_rate": 0.00022418772563176893,
41
+ "loss": 0.2449,
42
+ "step": 1200
43
+ },
44
+ {
45
+ "epoch": 11.01,
46
+ "eval_loss": 0.3937138020992279,
47
+ "eval_runtime": 222.9363,
48
+ "eval_samples_per_second": 7.388,
49
+ "eval_wer": 0.5292615667449698,
50
+ "step": 1200
51
+ },
52
+ {
53
+ "epoch": 14.68,
54
+ "learning_rate": 0.00018086642599277977,
55
+ "loss": 0.1486,
56
+ "step": 1600
57
+ },
58
+ {
59
+ "epoch": 14.68,
60
+ "eval_loss": 0.411156564950943,
61
+ "eval_runtime": 224.0258,
62
+ "eval_samples_per_second": 7.352,
63
+ "eval_wer": 0.5094474517413952,
64
+ "step": 1600
65
+ },
66
+ {
67
+ "epoch": 18.35,
68
+ "learning_rate": 0.00013754512635379062,
69
+ "loss": 0.1077,
70
+ "step": 2000
71
+ },
72
+ {
73
+ "epoch": 18.35,
74
+ "eval_loss": 0.41311565041542053,
75
+ "eval_runtime": 224.2133,
76
+ "eval_samples_per_second": 7.346,
77
+ "eval_wer": 0.49474006740884485,
78
+ "step": 2000
79
+ },
80
+ {
81
+ "epoch": 22.02,
82
+ "learning_rate": 9.422382671480144e-05,
83
+ "loss": 0.0791,
84
+ "step": 2400
85
+ },
86
+ {
87
+ "epoch": 22.02,
88
+ "eval_loss": 0.43790802359580994,
89
+ "eval_runtime": 224.8995,
90
+ "eval_samples_per_second": 7.323,
91
+ "eval_wer": 0.48707997140230824,
92
+ "step": 2400
93
+ },
94
+ {
95
+ "epoch": 25.69,
96
+ "learning_rate": 5.090252707581227e-05,
97
+ "loss": 0.0722,
98
+ "step": 2800
99
+ },
100
+ {
101
+ "epoch": 25.69,
102
+ "eval_loss": 0.4185827076435089,
103
+ "eval_runtime": 222.949,
104
+ "eval_samples_per_second": 7.387,
105
+ "eval_wer": 0.46798079869267695,
106
+ "step": 2800
107
+ },
108
+ {
109
+ "epoch": 29.36,
110
+ "learning_rate": 7.581227436823104e-06,
111
+ "loss": 0.0601,
112
+ "step": 3200
113
+ },
114
+ {
115
+ "epoch": 29.36,
116
+ "eval_loss": 0.41515499353408813,
117
+ "eval_runtime": 225.7543,
118
+ "eval_samples_per_second": 7.296,
119
+ "eval_wer": 0.4620569911142886,
120
+ "step": 3200
121
+ }
122
+ ],
123
+ "max_steps": 3270,
124
+ "num_train_epochs": 30,
125
+ "total_flos": 1.260196128535726e+19,
126
+ "trial_name": null,
127
+ "trial_params": null
128
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:80a19ab79bf56c437d7195ed88bedebbf61fec14af73bb3010f0b909dc031e04
3
+ size 2287
vocab.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"x": 0, "d": 1, "\u015f": 2, "\u0131": 3, "c": 4, "g": 5, "i": 6, "b": 8, "f": 9, "k": 10, "r": 11, "\u00eb": 12, "j": 13, "u": 14, "s": 15, "y": 16, "\u00f6": 17, "\u00e2": 18, "'": 19, "\u011f": 20, "n": 21, "l": 22, "e": 23, "\u00fc": 24, "p": 25, "a": 26, "\u00ee": 27, "o": 28, "w": 29, "m": 30, "v": 31, "z": 32, "q": 33, "\u00e7": 34, "t": 35, "\u0307": 36, "h": 37, "|": 7, "[UNK]": 38, "[PAD]": 39}