codewithdark commited on
Commit
9237625
1 Parent(s): b046689

End of training

Browse files
Files changed (2) hide show
  1. README.md +61 -72
  2. generation_config.json +256 -0
README.md CHANGED
@@ -1,96 +1,85 @@
1
  ---
 
 
 
2
  license: apache-2.0
 
 
 
3
  datasets:
4
  - mozilla-foundation/common_voice_11_0
5
- language:
6
- - ur
7
  metrics:
8
  - wer
9
- base_model: openai/whisper-small
10
- pipeline_tag: automatic-speech-recognition
11
- library_name: transformers
12
- tags:
13
- - transformers
14
- - torch
15
- - tensor
 
 
 
 
 
 
 
 
 
16
  ---
17
- # Model Card for WhisperLiveSubs
18
- This model is a fine-tuned version of OpenAI's Whisper model on the Common Voice dataset for Urdu speech recognition. It is optimized for transcribing Urdu language audio.
19
-
20
- ### Model Description
21
- This model is a small variant of the Whisper model fine-tuned on the Common Voice dataset for the Urdu language. It is intended for automatic speech recognition (ASR) tasks and performs well in transcribing Urdu speech.
22
- - **Developed by:** codewithdark
23
- - **Model type:** Whisper-based model for ASR
24
- - **Language(s) (NLP):** Urdu (ur)
25
- - **License:** Apache 2.0
26
- - **Finetuned from model :** openai/whisper-small
27
-
28
- ## Uses
29
- ### Direct Use
30
- This model can be used directly for transcribing Urdu audio into text. It is suitable for applications such as:
31
- - Voice-to-text transcription services
32
- - Captioning Urdu language videos
33
- - Speech analytics in Urdu
34
-
35
- ### Out-of-Scope Use
36
- The model may not perform well for:
37
- - Non-Urdu languages
38
- - Extremely noisy environments
39
- - Very long audio sequences without segmentation
40
 
41
- ## How to Get Started with the Model
42
- Use the code below to get started with the model.
43
 
44
- ```python
45
- from transformers import WhisperProcessor, WhisperForConditionalGeneration
46
 
47
- processor = WhisperProcessor.from_pretrained("codewithdark/WhisperLiveSubs")
48
- model = WhisperForConditionalGeneration.from_pretrained("codewithdark/WhisperLiveSubs")
 
 
49
 
50
- # Your transcription code here
51
- ```
52
 
53
- ### Training Data
54
- The model was fine-tuned on the Mozilla Common Voice dataset, specifically the Urdu subset. The dataset consists of approximately 141 hr of transcribed Urdu speech.
55
 
56
- #### Preprocessing
57
- The audio was resampled to 16kHz, and text was tokenized using the Whisper tokenizer configured for Urdu.
58
 
59
- #### Training Hyperparameters
60
- - **Training regime:** Mixed precision (fp16)
61
- - **Batch size:** 8
62
- - **Gradient accumulation steps:** 2
63
- - **Learning rate:** 1e-5
64
- - **Max steps:** 4000
65
 
66
- #### Metrics
67
- Word Error Rate (WER) was the primary metric used to evaluate the model's performance.
68
 
69
- ### Results
70
 
71
- - **Training Loss:** 0.2005
72
- - **Validation Loss:** 0.5342
73
- - **WER:** 51.06
74
 
75
- *This is my first time fine-tuning this model. Don't worry about the current performance;
76
- improvements can be made to enhance the model's accuracy and reduce the WER.*
77
 
78
- - **Hardware Type:** P100 GPU
79
- - **Hours used:** 10 hr
80
- - **Cloud Provider:** Kaggle
81
- - **Compute Region:** PK
 
 
 
 
 
 
 
 
82
 
83
- ### Model Architecture and Objective
84
- The WhisperLiveSubs model is based on the Whisper architecture, designed for automatic speech recognition.
85
 
86
- #### Software
87
- - **Framework:** PyTorch
88
- - **Transformers Version:**
 
 
 
89
 
90
- #### Summary
91
- The model demonstrates acceptable performance for Urdu transcription, but there is room for improvement in terms of WER, especially in noisy conditions or with diverse accents.
92
 
93
- ## Model Card Contact
94
- For inquiries, please contact codewithdark90@gmail.com
95
 
96
- @Codewithdark. (2024). WhisperLiveSubs: An Urdu Automatic Speech Recognition Model. Retrieved from https://huggingface.co/codewithdark/WhisperLiveSubs
 
 
 
 
1
  ---
2
+ library_name: transformers
3
+ language:
4
+ - hi
5
  license: apache-2.0
6
+ base_model: openai/whisper-small
7
+ tags:
8
+ - generated_from_trainer
9
  datasets:
10
  - mozilla-foundation/common_voice_11_0
 
 
11
  metrics:
12
  - wer
13
+ model-index:
14
+ - name: WhisperLiveSubs
15
+ results:
16
+ - task:
17
+ name: Automatic Speech Recognition
18
+ type: automatic-speech-recognition
19
+ dataset:
20
+ name: Common Voice 11.0
21
+ type: mozilla-foundation/common_voice_11_0
22
+ config: ur
23
+ split: None
24
+ args: 'config: hi, split: test'
25
+ metrics:
26
+ - name: Wer
27
+ type: wer
28
+ value: 33.52296915515306
29
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
 
31
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
32
+ should probably proofread and complete it, then remove this comment. -->
33
 
34
+ # WhisperLiveSubs
 
35
 
36
+ This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small) on the Common Voice 11.0 dataset.
37
+ It achieves the following results on the evaluation set:
38
+ - Loss: 0.6872
39
+ - Wer: 33.5230
40
 
41
+ ## Model description
 
42
 
43
+ More information needed
 
44
 
45
+ ## Intended uses & limitations
 
46
 
47
+ More information needed
 
 
 
 
 
48
 
49
+ ## Training and evaluation data
 
50
 
51
+ More information needed
52
 
53
+ ## Training procedure
 
 
54
 
55
+ ### Training hyperparameters
 
56
 
57
+ The following hyperparameters were used during training:
58
+ - learning_rate: 1e-05
59
+ - train_batch_size: 8
60
+ - eval_batch_size: 4
61
+ - seed: 42
62
+ - gradient_accumulation_steps: 2
63
+ - total_train_batch_size: 16
64
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
65
+ - lr_scheduler_type: linear
66
+ - lr_scheduler_warmup_steps: 500
67
+ - training_steps: 4000
68
+ - mixed_precision_training: Native AMP
69
 
70
+ ### Training results
 
71
 
72
+ | Training Loss | Epoch | Step | Validation Loss | Wer |
73
+ |:-------------:|:------:|:----:|:---------------:|:-------:|
74
+ | 0.2002 | 2.1529 | 1000 | 0.5344 | 52.4633 |
75
+ | 0.0573 | 4.3057 | 2000 | 0.5705 | 37.6640 |
76
+ | 0.0109 | 6.4586 | 3000 | 0.6432 | 36.3443 |
77
+ | 0.0044 | 8.6114 | 4000 | 0.6872 | 33.5230 |
78
 
 
 
79
 
80
+ ### Framework versions
 
81
 
82
+ - Transformers 4.44.2
83
+ - Pytorch 2.4.0
84
+ - Datasets 2.21.0
85
+ - Tokenizers 0.19.1
generation_config.json ADDED
@@ -0,0 +1,256 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alignment_heads": [
3
+ [
4
+ 5,
5
+ 3
6
+ ],
7
+ [
8
+ 5,
9
+ 9
10
+ ],
11
+ [
12
+ 8,
13
+ 0
14
+ ],
15
+ [
16
+ 8,
17
+ 4
18
+ ],
19
+ [
20
+ 8,
21
+ 7
22
+ ],
23
+ [
24
+ 8,
25
+ 8
26
+ ],
27
+ [
28
+ 9,
29
+ 0
30
+ ],
31
+ [
32
+ 9,
33
+ 7
34
+ ],
35
+ [
36
+ 9,
37
+ 9
38
+ ],
39
+ [
40
+ 10,
41
+ 5
42
+ ]
43
+ ],
44
+ "begin_suppress_tokens": [
45
+ 220,
46
+ 50257
47
+ ],
48
+ "bos_token_id": 50257,
49
+ "decoder_start_token_id": 50258,
50
+ "eos_token_id": 50257,
51
+ "is_multilingual": true,
52
+ "lang_to_id": {
53
+ "<|af|>": 50327,
54
+ "<|am|>": 50334,
55
+ "<|ar|>": 50272,
56
+ "<|as|>": 50350,
57
+ "<|az|>": 50304,
58
+ "<|ba|>": 50355,
59
+ "<|be|>": 50330,
60
+ "<|bg|>": 50292,
61
+ "<|bn|>": 50302,
62
+ "<|bo|>": 50347,
63
+ "<|br|>": 50309,
64
+ "<|bs|>": 50315,
65
+ "<|ca|>": 50270,
66
+ "<|cs|>": 50283,
67
+ "<|cy|>": 50297,
68
+ "<|da|>": 50285,
69
+ "<|de|>": 50261,
70
+ "<|el|>": 50281,
71
+ "<|en|>": 50259,
72
+ "<|es|>": 50262,
73
+ "<|et|>": 50307,
74
+ "<|eu|>": 50310,
75
+ "<|fa|>": 50300,
76
+ "<|fi|>": 50277,
77
+ "<|fo|>": 50338,
78
+ "<|fr|>": 50265,
79
+ "<|gl|>": 50319,
80
+ "<|gu|>": 50333,
81
+ "<|haw|>": 50352,
82
+ "<|ha|>": 50354,
83
+ "<|he|>": 50279,
84
+ "<|hi|>": 50276,
85
+ "<|hr|>": 50291,
86
+ "<|ht|>": 50339,
87
+ "<|hu|>": 50286,
88
+ "<|hy|>": 50312,
89
+ "<|id|>": 50275,
90
+ "<|is|>": 50311,
91
+ "<|it|>": 50274,
92
+ "<|ja|>": 50266,
93
+ "<|jw|>": 50356,
94
+ "<|ka|>": 50329,
95
+ "<|kk|>": 50316,
96
+ "<|km|>": 50323,
97
+ "<|kn|>": 50306,
98
+ "<|ko|>": 50264,
99
+ "<|la|>": 50294,
100
+ "<|lb|>": 50345,
101
+ "<|ln|>": 50353,
102
+ "<|lo|>": 50336,
103
+ "<|lt|>": 50293,
104
+ "<|lv|>": 50301,
105
+ "<|mg|>": 50349,
106
+ "<|mi|>": 50295,
107
+ "<|mk|>": 50308,
108
+ "<|ml|>": 50296,
109
+ "<|mn|>": 50314,
110
+ "<|mr|>": 50320,
111
+ "<|ms|>": 50282,
112
+ "<|mt|>": 50343,
113
+ "<|my|>": 50346,
114
+ "<|ne|>": 50313,
115
+ "<|nl|>": 50271,
116
+ "<|nn|>": 50342,
117
+ "<|no|>": 50288,
118
+ "<|oc|>": 50328,
119
+ "<|pa|>": 50321,
120
+ "<|pl|>": 50269,
121
+ "<|ps|>": 50340,
122
+ "<|pt|>": 50267,
123
+ "<|ro|>": 50284,
124
+ "<|ru|>": 50263,
125
+ "<|sa|>": 50344,
126
+ "<|sd|>": 50332,
127
+ "<|si|>": 50322,
128
+ "<|sk|>": 50298,
129
+ "<|sl|>": 50305,
130
+ "<|sn|>": 50324,
131
+ "<|so|>": 50326,
132
+ "<|sq|>": 50317,
133
+ "<|sr|>": 50303,
134
+ "<|su|>": 50357,
135
+ "<|sv|>": 50273,
136
+ "<|sw|>": 50318,
137
+ "<|ta|>": 50287,
138
+ "<|te|>": 50299,
139
+ "<|tg|>": 50331,
140
+ "<|th|>": 50289,
141
+ "<|tk|>": 50341,
142
+ "<|tl|>": 50348,
143
+ "<|tr|>": 50268,
144
+ "<|tt|>": 50351,
145
+ "<|uk|>": 50280,
146
+ "<|ur|>": 50290,
147
+ "<|uz|>": 50337,
148
+ "<|vi|>": 50278,
149
+ "<|yi|>": 50335,
150
+ "<|yo|>": 50325,
151
+ "<|zh|>": 50260
152
+ },
153
+ "language": "ur",
154
+ "max_initial_timestamp_index": 50,
155
+ "max_length": 448,
156
+ "no_timestamps_token_id": 50363,
157
+ "pad_token_id": 50257,
158
+ "prev_sot_token_id": 50361,
159
+ "return_timestamps": false,
160
+ "suppress_tokens": [
161
+ 1,
162
+ 2,
163
+ 7,
164
+ 8,
165
+ 9,
166
+ 10,
167
+ 14,
168
+ 25,
169
+ 26,
170
+ 27,
171
+ 28,
172
+ 29,
173
+ 31,
174
+ 58,
175
+ 59,
176
+ 60,
177
+ 61,
178
+ 62,
179
+ 63,
180
+ 90,
181
+ 91,
182
+ 92,
183
+ 93,
184
+ 359,
185
+ 503,
186
+ 522,
187
+ 542,
188
+ 873,
189
+ 893,
190
+ 902,
191
+ 918,
192
+ 922,
193
+ 931,
194
+ 1350,
195
+ 1853,
196
+ 1982,
197
+ 2460,
198
+ 2627,
199
+ 3246,
200
+ 3253,
201
+ 3268,
202
+ 3536,
203
+ 3846,
204
+ 3961,
205
+ 4183,
206
+ 4667,
207
+ 6585,
208
+ 6647,
209
+ 7273,
210
+ 9061,
211
+ 9383,
212
+ 10428,
213
+ 10929,
214
+ 11938,
215
+ 12033,
216
+ 12331,
217
+ 12562,
218
+ 13793,
219
+ 14157,
220
+ 14635,
221
+ 15265,
222
+ 15618,
223
+ 16553,
224
+ 16604,
225
+ 18362,
226
+ 18956,
227
+ 20075,
228
+ 21675,
229
+ 22520,
230
+ 26130,
231
+ 26161,
232
+ 26435,
233
+ 28279,
234
+ 29464,
235
+ 31650,
236
+ 32302,
237
+ 32470,
238
+ 36865,
239
+ 42863,
240
+ 47425,
241
+ 49870,
242
+ 50254,
243
+ 50258,
244
+ 50358,
245
+ 50359,
246
+ 50360,
247
+ 50361,
248
+ 50362
249
+ ],
250
+ "task": "transcribe",
251
+ "task_to_id": {
252
+ "transcribe": 50359,
253
+ "translate": 50358
254
+ },
255
+ "transformers_version": "4.44.2"
256
+ }