GetmanY1 commited on
Commit
40041d1
·
verified ·
1 Parent(s): 7baff78

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
+ - pretraining
9
+ ---
10
+ # Finnish Wav2vec2-Base
11
+
12
+ The base model pre-trained on 16kHz sampled speech audio. When using the model make sure that your speech input is also sampled at 16Khz.
13
+
14
+ **Note**: This model does not have a tokenizer as it was pre-trained 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.
15
+
16
+ **Note**: Fine-tuned version is available at [GetmanY1/wav2vec2-large-fi-150k-finetuned](https://huggingface.co/GetmanY1/wav2vec2-large-fi-150k-finetuned)
17
+
18
+ ## Model description
19
+
20
+ The Finnish Wav2Vec2 Base has 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 pre-trained on 158k hours of unlabeled Finnish speech, including [KAVI radio and television archive materials](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/), Lahjoita puhetta (Donate Speech), Finnish Parliament, Finnish VoxPopuli.
21
+
22
+ You can read more about the pre-trained model from [this paper](TODO).
23
+
24
+ ## Intended uses & limitations
25
+
26
+ You can use this model for Finnish ASR (speech-to-text) and SER (Spoken Emotion Recognition) tasks.
27
+
28
+ ### How to use
29
+
30
+ 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.
31
+
32
+ ### Limitations and bias
33
+
34
+ This model was pre-trained with audio samples whose 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).
35
+
36
+ A vast majority of the data used for pre-training was from the [KAVI](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) 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.
37
+
38
+ ## Training data
39
+
40
+ This model was pre-trained with 158k hours of Finnish speech data from the following sources:
41
+
42
+ | Dataset | Hours | % of total hours |
43
+ |:----------------------------------------------------------------------------------------------|:--------:|:----------------:|
44
+ | [Lahjoita puhetta](https://www.kielipankki.fi/donate-speech/) | 2740 h | 1.74 % |
45
+ | [Finnish Parliament](http://urn.fi/urn:nbn:fi:lb-2016042502) | 2692 h | 1.71 % |
46
+ | [VoxPopuli Finnish](https://github.com/facebookresearch/voxpopuli) | 14264 h | 9.04 % |
47
+ | [YlePuhe](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) | 95478 h | 60.52 % |
48
+ | [MTV3](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) | 16723 h | 10.60 % |
49
+ | [YleTV1](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) | 13947 h | 8.84 % |
50
+ | [AlfaTV](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) | 11933 h | 7.56 % |
51
+
52
+ Datasets were filtered to include a maximum length of 60 seconds long audio samples.
53
+
54
+ ## Training procedure
55
+
56
+ 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).
57
+
58
+ Training script was provided by Fairseq and it is available [here](https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec).
59
+
60
+ ### Training hyperparameters
61
+
62
+ The following hyperparameters were used during training:
63
+ - learning_rate: 4e-04
64
+ - max_update: 166667
65
+ - seed: 1
66
+ - optimizer: [8-bit Adam](https://github.com/facebookresearch/bitsandbytes) with betas=(0.9,0.98) and epsilon=1e-06
67
+ - lr_scheduler_type: linear
68
+ - lr_scheduler_warmup_updates: 5000
69
+ - fp16: true
70
+ - max_sample_size: 960000
71
+ - min_sample_size: 32000
72
+ - normalize: true
73
+ - max_tokens: 1800000
74
+ - distributed_world_size: 512
75
+
76
+ The pre-trained model was initialized with the following hyperparameters:
77
+ - quantize_targets: true
78
+ - latent_temp: [2.0, 0.5, 0.999995]
79
+ - extractor_mode: layer_norm
80
+ - layer_norm_first: true
81
+ - dropout_input: 0.0
82
+ - dropout_features: 0.0
83
+ - feature_grad_mult: 1.0
84
+ - encoder_embed_dim: 1024
85
+ - encoder_layers: 24
86
+ - encoder_ffn_embed_dim: 4096
87
+ - encoder_attention_heads: 16
88
+ - dropout: 0.0
89
+ - attention_dropout: 0.0
90
+ - activation_dropout: 0.0
91
+ - encoder_layerdrop: 0.0
92
+
93
+ ### Training results
94
+
95
+ | Training Loss | Epoch | Step | Validation Loss |
96
+ |:-------------:|:-----:|:-----:|:---------------:|
97
+ | 2.995 | 1 | 11831 | 2.865 |
98
+ | 2.392 | 5 | 59157 | 2.309 |
99
+ | 2.208 | 10 | 118395| 2.137 |
100
+ | 2.111 |14.075 | 166667| 2.067 |
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 🤗