---
language:
- fi
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- fi
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-finnish
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: fi
    metrics:
       - name: Test WER
         type: wer
         value: 13.72
       - name: Test CER
         type: cer
         value: 2.35
---
# sammy786/wav2vec2-xlsr-finnish

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - fi dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 8.7555
- Wer: 23.0231

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv, invalidated.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|:----:|:-------------:|:---------------:|:--------:|
| 200  | 4.253700      | 0.881733        | 0.967007 |
| 400  | 0.864800      | 0.226977        | 0.420836 |
| 600  | 0.607000      | 0.157473        | 0.343375 |
| 800  | 0.380200      | 0.145640        | 0.302672 |
| 1000 | 0.318400      | 0.128028        | 0.293886 |
| 1200 | 0.261100      | 0.121414        | 0.289941 |
| 1400 | 0.232300      | 0.113451        | 0.279182 |
| 1600 | 0.216600      | 0.113649        | 0.282948 |
| 1800 | 0.202500      | 0.112375        | 0.276134 |
| 2000 | 0.190000      | 0.105725        | 0.273803 |
| 2200 | 0.171000      | 0.109715        | 0.270755 |
| 2400 | 0.156500      | 0.105042        | 0.264300 |
| 2600 | 0.155600      | 0.108337        | 0.260714 |
| 2800 | 0.149100      | 0.112435        | 0.263583 |
| 3000 | 0.145100      | 0.106193        | 0.261969 |
| 3200 | 0.131700      | 0.102860        | 0.251210 |
| 3400 | 0.129100      | 0.096058        | 0.246907 |
| 3600 | 0.121600      | 0.099932        | 0.246369 |
| 3800 | 0.112000      | 0.099041        | 0.244397 |
| 4000 | 0.114100      | 0.101566        | 0.242604 |
| 4200 | 0.111500      | 0.089498        | 0.239197 |
| 4400 | 0.099800      | 0.092835        | 0.240990 |
| 4600 | 0.095300      | 0.093518        | 0.238121 |
| 4800 | 0.094300      | 0.090783        | 0.240631 |
| 5000 | 0.089000      | 0.094046        | 0.238479 |
| 5200 | 0.088000      | 0.089342        | 0.235252 |
| 5400 | 0.083600      | 0.087770        | 0.234535 |
| 5600 | 0.083600      | 0.088804        | 0.234355 |
| 5800 | 0.080300      | 0.090168        | 0.231307 |
| 6000 | 0.078100      | 0.090163        | 0.230949 |
| 6200 | 0.075600      | 0.088876        | 0.232383 |
| 6400 | 0.078700      | 0.087235        | 0.232024 |
| 6600 | 0.074800      | 0.086825        | 0.231486 |
| 6800 | 0.076400      | 0.087308        | 0.231845 |
| 7000 | 0.070700      | 0.087695        | 0.230769 |
| 7200 | 0.075500      | 0.087555        | 0.230231 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-finnish --dataset mozilla-foundation/common_voice_8_0 --config fi --split test
```


---
language:
- mn
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- mn
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-mongolian
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: mn
    metrics:
       - name: Test WER
         type: wer
         value: 32.63
       - name: Test CER
         type: cer
         value: 9.26
---
# sammy786/wav2vec2-xlsr-mongolian
This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - mn dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 31.52
- Wer: 34.1522
## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.
## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv
## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.000045637994662983496
- train_batch_size: 16
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results
| Step | Training Loss | Validation Loss | Wer      |
|:----:|:-------------:|:---------------:|:--------:|
| 200  | 4.906200      | 3.012986        | 1.000000 |
| 400  | 1.734600      | 0.704821        | 0.750497 |
| 600  | 1.132100      | 0.496223        | 0.531241 |
| 800  | 0.929300      | 0.468937        | 0.469043 |
| 1000 | 0.772300      | 0.425313        | 0.448168 |
| 1200 | 0.623900      | 0.394633        | 0.414229 |
| 1400 | 0.512400      | 0.369225        | 0.397614 |
| 1600 | 0.439900      | 0.346033        | 0.391650 |
| 1800 | 0.391300      | 0.358454        | 0.379296 |
| 2000 | 0.377000      | 0.346822        | 0.359415 |
| 2200 | 0.347500      | 0.325205        | 0.348481 |
| 2400 | 0.343600      | 0.315233        | 0.344078 |
| 2600 | 0.328000      | 0.308826        | 0.341522 |
| 2800 | 0.358200      | 0.331786        | 0.343084 |
| 3000 | 0.417200      | 0.370051        | 0.356433 |
| 3200 | 0.685300      | 0.595438        | 0.407413 |
| 3400 | 0.764100      | 0.643449        | 0.359983 |
| 3600 | 0.717100      | 0.505033        | 0.371911 |
| 3800 | 0.620900      | 0.464138        | 0.369071 |
| 4000 | 0.590700      | 0.445417        | 0.363249 |
| 4200 | 0.561000      | 0.440727        | 0.360267 |
| 4400 | 0.550600      | 0.447122        | 0.360267 |
| 4600 | 0.562100      | 0.457020        | 0.359841 |
| 4800 | 0.578800      | 0.470477        | 0.360551 |
| 5000 | 0.580400      | 0.481413        | 0.362539 |
| 5200 | 0.605500      | 0.485240        | 0.362823 |
| 5400 | 0.582900      | 0.486654        | 0.362965 |
| 5600 | 0.593900      | 0.486715        | 0.363107 |
| 5800 | 0.590900      | 0.486716        | 0.363107 |
| 6000 | 0.587200      | 0.486716        | 0.363107 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3
#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-mongolian --dataset mozilla-foundation/common_voice_8_0 --config mn --split test
```


---
language: mn
datasets:
- common_voice
tags:
- audio
- automatic-speech-recognition
- speech
- xlsr-fine-tuning-week
license: apache-2.0
model-index:
- name: XLSR Wav2Vec2 Mongolian by Salim Shaikh
  results:
  - task:
      name: Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice mn
      type: common_voice
      args: {mn}
    metrics:
       - name: Test WER
         type: wer
         value: 38.14
---
# Wav2Vec2-Large-XLSR-53-Mongolian
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) in Mongolian using the [Common Voice](https://huggingface.co/datasets/common_voice)
When using this model, make sure that your speech input is sampled at 16kHz.
## Usage
The model can be used directly (without a language model) as follows:

```python

import torchaudio
from datasets import load_dataset, load_metric
from transformers import (
    Wav2Vec2ForCTC,
    Wav2Vec2Processor,
)
import torch
import re
import sys

model_name = "sammy786/wav2vec2-large-xlsr-mongolian"
device = "cuda"
chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“\\%\\‘\\”\\�\\)\\(\\*)]'

model = Wav2Vec2ForCTC.from_pretrained(model_name).to(device)
processor = Wav2Vec2Processor.from_pretrained(model_name)

ds = load_dataset("common_voice", "mn", split="test", data_dir="./cv-corpus-6.1-2020-12-11")

resampler = torchaudio.transforms.Resample(orig_freq=48_000, new_freq=16_000)

def map_to_array(batch):
    speech, _ = torchaudio.load(batch["path"])
    batch["speech"] = resampler.forward(speech.squeeze(0)).numpy()
    batch["sampling_rate"] = resampler.new_freq
    batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() + " "
    return batch

ds = ds.map(map_to_array)

def map_to_pred(batch):
    features = processor(batch["speech"], sampling_rate=batch["sampling_rate"][0], padding=True, return_tensors="pt")
    input_values = features.input_values.to(device)
    attention_mask = features.attention_mask.to(device)
    with torch.no_grad():
        logits = model(input_values, attention_mask=attention_mask).logits
    pred_ids = torch.argmax(logits, dim=-1)
    batch["predicted"] = processor.batch_decode(pred_ids)
    batch["target"] = batch["sentence"]
    return batch

result = ds.map(map_to_pred, batched=True, batch_size=1, remove_columns=list(ds.features.keys()))

wer = load_metric("wer")
print(wer.compute(predictions=result["predicted"], references=result["target"]))

```
**Test Result**: 38.14 %


---
language:
- ky
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- ky
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-kyrgyz
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: ky
    metrics:
       - name: Test WER
         type: wer
         value: 25.24
       - name: Test CER
         type: cer
         value: 6.25
---
# sammy786/wav2vec2-xlsr-kyrgyz

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - ky dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 43.06
- Wer: 39.19

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|------|---------------|-----------------|----------|
| 200  | 5.357800      | 2.700367        | 1.000000 |
| 400  | 1.513600      | 0.642542        | 0.598820 |
| 600  | 0.961900      | 0.530665        | 0.502739 |
| 800  | 0.776000      | 0.507709        | 0.462705 |
| 1000 | 0.646100      | 0.453115        | 0.444164 |
| 1200 | 0.581200      | 0.454797        | 0.438264 |
| 1400 | 0.437900      | 0.459389        | 0.426464 |
| 1600 | 0.348600      | 0.401247        | 0.416351 |
| 1800 | 0.312800      | 0.436135        | 0.409608 |
| 2000 | 0.294100      | 0.440911        | 0.398651 |
| 2200 | 0.281400      | 0.432729        | 0.394016 |
| 2400 | 0.258400      | 0.429860        | 0.393595 |
| 2600 | 0.263700      | 0.432689        | 0.395280 |
| 2800 | 0.256900      | 0.430672        | 0.391909 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-kyrgyz --dataset mozilla-foundation/common_voice_8_0 --config ky --split test
```


---
language:
- lt
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- lt
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-lithuanian
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: lt
    metrics:
       - name: Test WER
         type: wer
         value: 14.67
       - name: Test CER
         type: cer
         value: 2.77
---
# sammy786/wav2vec2-xlsr-lithuanian

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - lt dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 13.1811
- Wer: 24.2570

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 40
- mixed_precision_training: Native AMP

### Training results

| Step  | Training Loss | Validation Loss | Wer      |
|:-----:|:-------------:|:---------------:|:--------:|
| 200   | 5.718700      | 2.897032        | 1.000000 |
| 400   | 1.340000      | 0.309548        | 0.507284 |
| 600   | 0.799100      | 0.220205        | 0.402098 |
| 800   | 0.494400      | 0.185093        | 0.352855 |
| 1000  | 0.370800      | 0.165869        | 0.334207 |
| 1200  | 0.312500      | 0.159801        | 0.324009 |
| 1400  | 0.276100      | 0.148066        | 0.321678 |
| 1600  | 0.250100      | 0.153748        | 0.311626 |
| 1800  | 0.226400      | 0.147437        | 0.302885 |
| 2000  | 0.206900      | 0.141176        | 0.296037 |
| 2200  | 0.189900      | 0.142161        | 0.288170 |
| 2400  | 0.192100      | 0.138029        | 0.286568 |
| 2600  | 0.175600      | 0.139496        | 0.283654 |
| 2800  | 0.156900      | 0.138609        | 0.283217 |
| 3000  | 0.149400      | 0.140468        | 0.281906 |
| 3200  | 0.144600      | 0.132472        | 0.278263 |
| 3400  | 0.144100      | 0.141028        | 0.277535 |
| 3600  | 0.133000      | 0.134287        | 0.275495 |
| 3800  | 0.126600      | 0.149136        | 0.277681 |
| 4000  | 0.123500      | 0.132180        | 0.266463 |
| 4200  | 0.113000      | 0.137942        | 0.268211 |
| 4400  | 0.111700      | 0.140038        | 0.272873 |
| 4600  | 0.108600      | 0.136756        | 0.264132 |
| 4800  | 0.103600      | 0.137541        | 0.263403 |
| 5000  | 0.098000      | 0.140435        | 0.264860 |
| 5200  | 0.095800      | 0.136950        | 0.262383 |
| 5400  | 0.094000      | 0.128214        | 0.263986 |
| 5600  | 0.085300      | 0.125024        | 0.259761 |
| 5800  | 0.078900      | 0.128575        | 0.260198 |
| 6000  | 0.083300      | 0.135496        | 0.258887 |
| 6200  | 0.078800      | 0.131706        | 0.259178 |
| 6400  | 0.073800      | 0.128451        | 0.255390 |
| 6600  | 0.072600      | 0.131245        | 0.252768 |
| 6800  | 0.073300      | 0.131525        | 0.249417 |
| 7000  | 0.069000      | 0.128627        | 0.255536 |
| 7200  | 0.064400      | 0.127767        | 0.250583 |
| 7400  | 0.065400      | 0.129557        | 0.247815 |
| 7600  | 0.061200      | 0.129734        | 0.250146 |
| 7800  | 0.059100      | 0.135124        | 0.249709 |
| 8000  | 0.057000      | 0.132850        | 0.249126 |
| 8200  | 0.056100      | 0.128827        | 0.248252 |
| 8400  | 0.056400      | 0.130229        | 0.246795 |
| 8600  | 0.052800      | 0.128939        | 0.245775 |
| 8800  | 0.051100      | 0.131892        | 0.248543 |
| 9000  | 0.052900      | 0.132062        | 0.244464 |
| 9200  | 0.048200      | 0.130988        | 0.244172 |
| 9400  | 0.047700      | 0.131811        | 0.242570 |
| 9600  | 0.050000      | 0.133832        | 0.245484 |
| 9800  | 0.047500      | 0.134340        | 0.243881 |
| 10000 | 0.048400      | 0.133388        | 0.243590 |
| 10200 | 0.047800      | 0.132729        | 0.244464 |
| 10400 | 0.049000      | 0.131695        | 0.245047 |
| 10600 | 0.044400      | 0.132154        | 0.245484 |
| 10800 | 0.050100      | 0.131575        | 0.245192 |
| 11000 | 0.047700      | 0.131211        | 0.245192 |
| 11200 | 0.046000      | 0.131293        | 0.245047 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-lithuanian --dataset mozilla-foundation/common_voice_8_0 --config lt --split test
```


---
language:
- br
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- br
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-breton
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: br
    metrics:
       - name: Test WER
         type: wer
         value: 48.2
       - name: Test CER
         type: cer
         value: 15.02
---
# sammy786/wav2vec2-xlsr-breton

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - br dataset.

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 32
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 64
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-breton --dataset mozilla-foundation/common_voice_8_0 --config br --split test
```


---
language:
- dv
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- dv
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-dhivehi
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: dv
    metrics:
       - name: Test WER
         type: wer
         value: 26.91
       - name: Test CER
         type: cer
         value: 4.02

---
# sammy786/wav2vec2-xlsr-dhivehi

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - dv dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 14.86
- Wer: 29.32

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step  | Training Loss | Validation Loss | Wer      |
|-------|---------------|-----------------|----------|
| 200   | 4.883800      | 3.190218        | 1.000000 |
| 400   | 1.600100      | 0.497887        | 0.726159 |
| 600   | 0.928500      | 0.358781        | 0.603892 |
| 800   | 0.867900      | 0.309132        | 0.570786 |
| 1000  | 0.743100      | 0.309116        | 0.552954 |
| 1200  | 0.725100      | 0.266839        | 0.538378 |
| 1400  | 0.786200      | 0.259797        | 0.535897 |
| 1600  | 0.655700      | 0.245691        | 0.517290 |
| 1800  | 0.650500      | 0.246957        | 0.516204 |
| 2000  | 0.685500      | 0.234808        | 0.516204 |
| 2200  | 0.487100      | 0.228409        | 0.507753 |
| 2400  | 0.401300      | 0.221087        | 0.495968 |
| 2600  | 0.359300      | 0.212476        | 0.489301 |
| 2800  | 0.347300      | 0.204848        | 0.487750 |
| 3000  | 0.327000      | 0.203163        | 0.478756 |
| 3200  | 0.337100      | 0.210235        | 0.487595 |
| 3400  | 0.308900      | 0.201471        | 0.491316 |
| 3600  | 0.292600      | 0.192437        | 0.476120 |
| 3800  | 0.289600      | 0.198398        | 0.468445 |
| 4000  | 0.290200      | 0.193484        | 0.467204 |
| 4200  | 0.272600      | 0.193999        | 0.470150 |
| 4400  | 0.266700      | 0.187384        | 0.460769 |
| 4600  | 0.253800      | 0.187279        | 0.476663 |
| 4800  | 0.266400      | 0.197395        | 0.466817 |
| 5000  | 0.258000      | 0.188920        | 0.456660 |
| 5200  | 0.237200      | 0.180770        | 0.457358 |
| 5400  | 0.237900      | 0.178149        | 0.448287 |
| 5600  | 0.232600      | 0.179827        | 0.461002 |
| 5800  | 0.228500      | 0.182142        | 0.445185 |
| 6000  | 0.221000      | 0.173619        | 0.440688 |
| 6200  | 0.219500      | 0.172291        | 0.442859 |
| 6400  | 0.219400      | 0.173339        | 0.430609 |
| 6600  | 0.201900      | 0.177552        | 0.426423 |
| 6800  | 0.199000      | 0.173157        | 0.429834 |
| 7000  | 0.200000      | 0.166503        | 0.423709 |
| 7200  | 0.194600      | 0.171812        | 0.429834 |
| 7400  | 0.192100      | 0.164989        | 0.420530 |
| 7600  | 0.185000      | 0.168355        | 0.418825 |
| 7800  | 0.175100      | 0.168128        | 0.419290 |
| 8000  | 0.173500      | 0.167959        | 0.424950 |
| 8200  | 0.172200      | 0.173643        | 0.414793 |
| 8400  | 0.164200      | 0.167020        | 0.406342 |
| 8600  | 0.170800      | 0.168050        | 0.405334 |
| 8800  | 0.157900      | 0.164290        | 0.396573 |
| 9000  | 0.159900      | 0.163188        | 0.397426 |
| 9200  | 0.151700      | 0.164370        | 0.390991 |
| 9400  | 0.146600      | 0.165053        | 0.392852 |
| 9600  | 0.142200      | 0.164939        | 0.391844 |
| 9800  | 0.148300      | 0.164422        | 0.385719 |
| 10000 | 0.136200      | 0.166569        | 0.385951 |
| 10200 | 0.140700      | 0.161377        | 0.379594 |
| 10400 | 0.133300      | 0.165194        | 0.378276 |
| 10600 | 0.131300      | 0.164328        | 0.369205 |
| 10800 | 0.135500      | 0.160254        | 0.373236 |
| 11000 | 0.121100      | 0.163522        | 0.372693 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-dhivehi --dataset mozilla-foundation/common_voice_8_0 --config dv --split test
```


---
language:
- ba
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- ba
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-bashkir
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: ba
    metrics:
       - name: Test WER
         type: wer
         value: 11.32
       - name: Test CER
         type: cer
         value: 2.34
---
# sammy786/wav2vec2-xlsr-bashkir
This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - ba dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss:
- Wer:
## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.
## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv
## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.000045637994662983496
- train_batch_size: 16
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP
### Training results
| Step | Training Loss | Validation Loss | Wer      |
|:----:|:-------------:|:---------------:|:--------:|
| 200  | 5.387100      | 1.982867        | 1.000000 |
| 400  | 1.269800      | 0.369958        | 0.545755 |
| 600  | 0.903600      | 0.287705        | 0.465594 |
| 800  | 0.787300      | 0.235142        | 0.417091 |
| 1000 | 0.816300      | 0.206325        | 0.390534 |
| 1200 | 0.700500      | 0.197106        | 0.383987 |
| 1400 | 0.707100      | 0.179855        | 0.381368 |
| 1600 | 0.657800      | 0.181605        | 0.370593 |
| 1800 | 0.647800      | 0.168626        | 0.358767 |
| 2000 | 0.650700      | 0.164833        | 0.351483 |
| 2200 | 0.490900      | 0.168133        | 0.363309 |
| 2400 | 0.431000      | 0.161201        | 0.344350 |
| 2600 | 0.372100      | 0.160254        | 0.338280 |
| 2800 | 0.367500      | 0.150885        | 0.329687 |
| 3000 | 0.351300      | 0.154112        | 0.331392 |
| 3200 | 0.314800      | 0.147147        | 0.326700 |
| 3400 | 0.316800      | 0.142681        | 0.325090 |
| 3600 | 0.313000      | 0.138736        | 0.319553 |
| 3800 | 0.291800      | 0.138166        | 0.315570 |
| 4000 | 0.311300      | 0.135977        | 0.322894 |
| 4200 | 0.304900      | 0.128820        | 0.308627 |
| 4400 | 0.301600      | 0.129475        | 0.307440 |
| 4600 | 0.281800      | 0.131863        | 0.305967 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3
#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-bashkir --dataset mozilla-foundation/common_voice_8_0 --config ba --split test
```


---
language:
- bas
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- bas
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-basaa
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: bas
    metrics:
       - name: Test WER
         type: wer
         value: 41.23
       - name: Test CER
         type: cer
         value: 13.54
---
# sammy786/wav2vec2-xlsr-basaa

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - bas dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 21.39
- Wer: 30.99

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 16
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 70
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|------|---------------|-----------------|----------|
| 200  | 6.734100      | 1.605006        | 0.980456 |
| 400  | 1.011200      | 0.364686        | 0.442997 |
| 600  | 0.709300      | 0.300204        | 0.377850 |
| 800  | 0.469800      | 0.315612        | 0.405537 |
| 1000 | 0.464700      | 0.352494        | 0.372964 |
| 1200 | 0.421900      | 0.342533        | 0.368078 |
| 1400 | 0.401900      | 0.351398        | 0.343648 |
| 1600 | 0.429800      | 0.350570        | 0.348534 |
| 1800 | 0.352600      | 0.356601        | 0.358306 |
| 2000 | 0.387200      | 0.355814        | 0.356678 |
| 2200 | 0.362400      | 0.345573        | 0.355049 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-basaa --dataset mozilla-foundation/common_voice_8_0 --config bas --split test
```


---
language:
- ka
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- ka
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-czech
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: ka
    metrics:
       - name: Test WER
         type: wer
         value: 23.90
       - name: Test CER
         type: cer
         value: 3.59

---
# sammy786/wav2vec2-xlsr-georgian

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - ka dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 10.54
- Wer: 27.53

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|:----:|:-------------:|:---------------:|:--------:|
| 200  | 4.152100      | 0.823672        | 0.967814 |
| 400  | 0.889500      | 0.196740        | 0.444792 |
| 600  | 0.493700      | 0.155659        | 0.366115 |
| 800  | 0.328000      | 0.138066        | 0.358069 |
| 1000 | 0.260600      | 0.119236        | 0.324989 |
| 1200 | 0.217200      | 0.114050        | 0.313366 |
| 1400 | 0.188800      | 0.112600        | 0.302190 |
| 1600 | 0.166900      | 0.111154        | 0.295485 |
| 1800 | 0.155500      | 0.109963        | 0.286544 |
| 2000 | 0.140400      | 0.107587        | 0.277604 |
| 2200 | 0.142600      | 0.105662        | 0.277157 |
| 2400 | 0.135400      | 0.105414        | 0.275369 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-georgian --dataset mozilla-foundation/common_voice_8_0 --config ka --split test
```


---
language:
- tt
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- tt
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-tatar
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: tt
    metrics:
       - name: Test WER
         type: wer
         value: 16.87
       - name: Test CER
         type: cer
         value: 3.64
---
# sammy786/wav2vec2-xlsr-tatar

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - tt dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 7.66
- Wer: 7.08

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 16
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 40
- mixed_precision_training: Native AMP

### Training results

| Step  | Training Loss | Validation Loss | Wer      |
|-------|---------------|-----------------|----------|
| 200   | 4.849400      | 1.874908        | 0.995232 |
| 400   | 1.105700      | 0.257292        | 0.367658 |
| 600   | 0.723000      | 0.181150        | 0.250513 |
| 800   | 0.660600      | 0.167009        | 0.226078 |
| 1000  | 0.568000      | 0.135090        | 0.177339 |
| 1200  | 0.721200      | 0.117469        | 0.166413 |
| 1400  | 0.416300      | 0.115142        | 0.153765 |
| 1600  | 0.346000      | 0.105782        | 0.153963 |
| 1800  | 0.279700      | 0.102452        | 0.146149 |
| 2000  | 0.273800      | 0.095818        | 0.128468 |
| 2200  | 0.252900      | 0.102302        | 0.133766 |
| 2400  | 0.255100      | 0.096592        | 0.121316 |
| 2600  | 0.229600      | 0.091263        | 0.124561 |
| 2800  | 0.213900      | 0.097748        | 0.125687 |
| 3000  | 0.210700      | 0.091244        | 0.125422 |
| 3200  | 0.202600      | 0.084076        | 0.106284 |
| 3400  | 0.200900      | 0.093809        | 0.113238 |
| 3600  | 0.192700      | 0.082918        | 0.108139 |
| 3800  | 0.182000      | 0.084487        | 0.103371 |
| 4000  | 0.167700      | 0.091847        | 0.104960 |
| 4200  | 0.183700      | 0.085223        | 0.103040 |
| 4400  | 0.174400      | 0.083862        | 0.100589 |
| 4600  | 0.163100      | 0.086493        | 0.099728 |
| 4800  | 0.162000      | 0.081734        | 0.097543 |
| 5000  | 0.153600      | 0.077223        | 0.092974 |
| 5200  | 0.153700      | 0.086217        | 0.090789 |
| 5400  | 0.140200      | 0.093256        | 0.100457 |
| 5600  | 0.142900      | 0.086903        | 0.097742 |
| 5800  | 0.131400      | 0.083068        | 0.095225 |
| 6000  | 0.126000      | 0.086642        | 0.091252 |
| 6200  | 0.135300      | 0.083387        | 0.091186 |
| 6400  | 0.126100      | 0.076479        | 0.086352 |
| 6600  | 0.127100      | 0.077868        | 0.086153 |
| 6800  | 0.118000      | 0.083878        | 0.087676 |
| 7000  | 0.117600      | 0.085779        | 0.091054 |
| 7200  | 0.113600      | 0.084197        | 0.084233 |
| 7400  | 0.112000      | 0.078688        | 0.081319 |
| 7600  | 0.110200      | 0.082534        | 0.086087 |
| 7800  | 0.106400      | 0.077245        | 0.080988 |
| 8000  | 0.102300      | 0.077497        | 0.079332 |
| 8200  | 0.109500      | 0.079083        | 0.088339 |
| 8400  | 0.095900      | 0.079721        | 0.077809 |
| 8600  | 0.094700      | 0.079078        | 0.079730 |
| 8800  | 0.097400      | 0.078785        | 0.079200 |
| 9000  | 0.093200      | 0.077445        | 0.077015 |
| 9200  | 0.088700      | 0.078207        | 0.076617 |
| 9400  | 0.087200      | 0.078982        | 0.076485 |
| 9600  | 0.089900      | 0.081209        | 0.076021 |
| 9800  | 0.081900      | 0.078158        | 0.075757 |
| 10000 | 0.080200      | 0.078074        | 0.074498 |
| 10200 | 0.085000      | 0.078830        | 0.073373 |
| 10400 | 0.080400      | 0.078144        | 0.073373 |
| 10600 | 0.078200      | 0.077163        | 0.073902 |
| 10800 | 0.080900      | 0.076394        | 0.072446 |
| 11000 | 0.080700      | 0.075955        | 0.071585 |
| 11200 | 0.076800      | 0.077031        | 0.072313 |
| 11400 | 0.076300      | 0.077401        | 0.072777 |
| 11600 | 0.076700      | 0.076613        | 0.071916 |
| 11800 | 0.076000      | 0.076672        | 0.071916 |
| 12000 | 0.077200      | 0.076490        | 0.070989 |
| 12200 | 0.076200      | 0.076688        | 0.070856 |
| 12400 | 0.074400      | 0.076780        | 0.071055 |
| 12600 | 0.076300      | 0.076768        | 0.071320 |
| 12800 | 0.077600      | 0.076727        | 0.071055 |
| 13000 | 0.077700      | 0.076714        | 0.071254 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-tatar --dataset mozilla-foundation/common_voice_8_0 --config tt --split test
```


---
language:
- ia
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- ia
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-interlingua
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: ia
    metrics:
       - name: Test WER
         type: wer
         value: 16.81
       - name: Test CER
         type: cer
         value: 4.76
---
# sammy786/wav2vec2-xlsr-interlingua

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - ia dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 5.44
- Wer: 19.78

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 16
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|------|---------------|-----------------|----------|
| 200  | 4.649200      | 0.483339        | 0.511322 |
| 400  | 0.764700      | 0.133428        | 0.251288 |
| 600  | 0.563700      | 0.099292        | 0.227745 |
| 800  | 0.438800      | 0.087545        | 0.217445 |
| 1000 | 0.406800      | 0.072313        | 0.213848 |
| 1200 | 0.237500      | 0.066965        | 0.213766 |
| 1400 | 0.177800      | 0.064419        | 0.208126 |
| 1600 | 0.157100      | 0.065962        | 0.214011 |
| 1800 | 0.146600      | 0.059477        | 0.202076 |
| 2000 | 0.132800      | 0.055015        | 0.201831 |
| 2200 | 0.122000      | 0.055421        | 0.201749 |
| 2400 | 0.115700      | 0.054462        | 0.197826 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-interlingua --dataset mozilla-foundation/common_voice_8_0 --config ia --split test
```


---
language:
- cv
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- cv
- robust-speech-event
- model_for_talk
datasets:
- mozilla-foundation/common_voice_8_0

model-index:
- name: sammy786/wav2vec2-xlsr-chuvash
  results:
  - task:
      name: Automatic Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice 8
      type: mozilla-foundation/common_voice_8_0
      args: cv
    metrics:
       - name: Test WER
         type: wer
         value: 27.81
       - name: Test CER
         type: cer
         value: 5.79
---
# sammy786/wav2vec2-xlsr-chuvash

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - cv dataset.
It achieves the following results on evaluation set (which is 10 percent of train data set merged with other and dev datasets):
- Loss: 18.02
- Wer: 29.22

## Model description
"facebook/wav2vec2-xls-r-1b" was finetuned.

## Intended uses & limitations
More information needed
## Training and evaluation data
Training data -
Common voice Finnish train.tsv, dev.tsv and other.tsv

## Training procedure
For creating the train dataset, all possible datasets were appended and 90-10 split was used.

### Training hyperparameters

The following hyperparameters were used during training:

- learning_rate: 0.000045637994662983496
- train_batch_size: 8
- eval_batch_size: 16
- seed: 13
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine_with_restarts
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Step | Training Loss | Validation Loss | Wer      |
|:----:|:-------------:|:---------------:|:--------:|
| 200  | 6.559100      | 2.274687        | 1.000000 |
| 400  | 1.346100      | 0.508268        | 0.681995 |
| 600  | 0.797500      | 0.391174        | 0.572876 |
| 800  | 0.556300      | 0.308620        | 0.489283 |
| 1000 | 0.435800      | 0.273956        | 0.454014 |
| 1200 | 0.388700      | 0.311027        | 0.499415 |
| 1400 | 0.338300      | 0.243977        | 0.413874 |
| 1600 | 0.294000      | 0.214134        | 0.385230 |
| 1800 | 0.276000      | 0.245991        | 0.397311 |
| 2000 | 0.253900      | 0.208324        | 0.363016 |
| 2200 | 0.233600      | 0.222156        | 0.370811 |
| 2400 | 0.219700      | 0.202602        | 0.364186 |
| 2600 | 0.205000      | 0.241339        | 0.384451 |
| 2800 | 0.176000      | 0.263558        | 0.384061 |
| 3000 | 0.166700      | 0.211768        | 0.333398 |
| 3200 | 0.160600      | 0.198677        | 0.321512 |
| 3400 | 0.154600      | 0.208655        | 0.328722 |
| 3600 | 0.146800      | 0.188022        | 0.317810 |
| 3800 | 0.133200      | 0.181083        | 0.313133 |
| 4000 | 0.134200      | 0.190084        | 0.316251 |
| 4200 | 0.114200      | 0.193034        | 0.312159 |
| 4400 | 0.117300      | 0.194122        | 0.312354 |
| 4600 | 0.112300      | 0.191111        | 0.305534 |
| 4800 | 0.107800      | 0.185930        | 0.302611 |
| 5000 | 0.100400      | 0.178625        | 0.299883 |
| 5200 | 0.099800      | 0.176442        | 0.294622 |
| 5400 | 0.100800      | 0.177935        | 0.294427 |
| 5600 | 0.096300      | 0.182903        | 0.293843 |
| 5800 | 0.094200      | 0.181041        | 0.293453 |
| 6000 | 0.097600      | 0.179865        | 0.290725 |
| 6200 | 0.091600      | 0.180327        | 0.292868 |
| 6400 | 0.093100      | 0.180275        | 0.292284 |

### Framework versions
- Transformers 4.16.0.dev0
- Pytorch 1.10.0+cu102
- Datasets 1.17.1.dev0
- Tokenizers 0.10.3

#### Evaluation Commands

1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id sammy786/wav2vec2-xlsr-chuvash --dataset mozilla-foundation/common_voice_8_0 --config cv --split test
```


#### MathBERT model (original vocab)

*Disclaimer: the format of the documentation follows the official BERT model readme.md*

Pretrained model on pre-k to graduate math language (English) using a masked language modeling (MLM) objective. This model is uncased: it does not make a difference between english and English.

#### Model description
MathBERT is a transformers model pretrained on a large corpus of English math corpus data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was pretrained with two objectives:

Masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence.
Next sentence prediction (NSP): the models concatenates two masked sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not.
This way, the model learns an inner representation of the math language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the MathBERT model as inputs.

#### Intended uses & limitations
You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a math-related downstream task.

Note that this model is primarily aimed at being fine-tuned on math-related tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as math text generation you should look at model like GPT2.

#### How to use

Here is how to use this model to get the features of a given text in PyTorch:

```from transformers import BertTokenizer, BertModel
tokenizer = BertTokenizer.from_pretrained('tbs17/MathBERT'，output_hidden_states=True)
model = BertModel.from_pretrained("tbs17/MathBERT")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(encoded_input)
```
and in TensorFlow:

```
from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('tbs17/MathBERT',output_hidden_states=True)
model = TFBertModel.from_pretrained("tbs17/MathBERT")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
```

#### Comparing to the original BERT on fill-mask tasks
The original BERT (i.e.,bert-base-uncased) has a known issue of biased predictions in gender although its training data used was fairly neutral. As our model was not trained on general corpora which will most likely contain mathematical equations, symbols, jargon, our model won't show bias. See below:
##### from original BERT
```
>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='bert-base-uncased')
>>> unmasker("The man worked as a [MASK].")

[{'sequence': '[CLS] the man worked as a carpenter. [SEP]',
  'score': 0.09747550636529922,
  'token': 10533,
  'token_str': 'carpenter'},
 {'sequence': '[CLS] the man worked as a waiter. [SEP]',
  'score': 0.0523831807076931,
  'token': 15610,
  'token_str': 'waiter'},
 {'sequence': '[CLS] the man worked as a barber. [SEP]',
  'score': 0.04962705448269844,
  'token': 13362,
  'token_str': 'barber'},
 {'sequence': '[CLS] the man worked as a mechanic. [SEP]',
  'score': 0.03788609802722931,
  'token': 15893,
  'token_str': 'mechanic'},
 {'sequence': '[CLS] the man worked as a salesman. [SEP]',
  'score': 0.037680890411138535,
  'token': 18968,
  'token_str': 'salesman'}]

>>> unmasker("The woman worked as a [MASK].")

[{'sequence': '[CLS] the woman worked as a nurse. [SEP]',
  'score': 0.21981462836265564,
  'token': 6821,
  'token_str': 'nurse'},
 {'sequence': '[CLS] the woman worked as a waitress. [SEP]',
  'score': 0.1597415804862976,
  'token': 13877,
  'token_str': 'waitress'},
 {'sequence': '[CLS] the woman worked as a maid. [SEP]',
  'score': 0.1154729500412941,
  'token': 10850,
  'token_str': 'maid'},
 {'sequence': '[CLS] the woman worked as a prostitute. [SEP]',
  'score': 0.037968918681144714,
  'token': 19215,
  'token_str': 'prostitute'},
 {'sequence': '[CLS] the woman worked as a cook. [SEP]',
  'score': 0.03042375110089779,
  'token': 5660,
  'token_str': 'cook'}]
  ```
  ##### from MathBERT

  ```
  >>> from transformers import pipeline
 >>> unmasker = pipeline('fill-mask', model='tbs17/MathBERT')
 >>> unmasker("The man worked as a [MASK].")
  [{'score': 0.6469377875328064,
  'sequence': 'the man worked as a book.',
  'token': 2338,
  'token_str': 'book'},
 {'score': 0.07073448598384857,
  'sequence': 'the man worked as a guide.',
  'token': 5009,
  'token_str': 'guide'},
 {'score': 0.031362924724817276,
  'sequence': 'the man worked as a text.',
  'token': 3793,
  'token_str': 'text'},
 {'score': 0.02306508645415306,
  'sequence': 'the man worked as a man.',
  'token': 2158,
  'token_str': 'man'},
 {'score': 0.020547250285744667,
  'sequence': 'the man worked as a distance.',
  'token': 3292,
  'token_str': 'distance'}]

  >>> unmasker("The woman worked as a [MASK].")

[{'score': 0.8999770879745483,
  'sequence': 'the woman worked as a woman.',
  'token': 2450,
  'token_str': 'woman'},
 {'score': 0.025878004729747772,
  'sequence': 'the woman worked as a guide.',
  'token': 5009,
  'token_str': 'guide'},
 {'score': 0.006881994660943747,
  'sequence': 'the woman worked as a table.',
  'token': 2795,
  'token_str': 'table'},
 {'score': 0.0066248285584151745,
  'sequence': 'the woman worked as a b.',
  'token': 1038,
  'token_str': 'b'},
 {'score': 0.00638660229742527,
  'sequence': 'the woman worked as a book.',
  'token': 2338,
  'token_str': 'book'}]
```
***From above, one can tell that MathBERT is specifically designed for mathematics related tasks and works better with mathematical problem text fill-mask tasks instead of general purpose fill-mask tasks.***

```
  >>> unmasker("students apply these new understandings as they reason about and perform decimal [MASK] through the hundredths place.")
  #the sentence is taken from a curriculum introduction paragraph on engageny.org: https://www.engageny.org/resource/grade-5-mathematics-module-1
[{'score': 0.832804799079895,
  'sequence': 'students apply these new understandings as they reason about and perform decimal numbers through the hundredths place.',
  'token': 3616,
  'token_str': 'numbers'},
 {'score': 0.0865366980433464,
  'sequence': 'students apply these new understandings as they reason about and perform decimals through the hundredths place.',
  'token': 2015,
  'token_str': '##s'},
 {'score': 0.03134258836507797,
  'sequence': 'students apply these new understandings as they reason about and perform decimal operations through the hundredths place.',
  'token': 3136,
  'token_str': 'operations'},
 {'score': 0.01993160881102085,
  'sequence': 'students apply these new understandings as they reason about and perform decimal placement through the hundredths place.',
  'token': 11073,
  'token_str': 'placement'},
 {'score': 0.012547064572572708,
  'sequence': 'students apply these new understandings as they reason about and perform decimal places through the hundredths place.',
  'token': 3182,
  'token_str': 'places'}]
```
***Therefore, to try the 'fill-mask' hosted API on the right corner of the page, please use the sentences similar to below:***

```
1 tenth times any [MASK] on the place value chart moves it one place value to the right. #from https://www.engageny.org/resource/grade-5-mathematics-module-1
```

#### Training data
The MathBERT model was pretrained on pre-k to HS math curriculum (engageNY, Utah Math, Illustrative Math), college math books from openculture.com as well as graduate level math from arxiv math paper abstracts. There is about 100M tokens got pretrained on.

#### Training procedure

The texts are lowercased and tokenized using WordPiece and a vocabulary size of 30,522 which is from original BERT vocab.txt. The inputs of the model are then of the form:

```
[CLS] Sentence A [SEP] Sentence B [SEP]
```
With probability 0.5, sentence A and sentence B correspond to two consecutive sentence spans from the original corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence, but less than 512 tokens.

The details of the masking procedure for each sentence are the following:

+ 15% of the tokens are masked.
+ In 80% of the cases, the masked tokens are replaced by [MASK].
+ In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
+ In the 10% remaining cases, the masked tokens are left as is.

#### Pretraining
The model was trained on a 8-core cloud TPUs from Google Colab for 600k steps with a batch size of 128. The sequence length was limited to 512 for the entire time. The optimizer used is Adam with a learning rate of 5e-5, beta_{1} = 0.9 and beta_{2} =0.999, a weight decay of 0.01, learning rate warmup for 10,000 steps and linear decay of the learning rate after.

You can refer to the training and fine-tuning code at https://github.com/tbs17/MathBERT.


#### MathBERT model (custom vocab)

Pretrained model on pre-k to graduate math language (English) using a masked language modeling (MLM) objective. This model is uncased: it does not make a difference between english and English.

#### Model description
MathBERT is a transformers model pretrained on a large corpus of English math corpus data in a self-supervised fashion. This means it was pretrained on the raw texts only, with no humans labelling them in any way (which is why it can use lots of publicly available data) with an automatic process to generate inputs and labels from those texts. More precisely, it was pretrained with two objectives:

Masked language modeling (MLM): taking a sentence, the model randomly masks 15% of the words in the input then run the entire masked sentence through the model and has to predict the masked words. This is different from traditional recurrent neural networks (RNNs) that usually see the words one after the other, or from autoregressive models like GPT which internally mask the future tokens. It allows the model to learn a bidirectional representation of the sentence.
Next sentence prediction (NSP): the models concatenates two masked sentences as inputs during pretraining. Sometimes they correspond to sentences that were next to each other in the original text, sometimes not. The model then has to predict if the two sentences were following each other or not.
This way, the model learns an inner representation of the math language that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled sentences for instance, you can train a standard classifier using the features produced by the MathBERT model as inputs.

#### Intended uses & limitations
You can use the raw model for either masked language modeling or next sentence prediction, but it's mostly intended to be fine-tuned on a math-related downstream task.

Note that this model is primarily aimed at being fine-tuned on math-related tasks that use the whole sentence (potentially masked) to make decisions, such as sequence classification, token classification or question answering. For tasks such as math text generation you should look at model like GPT2.

#### How to use
<!---You can use this model directly with a pipeline for masked language modeling:

>>> from transformers import pipeline
>>> unmasker = pipeline('fill-mask', model='bert-base-uncased')
>>> unmasker("Hello I'm a [MASK] model.")

[{'sequence': "[CLS] hello i'm a fashion model. [SEP]",
  'score': 0.1073106899857521,
  'token': 4827,
  'token_str': 'fashion'},
 {'sequence': "[CLS] hello i'm a role model. [SEP]",
  'score': 0.08774490654468536,
  'token': 2535,
  'token_str': 'role'},
 {'sequence': "[CLS] hello i'm a new model. [SEP]",
  'score': 0.05338378623127937,
  'token': 2047,
  'token_str': 'new'},
 {'sequence': "[CLS] hello i'm a super model. [SEP]",
  'score': 0.04667217284440994,
  'token': 3565,
  'token_str': 'super'},
 {'sequence': "[CLS] hello i'm a fine model. [SEP]",
  'score': 0.027095865458250046,
  'token': 2986,
  'token_str': 'fine'}]--->

Here is how to use this model to get the features of a given text in PyTorch:

```from transformers import BertTokenizer, BertModel
tokenizer = BertTokenizer.from_pretrained('tbs17/MathBERT-custom')
model = BertModel.from_pretrained("tbs17/MathBERT-custom")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(encoded_input)
```
and in TensorFlow:

```
from transformers import BertTokenizer, TFBertModel
tokenizer = BertTokenizer.from_pretrained('tbs17/MathBERT-custom')
model = TFBertModel.from_pretrained("tbs17/MathBERT-custom")
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='tf')
output = model(encoded_input)
```

#### Warning

MathBERT is specifically designed for mathematics related tasks and works better with mathematical problem text fill-mask tasks instead of general purpose fill-mask tasks. See the below example:

```
  >>> from transformers import pipeline
 >>> unmasker = pipeline('fill-mask', model='tbs17/MathBERT')
 # Below is desired usage
  >>> unmasker("students apply these new understandings as they reason about and perform decimal [MASK] through the hundredths place.")

[{'score': 0.832804799079895,
  'sequence': 'students apply these new understandings as they reason about and perform decimal numbers through the hundredths place.',
  'token': 3616,
  'token_str': 'numbers'},
 {'score': 0.0865366980433464,
  'sequence': 'students apply these new understandings as they reason about and perform decimals through the hundredths place.',
  'token': 2015,
  'token_str': '##s'},
 {'score': 0.03134258836507797,
  'sequence': 'students apply these new understandings as they reason about and perform decimal operations through the hundredths place.',
  'token': 3136,
  'token_str': 'operations'},
 {'score': 0.01993160881102085,
  'sequence': 'students apply these new understandings as they reason about and perform decimal placement through the hundredths place.',
  'token': 11073,
  'token_str': 'placement'},
 {'score': 0.012547064572572708,
  'sequence': 'students apply these new understandings as they reason about and perform decimal places through the hundredths place.',
  'token': 3182,
  'token_str': 'places'}]

  #Below is not the desired usage
   >>> unmasker("The man worked as a [MASK].")

  [{'score': 0.6469377875328064,
  'sequence': 'the man worked as a book.',
  'token': 2338,
  'token_str': 'book'},
 {'score': 0.07073448598384857,
  'sequence': 'the man worked as a guide.',
  'token': 5009,
  'token_str': 'guide'},
 {'score': 0.031362924724817276,
  'sequence': 'the man worked as a text.',
  'token': 3793,
  'token_str': 'text'},
 {'score': 0.02306508645415306,
  'sequence': 'the man worked as a man.',
  'token': 2158,
  'token_str': 'man'},
 {'score': 0.020547250285744667,
  'sequence': 'the man worked as a distance.',
  'token': 3292,
  'token_str': 'distance'}]
```

### Training data
The BERT model was pretrained on pre-k to HS math curriculum (engageNY, Utah Math, Illustrative Math), college math books from openculture.com as well as graduate level math from arxiv math paper abstracts. There is about 100M tokens got pretrained on.

#### Training procedure

The texts are lowercased and tokenized using WordPiece and a customized vocabulary size of 30,522. We use the ```bert_tokenizer``` from huggingface tokenizers library to generate a custom vocab file from our training raw math texts. The inputs of the model are then of the form:

```
[CLS] Sentence A [SEP] Sentence B [SEP]
```
With probability 0.5, sentence A and sentence B correspond to two consecutive sentences in the original corpus and in the other cases, it's another random sentence in the corpus. Note that what is considered a sentence here is a consecutive span of text usually longer than a single sentence. The only constrain is that the result with the two "sentences" has a combined length of less than 512 tokens.

The details of the masking procedure for each sentence are the following:

+ 15% of the tokens are masked.
+ In 80% of the cases, the masked tokens are replaced by [MASK].
+ In 10% of the cases, the masked tokens are replaced by a random token (different) from the one they replace.
+ In the 10% remaining cases, the masked tokens are left as is.

#### Pretraining
The model was trained on a 8-core cloud TPUs from Google Colab for 600k steps with a batch size of 128. The sequence length was limited to 512 for the entire time. The optimizer used is Adam with a learning rate of 5e-5, beta_{1} = 0.9 and beta_{2} =0.999, a weight decay of 0.01, learning rate warmup for 10,000 steps and linear decay of the learning rate after.


---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- glue
metrics:
- matthews_correlation
model-index:
- name: distilbert-base-uncased-finetuned-cola
  results:
  - task:
      name: Text Classification
      type: text-classification
    dataset:
      name: glue
      type: glue
      args: cola
    metrics:
    - name: Matthews Correlation
      type: matthews_correlation
      value: 0.535587402888147
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# distilbert-base-uncased-finetuned-cola

This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the glue dataset.
It achieves the following results on the evaluation set:
- Loss: 0.7335
- Matthews Correlation: 0.5356

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 5

### Training results

| Training Loss | Epoch | Step | Validation Loss | Matthews Correlation |
|:-------------:|:-----:|:----:|:---------------:|:--------------------:|
| 0.5309        | 1.0   | 535  | 0.5070          | 0.4239               |
| 0.3568        | 2.0   | 1070 | 0.5132          | 0.4913               |
| 0.24          | 3.0   | 1605 | 0.6081          | 0.4990               |
| 0.1781        | 4.0   | 2140 | 0.7335          | 0.5356               |
| 0.1243        | 5.0   | 2675 | 0.8705          | 0.5242               |

### Framework versions

- Transformers 4.11.3
- Pytorch 1.9.0+cu111
- Datasets 1.13.3
- Tokenizers 0.10.3


---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- common_voice
model-index:
- name: wav2vec2-large-xls-r-300m-pt-colab
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-large-xls-r-300m-pt-colab

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3637
- Wer: 0.2982

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 30
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step  | Validation Loss | Wer    |
|:-------------:|:-----:|:-----:|:---------------:|:------:|
| 4.591         | 1.15  | 400   | 0.9128          | 0.6517 |
| 0.5049        | 2.31  | 800   | 0.4596          | 0.4437 |
| 0.2871        | 3.46  | 1200  | 0.3964          | 0.3905 |
| 0.2077        | 4.61  | 1600  | 0.3958          | 0.3744 |
| 0.1695        | 5.76  | 2000  | 0.4040          | 0.3720 |
| 0.1478        | 6.92  | 2400  | 0.3866          | 0.3651 |
| 0.1282        | 8.07  | 2800  | 0.3987          | 0.3674 |
| 0.1134        | 9.22  | 3200  | 0.4128          | 0.3688 |
| 0.1048        | 10.37 | 3600  | 0.3928          | 0.3561 |
| 0.0938        | 11.53 | 4000  | 0.4048          | 0.3619 |
| 0.0848        | 12.68 | 4400  | 0.4229          | 0.3555 |
| 0.0798        | 13.83 | 4800  | 0.3974          | 0.3468 |
| 0.0688        | 14.98 | 5200  | 0.3870          | 0.3503 |
| 0.0658        | 16.14 | 5600  | 0.3875          | 0.3351 |
| 0.061         | 17.29 | 6000  | 0.4133          | 0.3417 |
| 0.0569        | 18.44 | 6400  | 0.3915          | 0.3414 |
| 0.0526        | 19.6  | 6800  | 0.3957          | 0.3231 |
| 0.0468        | 20.75 | 7200  | 0.4110          | 0.3301 |
| 0.0407        | 21.9  | 7600  | 0.3866          | 0.3186 |
| 0.0384        | 23.05 | 8000  | 0.3976          | 0.3193 |
| 0.0363        | 24.21 | 8400  | 0.3910          | 0.3177 |
| 0.0313        | 25.36 | 8800  | 0.3656          | 0.3109 |
| 0.0293        | 26.51 | 9200  | 0.3712          | 0.3092 |
| 0.0277        | 27.66 | 9600  | 0.3613          | 0.3054 |
| 0.0249        | 28.82 | 10000 | 0.3783          | 0.3015 |
| 0.0234        | 29.97 | 10400 | 0.3637          | 0.2982 |

### Framework versions

- Transformers 4.11.3
- Pytorch 1.10.0+cu102
- Datasets 1.13.3
- Tokenizers 0.10.3


---
tags:
- generated_from_trainer
datasets:
- common_voice
model-index:
- name: wav2vec2-300M-teste2
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-300M-teste2

This model was trained from scratch on the common_voice dataset.

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 1
- mixed_precision_training: Native AMP

### Training results

### Framework versions

- Transformers 4.11.3
- Pytorch 1.9.1+cu102
- Datasets 1.17.0
- Tokenizers 0.10.3


---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- common_voice
model-index:
- name: wav2vec2-300m-teste4
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-300m-teste4

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 0.3276
- Wer: 0.3489

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 500
- num_epochs: 4
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Wer    |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 10.0237       | 0.49  | 100  | 4.2075          | 0.9792 |
| 3.313         | 0.98  | 200  | 3.0232          | 0.9792 |
| 2.9469        | 1.47  | 300  | 2.7591          | 0.9792 |
| 1.4217        | 1.96  | 400  | 0.8397          | 0.6219 |
| 0.5598        | 2.45  | 500  | 0.6085          | 0.5087 |
| 0.4507        | 2.94  | 600  | 0.4512          | 0.4317 |
| 0.2775        | 3.43  | 700  | 0.3839          | 0.3751 |
| 0.2047        | 3.92  | 800  | 0.3276          | 0.3489 |

### Framework versions

- Transformers 4.11.3
- Pytorch 1.9.1+cu102
- Datasets 1.17.0
- Tokenizers 0.10.3


---
language: ta
datasets:
- common_voice
metrics:
- wer
tags:
- audio
- automatic-speech-recognition
- speech
- xlsr-fine-tuning-week
license: apache-2.0
model-index:
- name: Anurag Singh XLSR Wav2Vec2 Large 53 Tamil
  results:
  - task:
      name: Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice ta
      type: common_voice
      args: ta
    metrics:
       - name: Test WER
         type: wer
         value: 71.87
---
# Wav2Vec2-Large-XLSR-53-Tamil
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Tamil using the [Common Voice](https://huggingface.co/datasets/common_voice).
When using this model, make sure that your speech input is sampled at 16kHz.
## Usage
The model can be used directly (without a language model) as follows:
```python
import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
test_dataset = load_dataset("common_voice", "ta", split="test[:2%]")
processor = Wav2Vec2Processor.from_pretrained("anuragshas/wav2vec2-xlsr-53-tamil")
model = Wav2Vec2ForCTC.from_pretrained("anuragshas/wav2vec2-xlsr-53-tamil")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
    logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
predicted_ids = torch.argmax(logits, dim=-1)
print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset["sentence"][:2])
```
## Evaluation
The model can be evaluated as follows on the Tamil test data of Common Voice.
```python
import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re
test_dataset = load_dataset("common_voice", "ta", split="test")
wer = load_metric("wer")
processor = Wav2Vec2Processor.from_pretrained("anuragshas/wav2vec2-xlsr-53-tamil")
model = Wav2Vec2ForCTC.from_pretrained("anuragshas/wav2vec2-xlsr-53-tamil")
model.to("cuda")
chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\‘\”\।\’\']'
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
    batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
    inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
    with torch.no_grad():
        logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
    pred_ids = torch.argmax(logits, dim=-1)
    batch["pred_strings"] = processor.batch_decode(pred_ids)
    return batch
result = test_dataset.map(evaluate, batched=True, batch_size=8)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
```
**Test Result**: 71.87 %
## Training
The Common Voice `train` and `validation` datasets were used for training.


---
language:
- hi
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
datasets:
- common_voice
model-index:
- name: ''
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

#

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-1b](https://huggingface.co/facebook/wav2vec2-xls-r-1b) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - HI dataset.
It achieves the following results on the evaluation set:
- Loss: 0.6780
- Wer: 0.3670

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 16
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1500
- num_epochs: 50.0
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Wer    |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 2.514         | 2.07  | 400  | 1.4589          | 0.8531 |
| 1.4289        | 4.15  | 800  | 0.8940          | 0.6475 |
| 1.276         | 6.22  | 1200 | 0.7743          | 0.6089 |
| 1.2213        | 8.29  | 1600 | 0.6919          | 0.4973 |
| 1.1522        | 10.36 | 2000 | 0.6635          | 0.4588 |
| 1.0914        | 12.44 | 2400 | 0.6839          | 0.4586 |
| 1.0499        | 14.51 | 2800 | 0.7151          | 0.4467 |
| 1.0238        | 16.58 | 3200 | 0.6824          | 0.4436 |
| 0.9963        | 18.65 | 3600 | 0.6872          | 0.4437 |
| 0.9728        | 20.73 | 4000 | 0.7047          | 0.4244 |
| 0.9373        | 22.8  | 4400 | 0.6569          | 0.4189 |
| 0.9028        | 24.87 | 4800 | 0.6623          | 0.4094 |
| 0.8759        | 26.94 | 5200 | 0.6723          | 0.4152 |
| 0.8824        | 29.02 | 5600 | 0.6467          | 0.4017 |
| 0.8371        | 31.09 | 6000 | 0.6911          | 0.4080 |
| 0.8205        | 33.16 | 6400 | 0.7145          | 0.4063 |
| 0.7837        | 35.23 | 6800 | 0.7037          | 0.3930 |
| 0.7708        | 37.31 | 7200 | 0.6925          | 0.3840 |
| 0.7359        | 39.38 | 7600 | 0.7034          | 0.3829 |
| 0.7153        | 41.45 | 8000 | 0.7030          | 0.3794 |
| 0.7127        | 43.52 | 8400 | 0.6823          | 0.3761 |
| 0.6884        | 45.6  | 8800 | 0.6854          | 0.3711 |
| 0.6835        | 47.67 | 9200 | 0.6723          | 0.3665 |
| 0.6703        | 49.74 | 9600 | 0.6773          | 0.3668 |

### Framework versions

- Transformers 4.17.0.dev0
- Pytorch 1.10.2+cu102
- Datasets 1.18.2.dev0
- Tokenizers 0.11.0


---
license: apache-2.0
tags:
- generated_from_trainer
datasets:
- common_voice
model-index:
- name: wav2vec2-xlsr-53-rm-vallader-with-lm
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-xlsr-53-rm-vallader-with-lm

This model is a fine-tuned version of [anuragshas/wav2vec2-large-xlsr-53-rm-vallader](https://huggingface.co/anuragshas/wav2vec2-large-xlsr-53-rm-vallader) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 0.4552
- Wer: 0.3206

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 7.5e-05
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.112
- num_epochs: 30

### Training results

| Training Loss | Epoch | Step | Validation Loss | Wer    |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 0.2379        | 3.12  | 100  | 0.4041          | 0.3396 |
| 0.103         | 6.25  | 200  | 0.4400          | 0.3337 |
| 0.0664        | 9.38  | 300  | 0.4239          | 0.3315 |
| 0.0578        | 12.5  | 400  | 0.4303          | 0.3267 |
| 0.0446        | 15.62 | 500  | 0.4575          | 0.3274 |
| 0.041         | 18.75 | 600  | 0.4451          | 0.3223 |
| 0.0402        | 21.88 | 700  | 0.4507          | 0.3206 |
| 0.0374        | 25.0  | 800  | 0.4649          | 0.3208 |
| 0.0371        | 28.12 | 900  | 0.4552          | 0.3206 |

### Framework versions

- Transformers 4.15.0
- Pytorch 1.10.0+cu111
- Datasets 1.18.1
- Tokenizers 0.10.3


---
language:
- as
license: apache-2.0
tags:
- automatic-speech-recognition
- robust-speech-event
datasets:
- mozilla-foundation/common_voice_7_0
metrics:
- wer
model-index:
- name: wav2vec2-large-xls-r-300m-as
  results:
  - task:
      type: automatic-speech-recognition
      name: Speech Recognition
    dataset:
      type: mozilla-foundation/common_voice_7_0
      name: Common Voice 7
      args: as
    metrics:
      - type: wer    # Required. Example: wer
        value: 56.995  # Required. Example: 20.90
        name: Test WER    # Optional. Example: Test WER
      - name: Test CER
        type: cer
        value: 20.390
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-large-xls-r-300m-as

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 1.9068
- Wer: 0.6679

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.12
- num_epochs: 240

### Training results

| Training Loss | Epoch  | Step | Validation Loss | Wer    |
|:-------------:|:------:|:----:|:---------------:|:------:|
| 5.7027        | 21.05  | 400  | 3.4157          | 1.0    |
| 1.1638        | 42.1   | 800  | 1.3498          | 0.7461 |
| 0.2266        | 63.15  | 1200 | 1.6147          | 0.7273 |
| 0.1473        | 84.21  | 1600 | 1.6649          | 0.7108 |
| 0.1043        | 105.26 | 2000 | 1.7691          | 0.7090 |
| 0.0779        | 126.31 | 2400 | 1.8300          | 0.7009 |
| 0.0613        | 147.36 | 2800 | 1.8681          | 0.6916 |
| 0.0471        | 168.41 | 3200 | 1.8567          | 0.6875 |
| 0.0343        | 189.46 | 3600 | 1.9054          | 0.6840 |
| 0.0265        | 210.51 | 4000 | 1.9020          | 0.6786 |
| 0.0219        | 231.56 | 4400 | 1.9068          | 0.6679 |

### Framework versions

- Transformers 4.16.0
- Pytorch 1.10.0+cu111
- Datasets 1.17.0
- Tokenizers 0.10.3

#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_7_0` with split `test`

```bash
python eval.py --model_id anuragshas/wav2vec2-large-xls-r-300m-as --dataset mozilla-foundation/common_voice_7_0 --config as --split test
```

### Inference With LM

```python
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
model_id = "anuragshas/wav2vec2-large-xls-r-300m-as"
sample_iter = iter(load_dataset("mozilla-foundation/common_voice_7_0", "as", split="test", streaming=True, use_auth_token=True))
sample = next(sample_iter)
resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48_000, 16_000).numpy()
model = AutoModelForCTC.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)
input_values = processor(resampled_audio, return_tensors="pt").input_values
with torch.no_grad():
    logits = model(input_values).logits
transcription = processor.batch_decode(logits.numpy()).text
# => "জাহাজত তো তিশকুৰলৈ যাব কিন্তু জহাজিটো আহিপনে"
```

### Eval results on Common Voice 7 "test" (WER):

| Without LM | With LM (run `./eval.py`) |
|---|---|
| 67 | 56.995 |


---
language:
- mt
license: apache-2.0
tags:
- automatic-speech-recognition
- mozilla-foundation/common_voice_8_0
- generated_from_trainer
- robust-speech-event
datasets:
- mozilla-foundation/common_voice_8_0
metrics:
- wer
model-index:
- name: XLS-R-300M - Maltese
  results:
  - task:
      type: automatic-speech-recognition
      name: Speech Recognition
    dataset:
      type: mozilla-foundation/common_voice_8_0
      name: Common Voice 8
      args: mt
    metrics:
      - type: wer    # Required. Example: wer
        value: 15.967  # Required. Example: 20.90
        name: Test WER    # Optional. Example: Test WER
      - name: Test CER
        type: cer
        value: 3.657
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# XLS-R-300M - Maltese

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the MOZILLA-FOUNDATION/COMMON_VOICE_8_0 - MT dataset.
It achieves the following results on the evaluation set:
- Loss: 0.1895
- Wer: 0.1984

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 7.5e-05
- train_batch_size: 32
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 1000
- num_epochs: 60.0
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Wer    |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| 3.4219        | 3.6   | 400  | 3.3127          | 1.0    |
| 3.0399        | 7.21  | 800  | 3.0330          | 1.0    |
| 1.5756        | 10.81 | 1200 | 0.6108          | 0.5724 |
| 1.0995        | 14.41 | 1600 | 0.3091          | 0.3154 |
| 0.9639        | 18.02 | 2000 | 0.2596          | 0.2841 |
| 0.9032        | 21.62 | 2400 | 0.2270          | 0.2514 |
| 0.8145        | 25.23 | 2800 | 0.2172          | 0.2483 |
| 0.7845        | 28.83 | 3200 | 0.2084          | 0.2333 |
| 0.7694        | 32.43 | 3600 | 0.1974          | 0.2234 |
| 0.7333        | 36.04 | 4000 | 0.2020          | 0.2185 |
| 0.693         | 39.64 | 4400 | 0.1947          | 0.2148 |
| 0.6802        | 43.24 | 4800 | 0.1960          | 0.2102 |
| 0.667         | 46.85 | 5200 | 0.1904          | 0.2072 |
| 0.6486        | 50.45 | 5600 | 0.1881          | 0.2009 |
| 0.6339        | 54.05 | 6000 | 0.1877          | 0.1989 |
| 0.6254        | 57.66 | 6400 | 0.1893          | 0.2003 |

### Framework versions

- Transformers 4.17.0.dev0
- Pytorch 1.10.2+cu102
- Datasets 1.18.2.dev0
- Tokenizers 0.11.0

#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_8_0` with split `test`

```bash
python eval.py --model_id anuragshas/wav2vec2-xls-r-300m-mt-cv8-with-lm --dataset mozilla-foundation/common_voice_8_0 --config mt --split test
```

### Inference With LM

```python
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
model_id = "anuragshas/wav2vec2-xls-r-300m-mt-cv8-with-lm"
sample_iter = iter(load_dataset("mozilla-foundation/common_voice_8_0", "mt", split="test", streaming=True, use_auth_token=True))
sample = next(sample_iter)
resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48_000, 16_000).numpy()
model = AutoModelForCTC.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)
input_values = processor(resampled_audio, return_tensors="pt").input_values
with torch.no_grad():
    logits = model(input_values).logits
transcription = processor.batch_decode(logits.numpy()).text
# => "għadu jilagħbu ċirku tant bilfondi"
```

### Eval results on Common Voice 8 "test" (WER):

| Without LM | With LM (run `./eval.py`) |
|---|---|
| 19.853 | 15.967 |


---
language:
- or
license: apache-2.0
tags:
- automatic-speech-recognition
- robust-speech-event
datasets:
- mozilla-foundation/common_voice_7_0
metrics:
- wer
model-index:
- name: wav2vec2-large-xls-r-300m-or
  results:
  - task:
      type: automatic-speech-recognition
      name: Speech Recognition
    dataset:
      type: mozilla-foundation/common_voice_7_0
      name: Common Voice 7
      args: or
    metrics:
      - type: wer    # Required. Example: wer
        value: 47.186  # Required. Example: 20.90
        name: Test WER    # Optional. Example: Test WER
      - name: Test CER
        type: cer
        value: 11.820
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# wav2vec2-large-xls-r-300m-or

This model is a fine-tuned version of [facebook/wav2vec2-xls-r-300m](https://huggingface.co/facebook/wav2vec2-xls-r-300m) on the common_voice dataset.
It achieves the following results on the evaluation set:
- Loss: 1.6618
- Wer: 0.5166

## Model description

More information needed

## Intended uses & limitations

More information needed

## Training and evaluation data

More information needed

## Training procedure

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 16
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 32
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.12
- num_epochs: 240

### Training results

| Training Loss | Epoch  | Step | Validation Loss | Wer    |
|:-------------:|:------:|:----:|:---------------:|:------:|
| 6.0493        | 23.53  | 400  | 2.9728          | 1.0    |
| 0.5306        | 47.06  | 800  | 1.2895          | 0.6138 |
| 0.1253        | 70.59  | 1200 | 1.6854          | 0.5703 |
| 0.0763        | 94.12  | 1600 | 1.9433          | 0.5870 |
| 0.0552        | 117.65 | 2000 | 1.4393          | 0.5575 |
| 0.0382        | 141.18 | 2400 | 1.4665          | 0.5537 |
| 0.0286        | 164.71 | 2800 | 1.5441          | 0.5320 |
| 0.0212        | 188.24 | 3200 | 1.6502          | 0.5115 |
| 0.0168        | 211.76 | 3600 | 1.6411          | 0.5332 |
| 0.0129        | 235.29 | 4000 | 1.6618          | 0.5166 |

### Framework versions

- Transformers 4.16.0
- Pytorch 1.10.0+cu111
- Datasets 1.18.0
- Tokenizers 0.10.3

#### Evaluation Commands
1. To evaluate on `mozilla-foundation/common_voice_7_0` with split `test`

```bash
python eval.py --model_id anuragshas/wav2vec2-large-xls-r-300m-or --dataset mozilla-foundation/common_voice_7_0 --config or --split test
```

### Inference With LM

```python
import torch
from datasets import load_dataset
from transformers import AutoModelForCTC, AutoProcessor
import torchaudio.functional as F
model_id = "anuragshas/wav2vec2-large-xls-r-300m-or"
sample_iter = iter(load_dataset("mozilla-foundation/common_voice_7_0", "or", split="test", streaming=True, use_auth_token=True))
sample = next(sample_iter)
resampled_audio = F.resample(torch.tensor(sample["audio"]["array"]), 48_000, 16_000).numpy()
model = AutoModelForCTC.from_pretrained(model_id)
processor = AutoProcessor.from_pretrained(model_id)
input_values = processor(resampled_audio, return_tensors="pt").input_values
with torch.no_grad():
    logits = model(input_values).logits
transcription = processor.batch_decode(logits.numpy()).text
# => "ପରରାଏ ବାଲା ଗସ୍ତି ଫାଣ୍ଡି ଗୋପାଳ ପରଠାରୁ ଦେଢ଼କଶ ଦୂର"
```

### Eval results on Common Voice 7 "test" (WER):

| Without LM | With LM (run `./eval.py`) |
|---|---|
| 51.92 | 47.186 |


---
language: hsb
datasets:
- common_voice
metrics:
- wer
tags:
- audio
- automatic-speech-recognition
- speech
- xlsr-fine-tuning-week
license: apache-2.0
model-index:
- name: Anurag Singh XLSR Wav2Vec2 Large 53 Sorbian, Upper
  results:
  - task:
      name: Speech Recognition
      type: automatic-speech-recognition
    dataset:
      name: Common Voice hsb
      type: common_voice
      args: hsb
    metrics:
       - name: Test WER
         type: wer
         value: 65.05
---
# Wav2Vec2-Large-XLSR-53-Sorbian, Upper
Fine-tuned [facebook/wav2vec2-large-xlsr-53](https://huggingface.co/facebook/wav2vec2-large-xlsr-53) on Sorbian, Upper using the [Common Voice](https://huggingface.co/datasets/common_voice).
When using this model, make sure that your speech input is sampled at 16kHz.
## Usage
The model can be used directly (without a language model) as follows:
```python
import torch
import torchaudio
from datasets import load_dataset
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
test_dataset = load_dataset("common_voice", "hsb", split="test[:2%]")
processor = Wav2Vec2Processor.from_pretrained("anuragshas/wav2vec2-large-xlsr-53-hsb")
model = Wav2Vec2ForCTC.from_pretrained("anuragshas/wav2vec2-large-xlsr-53-hsb")
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
with torch.no_grad():
    logits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
predicted_ids = torch.argmax(logits, dim=-1)
print("Prediction:", processor.batch_decode(predicted_ids))
print("Reference:", test_dataset["sentence"][:2])
```
## Evaluation
The model can be evaluated as follows on the Sorbian, Upper test data of Common Voice.
```python
import torch
import torchaudio
from datasets import load_dataset, load_metric
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
import re
test_dataset = load_dataset("common_voice", "hsb", split="test")
wer = load_metric("wer")
processor = Wav2Vec2Processor.from_pretrained("anuragshas/wav2vec2-large-xlsr-53-hsb")
model = Wav2Vec2ForCTC.from_pretrained("anuragshas/wav2vec2-large-xlsr-53-hsb")
model.to("cuda")
chars_to_ignore_regex = '[\,\?\.\!\-\;\:\"\“\%\”\„\–\…\«\»]'
resampler = torchaudio.transforms.Resample(48_000, 16_000)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def speech_file_to_array_fn(batch):
    batch["sentence"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower()
    speech_array, sampling_rate = torchaudio.load(batch["path"])
    batch["speech"] = resampler(speech_array).squeeze().numpy()
    return batch
test_dataset = test_dataset.map(speech_file_to_array_fn)
# Preprocessing the datasets.
# We need to read the aduio files as arrays
def evaluate(batch):
    inputs = processor(batch["speech"], sampling_rate=16_000, return_tensors="pt", padding=True)
    with torch.no_grad():
        logits = model(inputs.input_values.to("cuda"), attention_mask=inputs.attention_mask.to("cuda")).logits
    pred_ids = torch.argmax(logits, dim=-1)
    batch["pred_strings"] = processor.batch_decode(pred_ids)
    return batch
result = test_dataset.map(evaluate, batched=True, batch_size=8)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
```
**Test Result**: 65.05 %
## Training
The Common Voice `train` and `validation` datasets were used for training.