GetmanY1 commited on
Commit
4bd3d84
·
verified ·
1 Parent(s): f25adaf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +112 -3
README.md CHANGED
@@ -1,3 +1,112 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language: fi
4
+ tags:
5
+ - automatic-speech-recognition
6
+ - fi
7
+ - finnish
8
+ ---
9
+ # Finnish Wav2vec2-Base
10
+
11
+ The base model pretrained on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz.
12
+
13
+ **Note**: This model does not have a tokenizer as it was pretrained on audio alone. In order to use this model **speech recognition**, a tokenizer should be created and the model should be fine-tuned on labeled text data. Check out [this blog](https://huggingface.co/blog/fine-tune-xlsr-wav2vec2) for more in-detail explanation of how to fine-tune the model.
14
+
15
+ **Note**: Fine-tuned versions will be available soon at: TBA
16
+
17
+ ## Model description
18
+
19
+ The Finnish Wav2Vec2 Base hase the same architecture and uses the same training objective as the English and multilingual one described in [Paper](https://arxiv.org/abs/2006.11477). It is pretrained on 158k hours of unlabeled Finnish speech, including KAVI radio and television archive materials, Lahjoita Puhetta (Donate Speech), Finnish Parliament, Finnish VoxPopuli.
20
+
21
+ You can read more about the pretrained model from [this paper](TODO).
22
+
23
+ ## Intended uses & limitations
24
+
25
+ You can use this model for Finnish ASR (speech-to-text) and SER (Spoken Emotion Recognition) tasks.
26
+
27
+ ### How to use
28
+
29
+ See [this notebook](https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/Fine_Tune_XLS_R_on_Common_Voice.ipynb) for more information on how to fine-tune the model.
30
+
31
+ ### Limitations and bias
32
+
33
+ This model was pretrained with audio samples which maximum length was 60 seconds so this model most likely works the best for quite short audios of similar length. However, you can try this model with a lot longer audios too and see how it works. If you encounter out of memory errors with very long audio files you can use the audio chunking method introduced in [this blog post](https://huggingface.co/blog/asr-chunking).
34
+
35
+ A vast majority of the data used for pre-training was from the KAVI archives so this model might have biases towards the voices of tv and radio hosts, as well as to colloquial Finnish. The pre-training data was filtered via neural [VAD](https://huggingface.co/pyannote/voice-activity-detection), but some non-speech events like music might be still present in the traning data, which might cause issues when fine-tuned on clear (no background noise) speech.
36
+
37
+ ## Training data
38
+
39
+ This model was pre-trained with 158k hours of Finnish speech data from following sources:
40
+
41
+ | Dataset | Hours | % of total hours |
42
+ |:----------------------------------------------------------------------------------------------|:--------:|:----------------:|
43
+ | [Lahjoita puhetta](https://www.kielipankki.fi/donate-speech/) | 2740 h | 1.74 % |
44
+ | [Finnish parliament](http://urn.fi/urn:nbn:fi:lb-2016042502) | 2692 h | 1.71 % |
45
+ | [VoxPopuli Finnish](https://github.com/facebookresearch/voxpopuli) | 14264 h | 9.04 % |
46
+ | [YlePuhe](TODO) | 95478 h | 60.52 % |
47
+ | [MTV3](TODO) | 16723 h | 10.60 % |
48
+ | [YleTV1](TODO) | 13947 h | 8.84 % |
49
+ | [AlfaTV](TODO) | 11933 h | 7.56 % |
50
+
51
+ Datasets were filtered to include maximum length of 60 seconds long audio samples.
52
+
53
+ ## Training procedure
54
+
55
+ Training was done on 256 AMD MI250x GPU modules (512 GPUs from the software perspective), using [LUMI](https://www.lumi-supercomputer.eu/), during the [Second Finnish LUMI Extreme Scale](https://research.csc.fi/web/group-10180/-/more-finnish-lumi-projects-chosen-advancing-speech-model-for-finnish-advancing-string-theory).
56
+
57
+ Training script was provided by Fairseq and it is available [here](https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec).
58
+
59
+ ### Training hyperparameters
60
+
61
+ The following hyperparameters were used during training:
62
+ - learning_rate: 6e-04
63
+ - max_update: 125000
64
+ - seed: 1
65
+ - optimizer: [8-bit Adam](https://github.com/facebookresearch/bitsandbytes) with betas=(0.9,0.98) and epsilon=1e-06
66
+ - lr_scheduler_type: linear
67
+ - lr_scheduler_warmup_updates: 3000
68
+ - fp16: true
69
+ - max_sample_size: 960000
70
+ - min_sample_size: 32000
71
+ - normalize: false
72
+ - max_tokens: 2800000
73
+ - distributed_world_size: 512
74
+ The pretrained model was initialized with following hyperparameters:
75
+ - quantize_targets: true
76
+ - latent_temp: [2.0, 0.5, 0.999995]
77
+ - extractor_mode: default
78
+ - layer_norm_first: false
79
+ - dropout_input: 0.1
80
+ - dropout_features: 0.1
81
+ - feature_grad_mult: 0.1
82
+ - encoder_embed_dim: 768
83
+ - encoder_layers: 12
84
+ - encoder_ffn_embed_dim: 3072
85
+ - encoder_attention_heads: 12
86
+ - activation_fn: gelu
87
+ - dropout: 0.1
88
+ - attention_dropout: 0.1
89
+ - activation_dropout: 0.0
90
+ - encoder_layerdrop: 0.0
91
+
92
+ ### Training results
93
+
94
+ | Training Loss | Epoch | Step | Validation Loss |
95
+ |:-------------:|:-----:|:-----:|:---------------:|
96
+ | 4.293 | 1 | 7537 | 3.13 |
97
+ | 2.577 | 5 | 37724 | 2.365 |
98
+ | 2.404 | 10 | 75457 | 2.219 |
99
+ | 2.319 | 15 | 113185| 2.169 |
100
+ | 2.293 | 16.565| 125000| 2.149 |
101
+
102
+ ### Framework versions
103
+
104
+ - Pytorch 1.13.1+rocm5.2
105
+ - Fairseq 0.12.2
106
+
107
+ ## Team Members
108
+
109
+ - Yaroslav Getman, [Hugging Face profile](https://huggingface.co/GetmanY1), [LinkedIn profile](https://www.linkedin.com/in/yaroslav-getman/)
110
+ - Tamas Grosz, [Hugging Face profile](https://huggingface.co/Grosy), [LinkedIn profile](https://www.linkedin.com/in/tam%C3%A1s-gr%C3%B3sz-950a049a/)
111
+
112
+ Feel free to contact us for more details 🤗