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

# fine-tune-wav2vec2-large-xls-r-300m-sw

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_11_0 swahili dataset.
It achieves the following results on the evaluation set:
- Loss: 1.2834
- Wer: 0.5834

## Model description

This model is fine-tuned for general swahili speech recognition tasks. You can watch our hour long [webinar](https://drive.google.com/file/d/1OkLx3d9xivdyxH8yYsZtwObhEX5Ptn5y/view?usp=drive_link) and see the [slides](https://docs.google.com/presentation/d/1sExJLwZLMNMKGnpuxy-ttF5KqDXJyKK2jNNTUabo5_Q/edit?usp=sharing) on this work.

## Intended uses & limitations

The intention is to transcribe general swahili speeches. With further development, we'll fine-tune the model for domain-specific (we are focused on hospital tasks) swahili conversations.

## Training and evaluation data

To appreciate the transformation we did on the data, you can read our [blog on data preparation](https://medium.com/@gitau_am/from-raw-data-to-accurate-speech-recognition-asr-my-journey-of-data-preparation-df3a1b0dee3a).

## Training procedure
We also [documented](https://medium.com/@gitau_am/exploring-asr-model-development-fine-tuning-xls-r-wav2vec2-model-with-swahili-data-b95134d116b8) some lessons from the fine-tuning exercise.

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 8
- eval_batch_size: 8
- 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: 500
- num_epochs: 9
- mixed_precision_training: Native AMP

### Training results

| Training Loss | Epoch | Step | Validation Loss | Wer    |
|:-------------:|:-----:|:----:|:---------------:|:------:|
| No log        | 1.72  | 200  | 3.0092          | 1.0    |
| 4.1305        | 3.43  | 400  | 2.9159          | 1.0    |
| 4.1305        | 5.15  | 600  | 1.4301          | 0.7040 |
| 0.9217        | 6.87  | 800  | 1.3143          | 0.6529 |
| 0.9217        | 8.58  | 1000 | 1.2834          | 0.5834 |


### Framework versions

- Transformers 4.27.0
- Pytorch 1.13.1+cu116
- Datasets 2.10.1
- Tokenizers 0.13.2

{"license": "apache-2.0", "tags": ["generated_from_trainer"], "datasets": ["common_voice_11_0"], "metrics": ["wer"], "model-index": [{"name": "fine-tune-wav2vec2-large-xls-r-1b-sw", "results": [{"task": {"type": "automatic-speech-recognition", "name": "Automatic Speech Recognition"}, "dataset": {"name": "common_voice_11_0", "type": "common_voice_11_0", "config": "sw", "split": "test[:1%]", "args": "sw"}, "metrics": [{"type": "wer", "value": 0.5834348355663824, "name": "Wer"}]}]}]}
transformers pytorch tensorboard wav2vec2 automatic-speech-recognition generated_from_trainer dataset:common_voice_11_0 license:apache-2.0 model-index endpoints_compatible region:us
TAGS
#transformers #pytorch #tensorboard #wav2vec2 #automatic-speech-recognition #generated_from_trainer #dataset-common_voice_11_0 #license-apache-2.0 #model-index #endpoints_compatible #region-us 

fine-tune-wav2vec2-large-xls-r-300m-sw
======================================


This model is a fine-tuned version of facebook/wav2vec2-xls-r-300m on the common\_voice\_11\_0 swahili dataset.
It achieves the following results on the evaluation set:


* Loss: 1.2834
* Wer: 0.5834


Model description
-----------------


This model is fine-tuned for general swahili speech recognition tasks. You can watch our hour long webinar and see the slides on this work.


Intended uses & limitations
---------------------------


The intention is to transcribe general swahili speeches. With further development, we'll fine-tune the model for domain-specific (we are focused on hospital tasks) swahili conversations.


Training and evaluation data
----------------------------


To appreciate the transformation we did on the data, you can read our blog on data preparation.


Training procedure
------------------


We also documented some lessons from the fine-tuning exercise.


### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0003
* train\_batch\_size: 8
* eval\_batch\_size: 8
* 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: 500
* num\_epochs: 9
* mixed\_precision\_training: Native AMP


### Training results



### Framework versions


* Transformers 4.27.0
* Pytorch 1.13.1+cu116
* Datasets 2.10.1
* Tokenizers 0.13.2



### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0003
* train\_batch\_size: 8
* eval\_batch\_size: 8
* 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: 500
* num\_epochs: 9
* mixed\_precision\_training: Native AMP ### Training results ### Framework versions


* Transformers 4.27.0
* Pytorch 1.13.1+cu116
* Datasets 2.10.1
* Tokenizers 0.13.2
TAGS
#transformers #pytorch #tensorboard #wav2vec2 #automatic-speech-recognition #generated_from_trainer #dataset-common_voice_11_0 #license-apache-2.0 #model-index #endpoints_compatible #region-us 
 ### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0003
* train\_batch\_size: 8
* eval\_batch\_size: 8
* 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: 500
* num\_epochs: 9
* mixed\_precision\_training: Native AMP ### Training results ### Framework versions


* Transformers 4.27.0
* Pytorch 1.13.1+cu116
* Datasets 2.10.1
* Tokenizers 0.13.2
TAGS
#transformers #pytorch #tensorboard #wav2vec2 #automatic-speech-recognition #generated_from_trainer #dataset-common_voice_11_0 #license-apache-2.0 #model-index #endpoints_compatible #region-us 
### Training hyperparameters


The following hyperparameters were used during training:


* learning\_rate: 0.0003
* train\_batch\_size: 8
* eval\_batch\_size: 8
* 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: 500
* num\_epochs: 9
* mixed\_precision\_training: Native AMP### Training results### Framework versions


* Transformers 4.27.0
* Pytorch 1.13.1+cu116
* Datasets 2.10.1
* Tokenizers 0.13.2