drmeeseeks commited on
Commit
5358d40
1 Parent(s): 5660e05

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +101 -9
README.md CHANGED
@@ -1,35 +1,58 @@
1
  ---
2
  license: apache-2.0
3
  tags:
 
4
  - generated_from_trainer
5
  datasets:
6
- - fleurs
 
 
7
  model-index:
8
- - name: whisper-small-amet
9
- results: []
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
  should probably proofread and complete it, then remove this comment. -->
14
 
15
- # whisper-small-amet
16
 
17
- This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small) on the fleurs dataset.
 
 
 
 
 
18
 
19
  ## Model description
20
 
21
- More information needed
22
 
23
  ## Intended uses & limitations
24
 
25
- More information needed
 
26
 
27
  ## Training and evaluation data
28
 
29
- More information needed
30
 
31
  ## Training procedure
32
 
 
 
33
  ### Training hyperparameters
34
 
35
  The following hyperparameters were used during training:
@@ -37,19 +60,88 @@ The following hyperparameters were used during training:
37
  - train_batch_size: 64
38
  - eval_batch_size: 32
39
  - seed: 42
 
 
40
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
41
  - lr_scheduler_type: linear
42
  - lr_scheduler_warmup_steps: 500
43
  - training_steps: 1000
44
  - mixed_precision_training: Native AMP
 
 
45
 
46
  ### Training results
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
 
50
  ### Framework versions
51
 
52
  - Transformers 4.26.0.dev0
53
- - Pytorch 1.13.1+cu117
54
  - Datasets 2.7.1.dev0
55
  - Tokenizers 0.13.2
 
1
  ---
2
  license: apache-2.0
3
  tags:
4
+ - whisper-event
5
  - generated_from_trainer
6
  datasets:
7
+ - google/fleurs
8
+ metrics:
9
+ - wer
10
  model-index:
11
+ - name: Whisper Small Amharic FLEURS
12
+ results:
13
+ - task:
14
+ name: Automatic Speech Recognition
15
+ type: automatic-speech-recognition
16
+ dataset:
17
+ name: google/fleurs am_et
18
+ type: google/fleurs
19
+ config: am_et
20
+ split: test+validation
21
+ args: am_et
22
+ metrics:
23
+ - name: Wer
24
+ type: wer
25
+ value: 160.99
26
  ---
27
 
28
  <!-- This model card has been generated automatically according to the information the Trainer had access to. You
29
  should probably proofread and complete it, then remove this comment. -->
30
 
 
31
 
32
+ # Whisper Small Tamil FLEURS
33
+
34
+ This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small) on the google/fleurs am_et dataset.
35
+ It achieves the following results on the evaluation set:
36
+ - Loss: -
37
+ - Wer: 160.99
38
 
39
  ## Model description
40
 
41
+ - The main Whisper Small Hugging Face page: [Hugging Face - Whisper Small](https://huggingface.co/openai/whisper-small)
42
 
43
  ## Intended uses & limitations
44
 
45
+ - For experimentation and curiosity.
46
+ - Based on the paper [AXRIV](https://arxiv.org/abs/2212.04356) and [Benchmarking OpenAI Whisper for non-English ASR - Dan Shafer](https://blog.deepgram.com/benchmarking-openai-whisper-for-non-english-asr/), there is a performance bias towards certain languages and curated datasets.
47
 
48
  ## Training and evaluation data
49
 
50
+ - This model was trained/evaluated on "test+validation" data from google/fleurs [google/fluers - HuggingFace Datasets](https://huggingface.co/datasets/google/fleurs).
51
 
52
  ## Training procedure
53
 
54
+ - The training was done in Lambda Cloud GPU on A100/40GB GPUs, which were provided by OpenAI Community Events [Whisper Fine Tuning Event - Dec 2022](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#fine-tune-whisper). The training was done using [HuggingFace Community Events - Whisper - run_speech_recognition_seq2seq_streaming.py](https://github.com/huggingface/community-events/blob/main/whisper-fine-tuning-event/run_speech_recognition_seq2seq_streaming.py) using the included [whisper_python_am_et.ipynb](https://huggingface.co/drmeeseeks/whisper-small-am_et/blob/main/am_et_fine_tune_whisper_streaming_colab_RUNNING-evalerrir.ipynb) to setup the Lambda Cloud GPU/Colab environment. For Colab, you must reduce the train batch size to the recommended amount mentioned at , as the T4 GPUs have 16GB of memory [Whisper Fine Tuning Event - Dec 2022](https://github.com/huggingface/community-events/tree/main/whisper-fine-tuning-event#fine-tune-whisper). The notebook sets up the environment, logs into your huggingface account, and generates a bash script. The bash script generated in the IPYNB, `run.sh` was run from the terminal to train `bash run.sh`, as described on the Whisper community events GITHUB page. Num Examples = 446, Num Epochs = 715, Number of trainable parameters = 241734912.
55
+
56
  ### Training hyperparameters
57
 
58
  The following hyperparameters were used during training:
 
60
  - train_batch_size: 64
61
  - eval_batch_size: 32
62
  - seed: 42
63
+ - gradient_accumulation_steps: 1
64
+ - total_train_batch_size: 64
65
  - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
66
  - lr_scheduler_type: linear
67
  - lr_scheduler_warmup_steps: 500
68
  - training_steps: 1000
69
  - mixed_precision_training: Native AMP
70
+ - do_eval=False
71
+
72
 
73
  ### Training results
74
 
75
+ 5000 Steps
76
+
77
+ | Training Loss | Epoch | Step | Learning Rate |
78
+ |:-------------:|:-----:|:-----:|:-----:|
79
+ | 3.0968 | 0.05 | - | 4.2e-7 |
80
+ | 1.178 | 28.57 | - | 3.92e-6 |
81
+ | 0.03 | 53.57 | - | 7.42e-6 |
82
+ | 0.0002 | 217.86 | - | 7.73e-6 |
83
+ | 0.0001 | 378.57 | ~ 2000 | 5.23e-6 |
84
+ | 0.0000 | 382.14 | - | 5.14e-6 |
85
+ | 0.0000 | 467.86 | 3300 | 3.84e-6|
86
+ | 0.0000 | 614.29 | 4300 | 1.56e-6|
87
+ | 0.0000 | 685.71 | 4812 | 4.53e-7|
88
+ | 0.0000 | 710.71 | 4997 | 6.44e-8|
89
+
90
+ 3000 Steps
91
+
92
+ | Training Loss | Epoch | Step | Learning Rate |
93
+ |:-------------:|:-----:|:-----:|:-----:|
94
+ | 3.0968 | 0.05 | - | 4.2e-7 |
95
+ | 0.0017 | 96.43 | 687 | 9.316e-6 |
96
+
97
+
98
+ ### Recommendations
99
+
100
+ Limit training duration for smaller datasets to ~ 2000 to 3000 steps to avoid overfitting. 5000 steps using the [HuggingFace - Whisper Small](https://huggingface.co/openai/whisper-small) takes ~ 5hrs on A100 GPUs (1hr/1000 steps). Encountered `RuntimeError: The size of tensor a (504) must match the size of tensor b (448) at non-singleton dimension 1` which is related to [Trainer RuntimeError](https://discuss.huggingface.co/t/trainer-runtimeerror-the-size-of-tensor-a-462-must-match-the-size-of-tensor-b-448-at-non-singleton-dimension-1/26010) as some languages datasets have input lengths that have non-standard lengths. The link did not resolve my issue, and appears elsewhere too [Training languagemodel – RuntimeError the expanded size of the tensor (100) must match the existing size (64) at non singleton dimension 1](https://hungsblog.de/en/technology/troubleshooting/training-languagemodel-runtimeerror-the-expanded-size-of-the-tensor-100-must-match-the-existing-size-64-at-non-singleton-dimension-1/). To circumvent this issue, `run.sh` only trains and saves the model (if you make changes to `run.sh` be sure to clear/rm the contents as piping appends). Then run `python run_eval_whisper_streaming.py --model_id="openai/whisper-small" --dataset="google/fleurs" --config="am_et" --batch_size=32 --max_eval_samples=64 --device=0 --language="am"` to find the WER score. Erroring out during evaluation prevents the trained model from loading to HugginFace. Based on the paper [AXRIV](https://arxiv.org/abs/2212.04356) and [Benchmarking OpenAI Whisper for non-English ASR - Dan Shafer](https://blog.deepgram.com/benchmarking-openai-whisper-for-non-english-asr/), there is a performance bias towards certain languages and curated datasets. The OpenAI fintuning community event provided ample _free_ GPU time to help develop the model further and improve WER scores.
101
+
102
+ ### Environmental Impact
103
+
104
+ Carbon emissions were estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). In total roughly 100 hours were used primarily in US East/Asia Pacific (80%/20%), with AWS as the reference. Additional resources are available at [Our World in Data - CO2 Emissions](https://ourworldindata.org/co2-emissions)
105
+
106
+ - __Hardware Type__: AMD EPYC 7J13 64-Core Processor (30 core VM) 197GB RAM, with NVIDIA A100-SXM 40GB
107
+ - __Hours Used__: 100 hrs
108
+ - __Cloud Provider__: Lambda Cloud GPU
109
+ - __Compute Region__: US East/Asia Pacific
110
+ - __Carbon Emitted__: 12 kg (GPU) + 13 kg (CPU) = 25 kg (the weight of 3 gallons of water)
111
+
112
+
113
+ ### Citation
114
+
115
+ - [Whisper - GITHUB](https://github.com/openai/whisper)
116
+ - [Whisper - OpenAI - BLOG](https://openai.com/blog/whisper/)
117
+ - [Model Card - HuggingFace Hub - GITHUB](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md)
118
+
119
+ ```bibtex
120
+ @misc{https://doi.org/10.48550/arxiv.2212.04356,
121
+ doi = {10.48550/ARXIV.2212.04356},
122
+ url = {https://arxiv.org/abs/2212.04356},
123
+ author = {Radford, Alec and Kim, Jong Wook and Xu, Tao and Brockman, Greg and McLeavey, Christine and Sutskever, Ilya},
124
+ keywords = {Audio and Speech Processing (eess.AS), Computation and Language (cs.CL), Machine Learning (cs.LG), Sound (cs.SD), FOS: Electrical engineering, electronic engineering, information engineering, FOS: Electrical engineering, electronic engineering, information engineering, FOS: Computer and information sciences, FOS: Computer and information sciences},
125
+ title = {Robust Speech Recognition via Large-Scale Weak Supervision},
126
+ publisher = {arXiv},
127
+ year = {2022},
128
+ copyright = {arXiv.org perpetual, non-exclusive license}
129
+ }
130
+
131
+ @article{owidco2andothergreenhousegasemissions,
132
+ author = {Hannah Ritchie and Max Roser and Pablo Rosado},
133
+ title = {CO₂ and Greenhouse Gas Emissions},
134
+ journal = {Our World in Data},
135
+ year = {2020},
136
+ note = {https://ourworldindata.org/co2-and-other-greenhouse-gas-emissions}
137
+ }
138
+
139
+ ```
140
 
141
 
142
  ### Framework versions
143
 
144
  - Transformers 4.26.0.dev0
145
+ - Pytorch 1.13.0+cu117
146
  - Datasets 2.7.1.dev0
147
  - Tokenizers 0.13.2