Ceyda Cinarel commited on
Commit
27503d5
1 Parent(s): 64fd5fc

first commit

Browse files
README.md CHANGED
@@ -23,10 +23,10 @@ model-index:
23
  metrics:
24
  - name: Test WER
25
  type: wer
26
- value: 29.30
27
  ---
28
 
29
- # Wav2Vec2-Base-960-Turkish
30
 
31
  # TBA
32
  Pretrained Turkish model [ceyda/wav2vec2-base-760](https://huggingface.co/ceyda/wav2vec2-base-760). Fine-tuned on Turkish using the [Common Voice](https://huggingface.co/datasets/common_voice)
@@ -87,7 +87,7 @@ processor = Wav2Vec2Processor.from_pretrained("ceyda/wav2vec2-base-960-turkish")
87
  model = Wav2Vec2ForCTC.from_pretrained("ceyda/wav2vec2-base-960-turkish")
88
  model.to("cuda")
89
 
90
- chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“\\‘\\”\\'\\`…\\’»«]'
91
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
92
 
93
  # Preprocessing the datasets.
@@ -117,7 +117,7 @@ result = test_dataset.map(evaluate, batched=True, batch_size=8)
117
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
118
  ```
119
 
120
- **Test Result**: XX.XX % (TBA)
121
 
122
 
123
  ## Training
 
23
  metrics:
24
  - name: Test WER
25
  type: wer
26
+ value: 27.08
27
  ---
28
 
29
+ # Wav2Vec2-Base-760-Turkish
30
 
31
  # TBA
32
  Pretrained Turkish model [ceyda/wav2vec2-base-760](https://huggingface.co/ceyda/wav2vec2-base-760). Fine-tuned on Turkish using the [Common Voice](https://huggingface.co/datasets/common_voice)
 
87
  model = Wav2Vec2ForCTC.from_pretrained("ceyda/wav2vec2-base-960-turkish")
88
  model.to("cuda")
89
 
90
+ chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\‘\”\'\`…\’»«]'
91
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
92
 
93
  # Preprocessing the datasets.
 
117
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
118
  ```
119
 
120
+ **Test Result**: 27.08 % (in progress)
121
 
122
 
123
  ## Training
config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "./pretrained/checkpoint_0.60",
3
+ "activation_dropout": 0.1,
4
+ "apply_spec_augment": true,
5
+ "architectures": [
6
+ "Wav2Vec2ForCTC"
7
+ ],
8
+ "attention_dropout": 0.1,
9
+ "bos_token_id": 1,
10
+ "conv_bias": false,
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": true,
40
+ "do_stable_layer_norm": false,
41
+ "eos_token_id": 2,
42
+ "feat_extract_activation": "gelu",
43
+ "feat_extract_norm": "group",
44
+ "feat_proj_dropout": 0.1,
45
+ "final_dropout": 0.1,
46
+ "gradient_checkpointing": true,
47
+ "hidden_act": "gelu",
48
+ "hidden_dropout": 0.05,
49
+ "hidden_size": 768,
50
+ "initializer_range": 0.02,
51
+ "intermediate_size": 3072,
52
+ "layer_norm_eps": 1e-05,
53
+ "layerdrop": 0.1,
54
+ "mask_feature_length": 10,
55
+ "mask_feature_prob": 0.0,
56
+ "mask_time_length": 10,
57
+ "mask_time_prob": 0.5,
58
+ "model_type": "wav2vec2",
59
+ "num_attention_heads": 12,
60
+ "num_conv_pos_embedding_groups": 16,
61
+ "num_conv_pos_embeddings": 128,
62
+ "num_feat_extract_layers": 7,
63
+ "num_hidden_layers": 12,
64
+ "pad_token_id": 36,
65
+ "transformers_version": "4.5.0.dev0",
66
+ "vocab_size": 37
67
+ }
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:ecb5a521af5105ca67abd19a841c08e97b071a8b69e186b06b25633c6fc36804
3
+ size 377690860
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<s>", "eos_token": "</s>", "unk_token": "[UNK]", "pad_token": "[PAD]"}
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "[UNK]", "bos_token": "<s>", "eos_token": "</s>", "pad_token": "[PAD]", "do_lower_case": false, "word_delimiter_token": "|"}
vocab.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"e": 0, "x": 1, "î": 2, "l": 3, "â": 4, "j": 5, "ç": 6, "ş": 7, "g": 8, "ı": 9, "v": 10, "d": 11, "t": 12, "n": 13, "a": 14, "c": 15, "h": 16, "p": 17, "r": 18, "w": 19, "z": 20, "k": 21, "u": 22, "b": 23, "ü": 24, "y": 26, "o": 27, "q": 28, "m": 29, "f": 30, "s": 31, "ö": 32, "ğ": 33, "i": 34, "|": 25, "[UNK]": 35, "[PAD]": 36}