GetmanY1 commited on
Commit
9f72410
·
verified ·
1 Parent(s): de61469

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +111 -0
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ tags:
5
+ - automatic-speech-recognition
6
+ - smi
7
+ - sami
8
+ - pretraining
9
+ ---
10
+ # Sámi 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 a more in-depth explanation of how to fine-tune the model.
15
+
16
+ **Note**: Fine-tuned version is available at [GetmanY1/wav2vec2-base-sami-22k-finetuned](https://huggingface.co/GetmanY1/wav2vec2-base-sami-22k-finetuned)
17
+
18
+ ## Model description
19
+
20
+ The Sámi 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 22.4k hours of unlabeled Sámi speech from [KAVI radio and television archive materials](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/).
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 Sámi 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 30 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
+ 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 radio hosts. 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 training 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 22.4k hours of Sámi speech data from the following sources:
41
+
42
+ | Dataset | Hours | % of total hours |
43
+ |:----------------------------------------------------------------------------------------------|:--------:|:----------------:|
44
+ | [YleSámiRadio](https://kavi.fi/en/radio-ja-televisioarkistointia-vuodesta-2008/) | 22415 h | 100 % |
45
+
46
+
47
+ Datasets were filtered to include a maximum length of 30 seconds long audio samples.
48
+
49
+ ## Training procedure
50
+
51
+ Training was done on 256 AMD MI250x GPU modules (512 GPUs from the software perspective), using [LUMI](https://www.lumi-supercomputer.eu/).
52
+
53
+ The training script was provided by Fairseq and it is available [here](https://github.com/facebookresearch/fairseq/tree/main/examples/wav2vec).
54
+
55
+ ### Training hyperparameters
56
+
57
+ The following hyperparameters were used during training:
58
+ - learning_rate: 6e-04
59
+ - max_update: 125000
60
+ - seed: 1
61
+ - optimizer: [8-bit Adam](https://github.com/facebookresearch/bitsandbytes) with betas=(0.9,0.98) and epsilon=1e-06
62
+ - lr_scheduler_type: linear
63
+ - lr_scheduler_warmup_updates: 3000
64
+ - fp16: true
65
+ - max_sample_size: 960000
66
+ - min_sample_size: 32000
67
+ - normalize: false
68
+ - max_tokens: 2800000
69
+ - distributed_world_size: 512
70
+
71
+ The pre-trained model was initialized with the following hyperparameters:
72
+ - quantize_targets: true
73
+ - latent_temp: [2.0, 0.5, 0.999995]
74
+ - extractor_mode: default
75
+ - layer_norm_first: false
76
+ - dropout_input: 0.1
77
+ - dropout_features: 0.1
78
+ - feature_grad_mult: 0.1
79
+ - encoder_embed_dim: 768
80
+ - encoder_layers: 12
81
+ - encoder_ffn_embed_dim: 3072
82
+ - encoder_attention_heads: 12
83
+ - activation_fn: gelu
84
+ - dropout: 0.1
85
+ - attention_dropout: 0.1
86
+ - activation_dropout: 0.0
87
+ - encoder_layerdrop: 0.0
88
+
89
+ ### Training results
90
+
91
+ | Training Loss | Epoch | Validation Loss |
92
+ |:-------------:|:------:|:---------------:|
93
+ | 4.888 | 1 | 4.919 |
94
+ | 2.699 | 25 | 2.485 |
95
+ | 2.532 | 50 | 2.369 |
96
+ | 2.446 | 75 | 2.240 |
97
+ | 2.385 | 100 | 2.229 |
98
+ | 2.354 | 116 | 2.202 |
99
+
100
+
101
+ ### Framework versions
102
+
103
+ - Pytorch 2.3.0+rocm6.0
104
+ - Fairseq 0.12.2
105
+
106
+ ## Team Members
107
+
108
+ - Yaroslav Getman, [Hugging Face profile](https://huggingface.co/GetmanY1), [LinkedIn profile](https://www.linkedin.com/in/yaroslav-getman/)
109
+ - Tamas Grosz, [Hugging Face profile](https://huggingface.co/Grosy), [LinkedIn profile](https://www.linkedin.com/in/tam%C3%A1s-gr%C3%B3sz-950a049a/)
110
+
111
+ Feel free to contact us for more details 🤗