"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/html": [
"\n",
" \n",
" \n",
"
\n",
" [ 430/5000 57:23 < 10:12:46, 0.12 it/s, Epoch 0.86/11]\n",
"
\n",
" \n",
" \n",
" \n",
" Step | \n",
" Training Loss | \n",
" Validation Loss | \n",
"
\n",
" \n",
" \n",
" \n",
"
"
],
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"trainer.train()"
]
},
{
"cell_type": "markdown",
"id": "747c6a6e",
"metadata": {
"pycharm": {
"name": "#%% md\n"
}
},
"source": [
"(note that training may take some time to commence as we load the first training data samples with streaming mode)"
]
},
{
"cell_type": "markdown",
"id": "810ced54-7187-4a06-b2fe-ba6dcca94dc3",
"metadata": {},
"source": [
"We can label our checkpoint with the `whisper-event` tag on push by setting the appropriate key-word arguments (kwargs):"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6dd0e310-9b07-4133-ac14-2ed2d7524e22",
"metadata": {},
"outputs": [],
"source": [
"kwargs = {\n",
" \"dataset_tags\": \"mozilla-foundation/common_voice_11_0\",\n",
" \"dataset\": \"Common Voice 11.0\", # a 'pretty' name for the training dataset\n",
" \"language\": \"ro\",\n",
" \"model_name\": \"Whisper Medium Romanian\", # a 'pretty' name for your model\n",
" \"finetuned_from\": \"openai/whisper-medium\",\n",
" \"tasks\": \"automatic-speech-recognition\",\n",
" \"tags\": \"whisper-event\",\n",
"}"
]
},
{
"cell_type": "markdown",
"id": "090d676a-f944-4297-a938-a40eda0b2b68",
"metadata": {},
"source": [
"The training results can now be uploaded to the Hub. To do so, execute the `push_to_hub` command:"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "95737cda-c5dd-4887-a4d0-dfcb0d61d977",
"metadata": {},
"outputs": [],
"source": [
"trainer.push_to_hub(**kwargs)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "whisper-ft",
"language": "python",
"name": "whisper-ft"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
}
},
"nbformat": 4,
"nbformat_minor": 5
}