File size: 3,457 Bytes
9030bb4 4740922 9030bb4 4740922 d27e933 9030bb4 d27e933 4856a04 9030bb4 4856a04 158eb34 4740922 80c2223 4740922 9030bb4 39431cd 158eb34 39431cd 9030bb4 80c2223 9030bb4 4740922 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
---
license: apache-2.0
base_model: openai/whisper-small
tags:
- generated_from_trainer
metrics:
- accuracy
- f1
model-index:
- name: whisper-small-uz-en-ru-lang-id
results: []
datasets:
- mozilla-foundation/common_voice_16_1
language:
- uz
- en
- ru
pipeline_tag: audio-classification
---
<!-- 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. -->
# whisper-small-uz-en-ru-lang-id
This model is a fine-tuned version of [openai/whisper-small](https://huggingface.co/openai/whisper-small) on the "mozilla-foundation/common_voice_16_1"(uz/en/ru) dataset.
It achieves the following results on the validation set during training:
- Loss: 0.2065
- Accuracy: 0.9747
- F1: 0.9746
Accuracy on the test (evaluation) dataset: 92.4%.
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
```python
# datasets for each language from the set {uz: Uzbek, en: English, ru: Russian}
common_voice_train_uz = load_dataset("mozilla-foundation/common_voice_16_1", "uz", split='train', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
common_voice_train_ru = load_dataset("mozilla-foundation/common_voice_16_1", "ru", split='train', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
common_voice_train_en = load_dataset("mozilla-foundation/common_voice_16_1", "en", split='train', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
common_voice_valid_uz = load_dataset("mozilla-foundation/common_voice_16_1", "uz", split='validation', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
common_voice_valid_ru = load_dataset("mozilla-foundation/common_voice_16_1", "ru", split='validation', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
common_voice_valid_en = load_dataset("mozilla-foundation/common_voice_16_1", "en", split='validation', trust_remote_code=True, token=env('HUGGING_TOKEN'), streaming=True)
# code to shuffle and to take limited size of data. Rows per set: Train-24000, Validation-3000.
...
# concatenate 3 datasets
common_voice['train'] = concatenate_datasets([common_voice_train_uz, common_voice_train_ru, common_voice_train_en])
```
## Training procedure
Used Trainer from transformers.
Training and evaluation process are described in the Jupyter notebook, storing in the following github repository:
https://github.com/fitlemon/whisper-small-uz-en-ru-lang-id
### Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 8
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- training_steps: 9000
- mixed_precision_training: Native AMP
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|
| 0.0252 | 1 | 3000 | 0.3089 | 0.953 | 0.9525 |
| 0.0357 | 2 | 6000 | 0.1732 | 0.964 | 0.9637 |
| 0.0 | 3 | 9000 | 0.2065 | 0.9747 | 0.9746 |
### Framework versions
- Transformers 4.38.2
- Pytorch 2.2.1+cu121
- Datasets 2.17.1
- Tokenizers 0.15.2 |