"
]
},
- "execution_count": 19,
+ "execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
@@ -19747,13 +19602,13 @@
"print(\"Target text:\", common_voice_train[rand_int][\"sentence\"])\n",
"print(\"Input array shape:\", common_voice_train[rand_int][\"audio\"][\"array\"].shape)\n",
"print(\"Sampling rate:\", common_voice_train[rand_int][\"audio\"][\"sampling_rate\"])\n",
- "ipd.Audio(data=common_voice_train[rand_int][\"audio\"][\"array\"], autoplay=True, rate=16000)"
+ "ipd.Audio(data=common_voice_train[rand_int][\"audio\"][\"array\"], autoplay=False, rate=16000)"
]
},
{
"cell_type": "code",
- "execution_count": 20,
- "id": "d2a5374c",
+ "execution_count": 18,
+ "id": "1db1a77c",
"metadata": {},
"outputs": [],
"source": [
@@ -19774,19 +19629,47 @@
},
{
"cell_type": "code",
- "execution_count": 22,
- "id": "9c3697ba",
- "metadata": {},
- "outputs": [],
+ "execution_count": 19,
+ "id": "b0a33568",
+ "metadata": {
+ "collapsed": true,
+ "jupyter": {
+ "outputs_hidden": true
+ }
+ },
+ "outputs": [
+ {
+ "name": "stderr",
+ "output_type": "stream",
+ "text": [
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-a8ad7f3bec152712.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-5802da9af6ac9ac7.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-418585d4baf07152.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-c7e5028c91005615.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-b96a6332cc5af3be.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-6a1544fcabe8e1c5.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-4926c7991e987d55.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-b607d477202e12db.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-a04833a515432724.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-bee3e39e2b69f652.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-ad833922c61a3f31.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-ecf0c779c655274d.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-2ba17aaff236f685.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-5ab7f29ea26c63ef.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-240348bb32bdbb06.arrow\n",
+ "Loading cached processed dataset at /workspace/.cache/huggingface/datasets/csv/default-decaf49f8e8b5be8/0.0.0/6b9057d9e23d9d8a2f05b985917a0da84d70c5dae3d22ddd8a3f22fb01c69d9e/cache-38e1126fb0ce94f8.arrow\n"
+ ]
+ }
+ ],
"source": [
"common_voice_train = common_voice_train.map(prepare_dataset, remove_columns=common_voice_train.column_names, num_proc=16)\n",
- "common_voice_test = common_voice_test.map(prepare_dataset, remove_columns=common_voice_test.column_names, num_proc=16)"
+ "common_voice_valid = common_voice_valid.map(prepare_dataset, remove_columns=common_voice_valid.column_names, num_proc=16)"
]
},
{
"cell_type": "code",
- "execution_count": 41,
- "id": "d5bd0662",
+ "execution_count": 20,
+ "id": "ca8be265",
"metadata": {},
"outputs": [],
"source": [
@@ -19797,8 +19680,8 @@
},
{
"cell_type": "code",
- "execution_count": 25,
- "id": "639dd5a7",
+ "execution_count": 21,
+ "id": "53a815bf",
"metadata": {},
"outputs": [],
"source": [
@@ -19857,8 +19740,8 @@
},
{
"cell_type": "code",
- "execution_count": 26,
- "id": "c4fe1643",
+ "execution_count": 22,
+ "id": "1d0cbdf6",
"metadata": {},
"outputs": [],
"source": [
@@ -19867,8 +19750,8 @@
},
{
"cell_type": "code",
- "execution_count": 27,
- "id": "9fb388e3",
+ "execution_count": 23,
+ "id": "e26e68a2",
"metadata": {},
"outputs": [],
"source": [
@@ -19878,8 +19761,8 @@
},
{
"cell_type": "code",
- "execution_count": 64,
- "id": "96611455",
+ "execution_count": 24,
+ "id": "f347bb3e",
"metadata": {},
"outputs": [],
"source": [
@@ -19891,10 +19774,6 @@
"\n",
" pred_str = tokenizer.batch_decode(pred_ids)\n",
" label_str = tokenizer.batch_decode(pred.label_ids, group_tokens=False)\n",
- "\n",
- "# print(\"pred : \", pred_ids[0])\n",
- "# print(\"label: \", pred.label_ids[0])\n",
- "# print(\"-----------------\")\n",
" \n",
" wer = wer_metric.compute(predictions=pred_str, references=label_str)\n",
"\n",
@@ -19903,134 +19782,19 @@
},
{
"cell_type": "code",
- "execution_count": 66,
- "id": "bb429520",
- "metadata": {
- "collapsed": true,
- "jupyter": {
- "outputs_hidden": true
- }
- },
+ "execution_count": 25,
+ "id": "aff51ef4",
+ "metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
- "loading configuration file checkpoint-4000/config.json\n",
- "Model config Wav2Vec2Config {\n",
- " \"_name_or_path\": \"facebook/wav2vec2-xls-r-300m\",\n",
- " \"activation_dropout\": 0.0,\n",
- " \"adapter_kernel_size\": 3,\n",
- " \"adapter_stride\": 2,\n",
- " \"add_adapter\": false,\n",
- " \"apply_spec_augment\": true,\n",
- " \"architectures\": [\n",
- " \"Wav2Vec2ForCTC\"\n",
- " ],\n",
- " \"attention_dropout\": 0.1,\n",
- " \"bos_token_id\": 1,\n",
- " \"classifier_proj_size\": 256,\n",
- " \"codevector_dim\": 768,\n",
- " \"contrastive_logits_temperature\": 0.1,\n",
- " \"conv_bias\": true,\n",
- " \"conv_dim\": [\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 512\n",
- " ],\n",
- " \"conv_kernel\": [\n",
- " 10,\n",
- " 3,\n",
- " 3,\n",
- " 3,\n",
- " 3,\n",
- " 2,\n",
- " 2\n",
- " ],\n",
- " \"conv_stride\": [\n",
- " 5,\n",
- " 2,\n",
- " 2,\n",
- " 2,\n",
- " 2,\n",
- " 2,\n",
- " 2\n",
- " ],\n",
- " \"ctc_loss_reduction\": \"mean\",\n",
- " \"ctc_zero_infinity\": false,\n",
- " \"diversity_loss_weight\": 0.1,\n",
- " \"do_stable_layer_norm\": true,\n",
- " \"eos_token_id\": 2,\n",
- " \"feat_extract_activation\": \"gelu\",\n",
- " \"feat_extract_dropout\": 0.0,\n",
- " \"feat_extract_norm\": \"layer\",\n",
- " \"feat_proj_dropout\": 0.0,\n",
- " \"feat_quantizer_dropout\": 0.0,\n",
- " \"final_dropout\": 0.0,\n",
- " \"gradient_checkpointing\": false,\n",
- " \"hidden_act\": \"gelu\",\n",
- " \"hidden_dropout\": 0.1,\n",
- " \"hidden_size\": 1024,\n",
- " \"initializer_range\": 0.02,\n",
- " \"intermediate_size\": 4096,\n",
- " \"layer_norm_eps\": 1e-05,\n",
- " \"layerdrop\": 0.0,\n",
- " \"mask_feature_length\": 64,\n",
- " \"mask_feature_min_masks\": 0,\n",
- " \"mask_feature_prob\": 0.25,\n",
- " \"mask_time_length\": 10,\n",
- " \"mask_time_min_masks\": 2,\n",
- " \"mask_time_prob\": 0.75,\n",
- " \"model_type\": \"wav2vec2\",\n",
- " \"num_adapter_layers\": 3,\n",
- " \"num_attention_heads\": 16,\n",
- " \"num_codevector_groups\": 2,\n",
- " \"num_codevectors_per_group\": 320,\n",
- " \"num_conv_pos_embedding_groups\": 16,\n",
- " \"num_conv_pos_embeddings\": 128,\n",
- " \"num_feat_extract_layers\": 7,\n",
- " \"num_hidden_layers\": 24,\n",
- " \"num_negatives\": 100,\n",
- " \"output_hidden_size\": 1024,\n",
- " \"pad_token_id\": 72,\n",
- " \"proj_codevector_dim\": 768,\n",
- " \"tdnn_dilation\": [\n",
- " 1,\n",
- " 2,\n",
- " 3,\n",
- " 1,\n",
- " 1\n",
- " ],\n",
- " \"tdnn_dim\": [\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 512,\n",
- " 1500\n",
- " ],\n",
- " \"tdnn_kernel\": [\n",
- " 5,\n",
- " 3,\n",
- " 3,\n",
- " 1,\n",
- " 1\n",
- " ],\n",
- " \"torch_dtype\": \"float32\",\n",
- " \"transformers_version\": \"4.17.0.dev0\",\n",
- " \"use_weighted_layer_sum\": false,\n",
- " \"vocab_size\": 75,\n",
- " \"xvector_output_dim\": 512\n",
- "}\n",
- "\n",
- "loading weights file checkpoint-4000/pytorch_model.bin\n",
- "All model checkpoint weights were used when initializing Wav2Vec2ForCTC.\n",
- "\n",
- "All the weights of Wav2Vec2ForCTC were initialized from the model checkpoint at checkpoint-4000.\n",
- "If your task is similar to the task the model of the checkpoint was trained on, you can already use Wav2Vec2ForCTC for predictions without further training.\n"
+ "Some weights of the model checkpoint at facebook/wav2vec2-xls-r-300m were not used when initializing Wav2Vec2ForCTC: ['project_hid.bias', 'quantizer.codevectors', 'quantizer.weight_proj.weight', 'project_q.weight', 'project_hid.weight', 'quantizer.weight_proj.bias', 'project_q.bias']\n",
+ "- This IS expected if you are initializing Wav2Vec2ForCTC from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).\n",
+ "- This IS NOT expected if you are initializing Wav2Vec2ForCTC from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).\n",
+ "Some weights of Wav2Vec2ForCTC were not initialized from the model checkpoint at facebook/wav2vec2-xls-r-300m and are newly initialized: ['lm_head.weight', 'lm_head.bias']\n",
+ "You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.\n"
]
}
],
@@ -20038,8 +19802,7 @@
"from transformers import Wav2Vec2ForCTC\n",
"\n",
"model = Wav2Vec2ForCTC.from_pretrained(\n",
- "# \"facebook/wav2vec2-xls-r-300m\", \n",
- " \"checkpoint-4000\",\n",
+ " \"facebook/wav2vec2-xls-r-300m\", \n",
" attention_dropout=0.1,\n",
" layerdrop=0.0,\n",
" feat_proj_dropout=0.0,\n",
@@ -20055,8 +19818,8 @@
},
{
"cell_type": "code",
- "execution_count": 68,
- "id": "ffcd9012",
+ "execution_count": 26,
+ "id": "6e363fc8",
"metadata": {},
"outputs": [],
"source": [
@@ -20065,19 +19828,10 @@
},
{
"cell_type": "code",
- "execution_count": 69,
- "id": "b07418cf",
+ "execution_count": 27,
+ "id": "447dfc3e",
"metadata": {},
- "outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "PyTorch: setting up devices\n",
- "The default value for the training argument `--report_to` will change in v5 (from all installed integrations to none). In v5, you will need to use `--report_to all` to get the same behavior as now. You should start updating your code and make this info disappear :-).\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"from transformers import TrainingArguments\n",
"\n",
@@ -20089,12 +19843,12 @@
" evaluation_strategy=\"steps\",\n",
" gradient_checkpointing=True,\n",
" fp16=True,\n",
- " num_train_epochs=50,\n",
+ " num_train_epochs=100,\n",
" save_steps=400,\n",
" eval_steps=400,\n",
" logging_steps=100,\n",
" learning_rate=5e-5,\n",
- " warmup_steps=100,\n",
+ " warmup_steps=1000,\n",
" save_total_limit=3,\n",
" load_best_model_at_end=True\n",
")"
@@ -20102,8 +19856,8 @@
},
{
"cell_type": "code",
- "execution_count": 70,
- "id": "7776cd7d",
+ "execution_count": 29,
+ "id": "eeda7f6e",
"metadata": {},
"outputs": [
{
@@ -20123,15 +19877,15 @@
" args=training_args,\n",
" compute_metrics=compute_metrics,\n",
" train_dataset=common_voice_train,\n",
- " eval_dataset=common_voice_test,\n",
+ " eval_dataset=common_voice_valid,\n",
" tokenizer=processor.feature_extractor,\n",
")"
]
},
{
"cell_type": "code",
- "execution_count": 71,
- "id": "ac33ed4c",
+ "execution_count": 30,
+ "id": "af09f9f9",
"metadata": {},
"outputs": [
{
@@ -20142,12 +19896,12 @@
"/opt/conda/lib/python3.8/site-packages/transformers/optimization.py:306: FutureWarning: This implementation of AdamW is deprecated and will be removed in a future version. Use thePyTorch implementation torch.optim.AdamW instead, or set `no_deprecation_warning=True` to disable this warning\n",
" warnings.warn(\n",
"***** Running training *****\n",
- " Num examples = 2615\n",
- " Num Epochs = 50\n",
+ " Num examples = 2353\n",
+ " Num Epochs = 100\n",
" Instantaneous batch size per device = 8\n",
" Total train batch size (w. parallel, distributed & accumulation) = 32\n",
" Gradient Accumulation steps = 4\n",
- " Total optimization steps = 4050\n"
+ " Total optimization steps = 7300\n"
]
},
{
@@ -20156,8 +19910,8 @@
"\n",
" \n",
" \n",
- "
\n",
- " [4050/4050 2:16:09, Epoch 49/50]\n",
+ "
\n",
+ " [7300/7300 4:05:50, Epoch 99/100]\n",
"
\n",
" \n",
" \n",
@@ -20171,63 +19925,111 @@
" \n",
" \n",
" 400 | \n",
- " 1.382900 | \n",
- " 0.429020 | \n",
- " 0.479627 | \n",
+ " 5.079500 | \n",
+ " 4.412057 | \n",
+ " 1.000000 | \n",
"
\n",
" \n",
" 800 | \n",
- " 1.315600 | \n",
- " 0.385632 | \n",
- " 0.447419 | \n",
+ " 3.565800 | \n",
+ " 3.520337 | \n",
+ " 1.000000 | \n",
"
\n",
" \n",
" 1200 | \n",
- " 1.239600 | \n",
- " 0.359977 | \n",
- " 0.430733 | \n",
+ " 3.368900 | \n",
+ " 2.898376 | \n",
+ " 0.999596 | \n",
"
\n",
" \n",
" 1600 | \n",
- " 1.144400 | \n",
- " 0.342276 | \n",
- " 0.417928 | \n",
+ " 2.010000 | \n",
+ " 1.004076 | \n",
+ " 0.728814 | \n",
"
\n",
" \n",
" 2000 | \n",
- " 1.097900 | \n",
- " 0.337029 | \n",
- " 0.388436 | \n",
+ " 1.678300 | \n",
+ " 0.694064 | \n",
+ " 0.598870 | \n",
"
\n",
" \n",
" 2400 | \n",
- " 1.071400 | \n",
- " 0.323725 | \n",
- " 0.370974 | \n",
+ " 1.527000 | \n",
+ " 0.559943 | \n",
+ " 0.528249 | \n",
"
\n",
" \n",
" 2800 | \n",
- " 1.044200 | \n",
- " 0.333624 | \n",
- " 0.368258 | \n",
+ " 1.427800 | \n",
+ " 0.482676 | \n",
+ " 0.480630 | \n",
"
\n",
" \n",
" 3200 | \n",
- " 1.049200 | \n",
- " 0.316629 | \n",
- " 0.352736 | \n",
+ " 1.345800 | \n",
+ " 0.442869 | \n",
+ " 0.453188 | \n",
"
\n",
" \n",
" 3600 | \n",
- " 1.028400 | \n",
- " 0.317763 | \n",
- " 0.356616 | \n",
+ " 1.289300 | \n",
+ " 0.415609 | \n",
+ " 0.433010 | \n",
"
\n",
" \n",
" 4000 | \n",
- " 1.030200 | \n",
- " 0.314151 | \n",
- " 0.351184 | \n",
+ " 1.244100 | \n",
+ " 0.402046 | \n",
+ " 0.403955 | \n",
+ "
\n",
+ " \n",
+ " 4400 | \n",
+ " 1.188000 | \n",
+ " 0.377747 | \n",
+ " 0.386602 | \n",
+ "
\n",
+ " \n",
+ " 4800 | \n",
+ " 1.162800 | \n",
+ " 0.360746 | \n",
+ " 0.385795 | \n",
+ "
\n",
+ " \n",
+ " 5200 | \n",
+ " 1.132400 | \n",
+ " 0.353398 | \n",
+ " 0.360371 | \n",
+ "
\n",
+ " \n",
+ " 5600 | \n",
+ " 1.096900 | \n",
+ " 0.342845 | \n",
+ " 0.362389 | \n",
+ "
\n",
+ " \n",
+ " 6000 | \n",
+ " 1.089700 | \n",
+ " 0.338743 | \n",
+ " 0.356739 | \n",
+ "
\n",
+ " \n",
+ " 6400 | \n",
+ " 1.062500 | \n",
+ " 0.333874 | \n",
+ " 0.349879 | \n",
+ "
\n",
+ " \n",
+ " 6800 | \n",
+ " 1.060100 | \n",
+ " 0.328815 | \n",
+ " 0.344633 | \n",
+ "
\n",
+ " \n",
+ " 7200 | \n",
+ " 1.047400 | \n",
+ " 0.328094 | \n",
+ " 0.346247 | \n",
"
\n",
" \n",
"
"
@@ -20245,35 +20047,33 @@
"text": [
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-400\n",
"Configuration saved in ./checkpoint-400/config.json\n",
"Model weights saved in ./checkpoint-400/pytorch_model.bin\n",
"Configuration saved in ./checkpoint-400/preprocessor_config.json\n",
- "Deleting older checkpoint [checkpoint-3200] due to args.save_total_limit\n",
- "Deleting older checkpoint [checkpoint-3600] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-800\n",
"Configuration saved in ./checkpoint-800/config.json\n",
"Model weights saved in ./checkpoint-800/pytorch_model.bin\n",
"Configuration saved in ./checkpoint-800/preprocessor_config.json\n",
- "Deleting older checkpoint [checkpoint-4000-prev-best] due to args.save_total_limit\n",
+ "Deleting older checkpoint [checkpoint-3200] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-1200\n",
"Configuration saved in ./checkpoint-1200/config.json\n",
"Model weights saved in ./checkpoint-1200/pytorch_model.bin\n",
"Configuration saved in ./checkpoint-1200/preprocessor_config.json\n",
- "Deleting older checkpoint [checkpoint-4000] due to args.save_total_limit\n",
+ "Deleting older checkpoint [checkpoint-3600] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-1600\n",
"Configuration saved in ./checkpoint-1600/config.json\n",
@@ -20282,7 +20082,7 @@
"Deleting older checkpoint [checkpoint-400] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-2000\n",
"Configuration saved in ./checkpoint-2000/config.json\n",
@@ -20291,7 +20091,7 @@
"Deleting older checkpoint [checkpoint-800] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-2400\n",
"Configuration saved in ./checkpoint-2400/config.json\n",
@@ -20300,7 +20100,7 @@
"Deleting older checkpoint [checkpoint-1200] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-2800\n",
"Configuration saved in ./checkpoint-2800/config.json\n",
@@ -20309,7 +20109,7 @@
"Deleting older checkpoint [checkpoint-1600] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-3200\n",
"Configuration saved in ./checkpoint-3200/config.json\n",
@@ -20318,7 +20118,7 @@
"Deleting older checkpoint [checkpoint-2000] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-3600\n",
"Configuration saved in ./checkpoint-3600/config.json\n",
@@ -20327,28 +20127,100 @@
"Deleting older checkpoint [checkpoint-2400] due to args.save_total_limit\n",
"The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
"***** Running Evaluation *****\n",
- " Num examples = 291\n",
+ " Num examples = 262\n",
" Batch size = 8\n",
"Saving model checkpoint to ./checkpoint-4000\n",
"Configuration saved in ./checkpoint-4000/config.json\n",
"Model weights saved in ./checkpoint-4000/pytorch_model.bin\n",
"Configuration saved in ./checkpoint-4000/preprocessor_config.json\n",
"Deleting older checkpoint [checkpoint-2800] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-4400\n",
+ "Configuration saved in ./checkpoint-4400/config.json\n",
+ "Model weights saved in ./checkpoint-4400/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-4400/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-3200] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-4800\n",
+ "Configuration saved in ./checkpoint-4800/config.json\n",
+ "Model weights saved in ./checkpoint-4800/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-4800/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-3600] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-5200\n",
+ "Configuration saved in ./checkpoint-5200/config.json\n",
+ "Model weights saved in ./checkpoint-5200/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-5200/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-4000] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-5600\n",
+ "Configuration saved in ./checkpoint-5600/config.json\n",
+ "Model weights saved in ./checkpoint-5600/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-5600/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-4400] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-6000\n",
+ "Configuration saved in ./checkpoint-6000/config.json\n",
+ "Model weights saved in ./checkpoint-6000/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-6000/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-4800] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-6400\n",
+ "Configuration saved in ./checkpoint-6400/config.json\n",
+ "Model weights saved in ./checkpoint-6400/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-6400/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-5200] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-6800\n",
+ "Configuration saved in ./checkpoint-6800/config.json\n",
+ "Model weights saved in ./checkpoint-6800/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-6800/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-5600] due to args.save_total_limit\n",
+ "The following columns in the evaluation set don't have a corresponding argument in `Wav2Vec2ForCTC.forward` and have been ignored: input_length.\n",
+ "***** Running Evaluation *****\n",
+ " Num examples = 262\n",
+ " Batch size = 8\n",
+ "Saving model checkpoint to ./checkpoint-7200\n",
+ "Configuration saved in ./checkpoint-7200/config.json\n",
+ "Model weights saved in ./checkpoint-7200/pytorch_model.bin\n",
+ "Configuration saved in ./checkpoint-7200/preprocessor_config.json\n",
+ "Deleting older checkpoint [checkpoint-6000] due to args.save_total_limit\n",
"\n",
"\n",
"Training completed. Do not forget to share your model on huggingface.co/models =)\n",
"\n",
"\n",
- "Loading best model from ./checkpoint-4000 (score: 0.3141506016254425).\n"
+ "Loading best model from ./checkpoint-7200 (score: 0.3280937969684601).\n"
]
},
{
"data": {
"text/plain": [
- "TrainOutput(global_step=4050, training_loss=1.1567209813624253, metrics={'train_runtime': 8173.6251, 'train_samples_per_second': 15.997, 'train_steps_per_second': 0.495, 'total_flos': 1.9735608328149316e+19, 'train_loss': 1.1567209813624253, 'epoch': 49.99})"
+ "TrainOutput(global_step=7300, training_loss=2.0282830110314776, metrics={'train_runtime': 14754.0737, 'train_samples_per_second': 15.948, 'train_steps_per_second': 0.495, 'total_flos': 3.5572390287970673e+19, 'train_loss': 2.0282830110314776, 'epoch': 99.99})"
]
},
- "execution_count": 71,
+ "execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
@@ -20359,8 +20231,29 @@
},
{
"cell_type": "code",
- "execution_count": 57,
- "id": "19b3350f",
+ "execution_count": 31,
+ "id": "e9563734",
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "1"
+ ]
+ },
+ "execution_count": 31,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "1"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "id": "4c8fe67e",
"metadata": {},
"outputs": [
{
@@ -20369,8 +20262,21 @@
"text": [
"tokenizer config file saved in vitouphy/xls-r-300m-km/tokenizer_config.json\n",
"Special tokens file saved in vitouphy/xls-r-300m-km/special_tokens_map.json\n",
- "added tokens file saved in vitouphy/xls-r-300m-km/added_tokens.json\n"
+ "added tokens file saved in vitouphy/xls-r-300m-km/added_tokens.json\n",
+ "To https://huggingface.co/vitouphy/xls-r-300m-km\n",
+ " 3ef5dfc..cb4f72c main -> main\n",
+ "\n"
]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "'https://huggingface.co/vitouphy/xls-r-300m-km/commit/cb4f72cb420eee8ca1f44b582a9d3cfbcd258f3d'"
+ ]
+ },
+ "execution_count": 32,
+ "metadata": {},
+ "output_type": "execute_result"
}
],
"source": [
@@ -20379,8 +20285,8 @@
},
{
"cell_type": "code",
- "execution_count": 72,
- "id": "724e14ef",
+ "execution_count": 34,
+ "id": "dc64c376",
"metadata": {},
"outputs": [],
"source": [
@@ -20388,7 +20294,7 @@
" \"finetuned_from\": \"facebook/wav2vec2-xls-r-300m\",\n",
" \"tasks\": \"speech-recognition\",\n",
" \"tags\": [\"automatic-speech-recognition\", \"openslr\", \"robust-speech-event\", \"km\"],\n",
- " \"dataset_args\": f\"Config: km, Training split: train+validation, Eval split: test\",\n",
+ " \"dataset_args\": f\"Config: km, Training split: train, Eval split: validation\",\n",
" \"dataset\": \"openslr\",\n",
" \"language\": \"km\"\n",
"}"
@@ -20396,8 +20302,8 @@
},
{
"cell_type": "code",
- "execution_count": 73,
- "id": "75b87f11",
+ "execution_count": 35,
+ "id": "9f9d87c3",
"metadata": {},
"outputs": [
{
@@ -20415,75 +20321,10 @@
},
{
"cell_type": "code",
- "execution_count": 74,
- "id": "9e4a2ec9",
+ "execution_count": 36,
+ "id": "4b50cbfe",
"metadata": {},
"outputs": [
- {
- "name": "stderr",
- "output_type": "stream",
- "text": [
- "/opt/conda/lib/python3.8/site-packages/huggingface_hub/hf_api.py:1001: FutureWarning: `create_repo` now takes `token` as an optional positional argument. Be sure to adapt your code!\n",
- " warnings.warn(\n",
- "Cloning https://huggingface.co/vitouphy/xls-r-300m-km into local empty directory.\n"
- ]
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "ae4aa0641113454c801089fa2dbd6777",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Download file pytorch_model.bin: 0%| | 2.83k/1.18G [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "9a3129d18855473ba7da0f290f26419b",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Download file training_args.bin: 63%|######2 | 1.84k/2.92k [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "dabccfa9f14045919cf70a905afb5506",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Clean file training_args.bin: 34%|###4 | 1.00k/2.92k [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "application/vnd.jupyter.widget-view+json": {
- "model_id": "ee7e633b1e784625b2d3695176f6c0f2",
- "version_major": 2,
- "version_minor": 0
- },
- "text/plain": [
- "Clean file pytorch_model.bin: 0%| | 1.00k/1.18G [00:00, ?B/s]"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
{
"name": "stderr",
"output_type": "stream",
@@ -20495,7 +20336,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
- "model_id": "9738e4743ca3470f863dfd4d85f6e411",
+ "model_id": "69dc015463b64e3c946ccfbe017d1828",
"version_major": 2,
"version_minor": 0
},
@@ -20511,17 +20352,17 @@
"output_type": "stream",
"text": [
"To https://huggingface.co/vitouphy/xls-r-300m-km\n",
- " 6f203d5..74be6ec main -> main\n",
+ " cb4f72c..8fe8876 main -> main\n",
"\n"
]
},
{
"data": {
"text/plain": [
- "'https://huggingface.co/vitouphy/xls-r-300m-km/commit/74be6ece8cca85ef00972b1f3f88460217d0acf5'"
+ "'https://huggingface.co/vitouphy/xls-r-300m-km/commit/8fe88762a9fca1dce5e056605465042b5700b69e'"
]
},
- "execution_count": 74,
+ "execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
@@ -20532,8 +20373,8 @@
},
{
"cell_type": "code",
- "execution_count": 75,
- "id": "8c70b0b9",
+ "execution_count": 37,
+ "id": "33a99751",
"metadata": {},
"outputs": [
{
@@ -20554,7 +20395,7 @@
{
"cell_type": "code",
"execution_count": null,
- "id": "96cd8308",
+ "id": "b9482eed",
"metadata": {},
"outputs": [],
"source": []