Whisper Small ar - Mohammed Bakheet

ู†ู…ูˆุฐุฌ ูƒู„ุงู… ู„ู„ุชุนุฑู ุนู„ู‰ ุงู„ุตูˆุชุŒ ู‡ุฐุง ุงู„ู†ู…ูˆุฐุฌ ูŠุชู…ูŠุฒ ุจุฏู‚ุฉ ุนุงู„ูŠุฉ ููŠ ุงู„ุชุนุฑู ุนู„ู‰ ุงู„ุตูˆุช ุจุงู„ู„ุบุฉ ุงู„ุนุฑุจูŠุฉ.

This model is a fine-tuned version of openai/whisper-large on the Common Voice 11.0 dataset. It achieves the following results on the evaluation set:

  • Loss: 0.1921
  • Wer: 12.6150

Model description

This model is a fine-tuned version of openai/whisper-large on the Common Voice 11.0 dataset. It achieves 12.61 WER. Data augmentation can be implemented to further improve the model performance.

Intended uses & limitations

from datasets import load_dataset
from transformers import WhisperProcessor, WhisperForConditionalGeneration
from datasets import Audio

# load the dataset
test_dataset = load_dataset("mozilla-foundation/common_voice_11_0", "ar", split="test", use_auth_token=True, trust_remote_code=True)

# get the processor and model from mohammed/whisper-small-arabic-cv-11
processor = WhisperProcessor.from_pretrained("mohammed/whisper-large-arabic-cv-11")
model = WhisperForConditionalGeneration.from_pretrained("mohammed/whisper-large-arabic-cv-11")
model.config.forced_decoder_ids = None

# resample the audio files to 16000
test_dataset = test_dataset.cast_column("audio", Audio(sampling_rate=16000))

# get 10 exmaples of model transcription
for i in range(10):
  sample = test_dataset[i]["audio"]
  input_features = processor(sample["array"], sampling_rate=sample["sampling_rate"], return_tensors="pt").input_features 
  predicted_ids = model.generate(input_features)
  transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False)
  transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)
  print(f"{i} Reference Sentence: {test_dataset[i]['sentence']}")
  print(f"{i} Predicted Sentence: {transcription[0]}")
0 Reference Sentence: ุฒุงุฑู†ูŠ ููŠ ุฃูˆุงุฆู„ ุงู„ุดู‡ุฑ ุจุฏุฑูŠ
0 Predicted Sentence: ุฒุงุฑู†ูŠ ููŠ ุฃูˆุงุฆู„ ุงู„ุดู‡ุฑ ุจุฏุฑูŠ 
1 Reference Sentence: ุฅุจู†ูƒ ุจุทู„.
1 Predicted Sentence: ุงุจู†ูƒ ุจุทู„  
2 Reference Sentence: ุงู„ูˆุงุนุธ ุงู„ุฃู…ุฑุฏ ู‡ุฐุง ุงู„ุฐูŠ
2 Predicted Sentence: ุฃูˆุงุนุฒ ุงู„ุฃู…ุฑุฌ ู‡ุฐุง ุงู„ุฐูŠ 
3 Reference Sentence: ุณู…ุญ ู„ู‡ ู‡ุฐุง ุจุงู„ุชุฎุตุต ููŠ ุงู„ุจุฑูˆู†ุฒ ุงู„ุตุบูŠุฑุŒ ุงู„ุฐูŠ ูŠุชู… ุฅู†ุชุงุฌู‡ ุจุดูƒู„ ุฑุฆูŠุณูŠ ูˆู…ุฑุจุญ ู„ู„ุชุตุฏูŠุฑ.
3 Predicted Sentence: ุณู…ุญ ู„ู‡ ู‡ุฐุง ุจุงู„ุชุฎุตุต ููŠ ุงู„ุจู„ูˆู†ุฒ ุงู„ุตุบูŠุฑ ุงู„ุฐูŠ ุงุนุชู…ุฏ ู…ู†ุชุงุฌู‡ ุจุดูƒู„ ุฑุฆูŠุณูŠ ูˆุบุฑุจุญ ู„ู„ุชุตุฏูŠุฑ  
4 Reference Sentence: ุฃู„ุฏูŠูƒ ู‚ู„ู… ุŸ
4 Predicted Sentence: ุฃู„ุฏูŠูƒ ู‚ู„ู…  
5 Reference Sentence: ูŠุง ู†ุฏูŠู…ูŠ ู‚ุณู… ุจูŠ ุงู„ู‰ ุงู„ุตู‡ุจุงุก
5 Predicted Sentence: ูŠุง ู†ุฏูŠู…ูŠ ู‚ุณู… ุจูŠ ุฅู„ู‰ ุงู„ุตุญุจุงุก 
6 Reference Sentence: ุฅู†ูƒ ุชูƒุจุฑ ุงู„ู…ุดูƒู„ุฉ.
6 Predicted Sentence: ุฅู†ูƒ ุชูƒุจุฑ ุงู„ู…ุดูƒู„ุฉ  
7 Reference Sentence: ูŠุฑุบุจ ุฃู† ูŠู„ุชู‚ูŠ ุจูƒ.
7 Predicted Sentence: ูŠุฑุบุจ ุฃู† ูŠู„ุชู‚ูŠ ุจูƒ  
8 Reference Sentence: ุฅู†ู‡ู… ู„ุง ูŠุนุฑููˆู† ู„ู…ุงุฐุง ุญุชู‰.
8 Predicted Sentence: ุฅู†ู‡ู… ู„ุง ูŠุนุฑููˆู† ู„ู…ุงุฐุง ุญุชู‰  
9 Reference Sentence: ุณูŠุณุนุฏู†ูŠ ู…ุณุงุนุฏุชูƒ ุฃูŠ ูˆู‚ุช ุชุญุจ.
9 Predicted Sentence: ุณูŠุณุนุฏู†ูŠ ู…ุณุงุนุฏุชูƒ ุฃูŠ ูˆู‚ุช ุชุญุจ  

Training and evaluation data

This model is trained on the Common Voice 11.0 dataset.

Training procedure

The model is trained on 64 cores CPU, Nvidia A100 GPU with 48 VRAM, and 100GB Disk space. The GPU utilization reached 100%. Please check the training hyperparameters below.

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 1e-05
  • train_batch_size: 4
  • eval_batch_size: 4
  • seed: 42
  • gradient_accumulation_steps: 16
  • total_train_batch_size: 64
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 500
  • training_steps: 2000
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss Wer
0.1952 1.6630 1000 0.1843 14.0098
0.0339 3.3261 2000 0.1921 12.6150

Framework versions

  • Transformers 4.43.3
  • Pytorch 2.2.0
  • Datasets 2.20.0
  • Tokenizers 0.19.1
Downloads last month
27
Safetensors
Model size
1.54B params
Tensor type
F32
ยท
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Model tree for mohammed/whisper-large-arabic-cv-11

Finetuned
(65)
this model

Dataset used to train mohammed/whisper-large-arabic-cv-11

Spaces using mohammed/whisper-large-arabic-cv-11 2

Evaluation results