File size: 1,291 Bytes
50a96f5 b3ebd4c 8b460b7 66d5aa3 50a96f5 66d5aa3 1cf8cf6 66d5aa3 1cf8cf6 50a96f5 66d5aa3 50a96f5 66d5aa3 8b460b7 66d5aa3 50a96f5 8b460b7 66d5aa3 b3ebd4c 66d5aa3 |
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 |
# Whisper Finetuning script for the very small Nynorsk Common Voice
# Test script. Currently this only runs if you uncomment the lines in the training code for casting this from 48K to 16K
# Currently for training on a 48GB
# Reduce batch size and learning rate if training on smaller GPU
python run_whisper_finetuning.py \
--model_name_or_path="openai/whisper-small" \
--output_dir="../whisper-CC-nn" \
--overwrite_output_dir=True \
--language="Norwegian" \
--task="transcribe" \
--dataset_name="mozilla-foundation/common_voice_11_0" \
--dataset_config="nn-NO" \
--do_train=True \
--do_eval=True \
--audio_column_name="audio" \
--text_column_name="sentence" \
--per_device_train_batch_size=48 \
--per_device_train_batch_size=48 \
--learning_rate=4e-5 \
--warmup_steps=500 \
--max_steps=1000 \
--gradient_checkpointing=True \
--gradient_accumulation_steps=1 \
--group_by_length=False \
--evaluation_strategy="steps" \
--save_steps=250 \
--eval_steps=250 \
--max_eval_samples=50 \
--logging_steps=250 \
--fp16=True \
--load_best_model_at_end=True \
--metric_for_best_model="wer" \
--greater_is_better=False \
--report_to="tensorboard" \
--predict_with_generate=True \
--generation_max_length=225 \
--print_training_arguments=True \
--push_to_hub=True
|