-
Hello, I have successfully fine-tuned Whisper-Tiny for transcription tasks on my custom speech dataset. However, when I attempted to fine-tune the model for a translation task using the same dataset, I encountered an issue. I selected only a few items from my dataset for the initial training to ensure the pipeline was functioning correctly before adjusting the training arguments. The model training completed successfully, but when I use the fine-tuned model for inference, the output is always in English (which is incorrect). I need the output to be in Arabic script. I would greatly appreciate any help in figuring out what I might have missed during the fine-tuning process that could be causing this issue. Thank you! fine-tuning code:
console output |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Not sure about the fine tuning process and the resulting model, but in tokenizer = WhisperTokenizer.from_pretrained("openai/whisper-tiny", language="Arabic", task="transcribe") |
Beta Was this translation helpful? Give feedback.
-
Do you mean that your evaluation metrics achieved a desirable level during training? If so, what were they? |
Beta Was this translation helpful? Give feedback.
-
Please, what is the size of your dataset? |
Beta Was this translation helpful? Give feedback.
That would indicate training was not successful. But the issue here is likely that the translation task was intended for translation into English, and trained for that, so this is not a minor finetuning, you would need a lot of training to get it to forget what it's already trained to do. (How much data do you have?)
Others have observed that Whisper can sometimes translate into other languages when using the
transcribe
task instead of thetranslate
task and setting thelanguage
to be the target translation language. While that behaviour probably wasn't intended, you might have better success finetuning under those parameters, again with sufficient data.