Finnish Wav2vec2-Base

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.

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 for more in-detail explanation of how to fine-tune the model.

Note: Fine-tuned version is available at GetmanY1/wav2vec2-base-fi-150k-finetuned

Model description

The Finnish Wav2Vec2 Base has the same architecture and uses the same training objective as the English and multilingual one described in Paper. It is pre-trained on 158k hours of unlabeled Finnish speech, including KAVI radio and television archive materials, Lahjoita puhetta (Donate Speech), Finnish Parliament, Finnish VoxPopuli.

You can read more about the pre-trained model from this paper. The training scripts are available on GitHub.

Intended uses & limitations

You can use this model for Finnish ASR (speech-to-text) and SER (Spoken Emotion Recognition) tasks.

How to use

See this notebook for more information on how to fine-tune the model.

Limitations and bias

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.

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, 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.

Training data

This model was pre-trained with 158k hours of Finnish speech data from the following sources:

Dataset Hours % of total hours
Lahjoita puhetta 2740 h 1.74 %
Finnish Parliament 2692 h 1.71 %
VoxPopuli Finnish 14264 h 9.04 %
YlePuhe 95478 h 60.52 %
MTV3 16723 h 10.60 %
YleTV1 13947 h 8.84 %
AlfaTV 11933 h 7.56 %

Datasets were filtered to include a maximum length of 60 seconds long audio samples.

Training procedure

Training was done on 256 AMD MI250x GPU modules (512 GPUs from the software perspective), using LUMI, during the Second Finnish LUMI Extreme Scale.

Training script was provided by Fairseq and it is available here.

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 6e-04
  • max_update: 125000
  • seed: 1
  • optimizer: 8-bit Adam with betas=(0.9,0.98) and epsilon=1e-06
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_updates: 3000
  • fp16: true
  • max_sample_size: 960000
  • min_sample_size: 32000
  • normalize: false
  • max_tokens: 2800000
  • distributed_world_size: 512

The pre-trained model was initialized with the following hyperparameters:

  • quantize_targets: true
  • latent_temp: [2.0, 0.5, 0.999995]
  • extractor_mode: default
  • layer_norm_first: false
  • dropout_input: 0.1
  • dropout_features: 0.1
  • feature_grad_mult: 0.1
  • encoder_embed_dim: 768
  • encoder_layers: 12
  • encoder_ffn_embed_dim: 3072
  • encoder_attention_heads: 12
  • activation_fn: gelu
  • dropout: 0.1
  • attention_dropout: 0.1
  • activation_dropout: 0.0
  • encoder_layerdrop: 0.0

Training results

Training Loss Epoch Step Validation Loss
4.293 1 7537 3.13
2.577 5 37724 2.365
2.404 10 75457 2.219
2.319 15 113185 2.169
2.293 16.565 125000 2.149

Framework versions

  • Pytorch 1.13.1+rocm5.2
  • Fairseq 0.12.2

Team Members

Feel free to contact us for more details 🤗

Downloads last month
9
Safetensors
Model size
95M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for GetmanY1/wav2vec2-base-fi-150k

Finetunes
1 model

Collection including GetmanY1/wav2vec2-base-fi-150k