kimbochen commited on
Commit
475f898
1 Parent(s): f850092

Training in progress, step 200

Browse files
fine-tune-whisper-streaming.ipynb CHANGED
@@ -17221,7 +17221,7 @@
17221
  },
17222
  {
17223
  "cell_type": "code",
17224
- "execution_count": 53,
17225
  "id": "0ae3e9af-97b7-4aa0-ae85-20b23b5bcb3a",
17226
  "metadata": {},
17227
  "outputs": [
@@ -17241,12 +17241,12 @@
17241
  " per_device_train_batch_size=64,\n",
17242
  " gradient_accumulation_steps=1, # increase by 2x for every 2x decrease in batch size\n",
17243
  " learning_rate=1e-5,\n",
17244
- " warmup_steps=100,\n",
17245
  " max_steps=1000,\n",
17246
  " gradient_checkpointing=True,\n",
17247
  " fp16=True,\n",
17248
  " evaluation_strategy=\"steps\",\n",
17249
- " per_device_eval_batch_size=8,\n",
17250
  " predict_with_generate=True,\n",
17251
  " generation_max_length=225,\n",
17252
  " save_steps=200,\n",
@@ -17308,7 +17308,7 @@
17308
  },
17309
  {
17310
  "cell_type": "code",
17311
- "execution_count": 55,
17312
  "id": "d546d7fe-0543-479a-b708-2ebabec19493",
17313
  "metadata": {},
17314
  "outputs": [
@@ -17347,7 +17347,7 @@
17347
  },
17348
  {
17349
  "cell_type": "code",
17350
- "execution_count": 56,
17351
  "id": "a1ccb9ed-cbc8-4419-91c0-651e9424b672",
17352
  "metadata": {},
17353
  "outputs": [
@@ -17393,7 +17393,7 @@
17393
  },
17394
  {
17395
  "cell_type": "code",
17396
- "execution_count": 57,
17397
  "id": "ee8b7b8e-1c9a-4d77-9137-1778a629e6de",
17398
  "metadata": {
17399
  "scrolled": false
@@ -17413,8 +17413,8 @@
17413
  " Gradient Accumulation steps = 1\n",
17414
  " Total optimization steps = 1000\n",
17415
  " Number of trainable parameters = 241734912\n",
17416
- "Reading metadata...: 6568it [00:00, 31531.18it/s]\n",
17417
- "Reading metadata...: 4709it [00:00, 27757.91it/s]\n",
17418
  "The following columns in the training set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n"
17419
  ]
17420
  },
@@ -17424,8 +17424,8 @@
17424
  "\n",
17425
  " <div>\n",
17426
  " \n",
17427
- " <progress value='1000' max='1000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
17428
- " [1000/1000 3:24:18, Epoch 6/9223372036854775807]\n",
17429
  " </div>\n",
17430
  " <table border=\"1\" class=\"dataframe\">\n",
17431
  " <thead>\n",
@@ -17433,40 +17433,9 @@
17433
  " <th>Step</th>\n",
17434
  " <th>Training Loss</th>\n",
17435
  " <th>Validation Loss</th>\n",
17436
- " <th>Wer</th>\n",
17437
  " </tr>\n",
17438
  " </thead>\n",
17439
  " <tbody>\n",
17440
- " <tr>\n",
17441
- " <td>200</td>\n",
17442
- " <td>0.143800</td>\n",
17443
- " <td>0.182196</td>\n",
17444
- " <td>42.436029</td>\n",
17445
- " </tr>\n",
17446
- " <tr>\n",
17447
- " <td>400</td>\n",
17448
- " <td>0.031500</td>\n",
17449
- " <td>0.186944</td>\n",
17450
- " <td>42.128966</td>\n",
17451
- " </tr>\n",
17452
- " <tr>\n",
17453
- " <td>600</td>\n",
17454
- " <td>0.011300</td>\n",
17455
- " <td>0.195321</td>\n",
17456
- " <td>40.634596</td>\n",
17457
- " </tr>\n",
17458
- " <tr>\n",
17459
- " <td>800</td>\n",
17460
- " <td>0.005300</td>\n",
17461
- " <td>0.194970</td>\n",
17462
- " <td>40.675537</td>\n",
17463
- " </tr>\n",
17464
- " <tr>\n",
17465
- " <td>1000</td>\n",
17466
- " <td>0.003500</td>\n",
17467
- " <td>0.198375</td>\n",
17468
- " <td>40.818833</td>\n",
17469
- " </tr>\n",
17470
  " </tbody>\n",
17471
  "</table><p>"
17472
  ],
@@ -17481,115 +17450,14 @@
17481
  "name": "stderr",
17482
  "output_type": "stream",
17483
  "text": [
17484
- "Reading metadata...: 6568it [00:00, 36204.27it/s]\n",
17485
- "Reading metadata...: 4709it [00:00, 51489.81it/s]\n",
17486
- "***** Running Evaluation *****\n",
17487
- " Num examples: Unknown\n",
17488
- " Batch size = 8\n",
17489
- "Reading metadata...: 4709it [00:00, 28976.18it/s]\n",
17490
- "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n",
17491
- "Saving model checkpoint to ./checkpoint-200\n",
17492
- "Configuration saved in ./checkpoint-200/config.json\n",
17493
- "Model weights saved in ./checkpoint-200/pytorch_model.bin\n",
17494
- "Feature extractor saved in ./checkpoint-200/preprocessor_config.json\n",
17495
- "tokenizer config file saved in ./checkpoint-200/tokenizer_config.json\n",
17496
- "Special tokens file saved in ./checkpoint-200/special_tokens_map.json\n",
17497
- "added tokens file saved in ./checkpoint-200/added_tokens.json\n",
17498
- "Feature extractor saved in ./preprocessor_config.json\n",
17499
- "tokenizer config file saved in ./tokenizer_config.json\n",
17500
- "Special tokens file saved in ./special_tokens_map.json\n",
17501
- "added tokens file saved in ./added_tokens.json\n",
17502
- "Reading metadata...: 6568it [00:00, 38299.83it/s]\n",
17503
- "Reading metadata...: 4709it [00:00, 30779.86it/s]\n",
17504
- "***** Running Evaluation *****\n",
17505
- " Num examples: Unknown\n",
17506
- " Batch size = 8\n",
17507
- "Reading metadata...: 4709it [00:00, 26095.46it/s]\n",
17508
- "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n",
17509
- "Saving model checkpoint to ./checkpoint-400\n",
17510
- "Configuration saved in ./checkpoint-400/config.json\n",
17511
- "Model weights saved in ./checkpoint-400/pytorch_model.bin\n",
17512
- "Feature extractor saved in ./checkpoint-400/preprocessor_config.json\n",
17513
- "tokenizer config file saved in ./checkpoint-400/tokenizer_config.json\n",
17514
- "Special tokens file saved in ./checkpoint-400/special_tokens_map.json\n",
17515
- "added tokens file saved in ./checkpoint-400/added_tokens.json\n",
17516
- "Feature extractor saved in ./preprocessor_config.json\n",
17517
- "tokenizer config file saved in ./tokenizer_config.json\n",
17518
- "Special tokens file saved in ./special_tokens_map.json\n",
17519
- "added tokens file saved in ./added_tokens.json\n",
17520
- "Reading metadata...: 6568it [00:00, 41768.54it/s]\n",
17521
- "Reading metadata...: 4709it [00:00, 23263.16it/s]\n",
17522
- "Reading metadata...: 6568it [00:00, 38529.47it/s]\n",
17523
- "Reading metadata...: 4709it [00:00, 70740.82it/s]\n",
17524
  "***** Running Evaluation *****\n",
17525
  " Num examples: Unknown\n",
17526
- " Batch size = 8\n",
17527
- "Reading metadata...: 4709it [00:00, 77474.87it/s]\n",
17528
- "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n",
17529
- "Saving model checkpoint to ./checkpoint-600\n",
17530
- "Configuration saved in ./checkpoint-600/config.json\n",
17531
- "Model weights saved in ./checkpoint-600/pytorch_model.bin\n",
17532
- "Feature extractor saved in ./checkpoint-600/preprocessor_config.json\n",
17533
- "tokenizer config file saved in ./checkpoint-600/tokenizer_config.json\n",
17534
- "Special tokens file saved in ./checkpoint-600/special_tokens_map.json\n",
17535
- "added tokens file saved in ./checkpoint-600/added_tokens.json\n",
17536
- "Feature extractor saved in ./preprocessor_config.json\n",
17537
- "tokenizer config file saved in ./tokenizer_config.json\n",
17538
- "Special tokens file saved in ./special_tokens_map.json\n",
17539
- "added tokens file saved in ./added_tokens.json\n",
17540
- "Reading metadata...: 6568it [00:01, 5110.39it/s]\n",
17541
- "Reading metadata...: 4709it [00:01, 4212.71it/s]\n",
17542
- "***** Running Evaluation *****\n",
17543
- " Num examples: Unknown\n",
17544
- " Batch size = 8\n",
17545
- "Reading metadata...: 4709it [00:00, 24099.70it/s]\n",
17546
- "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n",
17547
- "Saving model checkpoint to ./checkpoint-800\n",
17548
- "Configuration saved in ./checkpoint-800/config.json\n",
17549
- "Model weights saved in ./checkpoint-800/pytorch_model.bin\n",
17550
- "Feature extractor saved in ./checkpoint-800/preprocessor_config.json\n",
17551
- "tokenizer config file saved in ./checkpoint-800/tokenizer_config.json\n",
17552
- "Special tokens file saved in ./checkpoint-800/special_tokens_map.json\n",
17553
- "added tokens file saved in ./checkpoint-800/added_tokens.json\n",
17554
- "Feature extractor saved in ./preprocessor_config.json\n",
17555
- "tokenizer config file saved in ./tokenizer_config.json\n",
17556
- "Special tokens file saved in ./special_tokens_map.json\n",
17557
- "added tokens file saved in ./added_tokens.json\n",
17558
- "Reading metadata...: 6568it [00:00, 37023.20it/s]\n",
17559
- "Reading metadata...: 4709it [00:00, 27973.51it/s]\n",
17560
- "***** Running Evaluation *****\n",
17561
- " Num examples: Unknown\n",
17562
- " Batch size = 8\n",
17563
- "Reading metadata...: 4709it [00:00, 75003.52it/s]\n",
17564
- "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n",
17565
- "Saving model checkpoint to ./checkpoint-1000\n",
17566
- "Configuration saved in ./checkpoint-1000/config.json\n",
17567
- "Model weights saved in ./checkpoint-1000/pytorch_model.bin\n",
17568
- "Feature extractor saved in ./checkpoint-1000/preprocessor_config.json\n",
17569
- "tokenizer config file saved in ./checkpoint-1000/tokenizer_config.json\n",
17570
- "Special tokens file saved in ./checkpoint-1000/special_tokens_map.json\n",
17571
- "added tokens file saved in ./checkpoint-1000/added_tokens.json\n",
17572
- "Feature extractor saved in ./preprocessor_config.json\n",
17573
- "tokenizer config file saved in ./tokenizer_config.json\n",
17574
- "Special tokens file saved in ./special_tokens_map.json\n",
17575
- "added tokens file saved in ./added_tokens.json\n",
17576
- "\n",
17577
- "\n",
17578
- "Training completed. Do not forget to share your model on huggingface.co/models =)\n",
17579
- "\n",
17580
- "\n",
17581
- "Loading best model from ./checkpoint-600 (score: 40.634595701125896).\n"
17582
  ]
17583
- },
17584
- {
17585
- "data": {
17586
- "text/plain": [
17587
- "TrainOutput(global_step=1000, training_loss=0.2253765360042453, metrics={'train_runtime': 12295.6043, 'train_samples_per_second': 5.205, 'train_steps_per_second': 0.081, 'total_flos': 1.837596395077632e+19, 'train_loss': 0.2253765360042453, 'epoch': 6.11})"
17588
- ]
17589
- },
17590
- "execution_count": 57,
17591
- "metadata": {},
17592
- "output_type": "execute_result"
17593
  }
17594
  ],
17595
  "source": [
@@ -17618,7 +17486,7 @@
17618
  },
17619
  {
17620
  "cell_type": "code",
17621
- "execution_count": 40,
17622
  "id": "6dd0e310-9b07-4133-ac14-2ed2d7524e22",
17623
  "metadata": {},
17624
  "outputs": [],
@@ -17644,7 +17512,7 @@
17644
  },
17645
  {
17646
  "cell_type": "code",
17647
- "execution_count": 41,
17648
  "id": "95737cda-c5dd-4887-a4d0-dfcb0d61d977",
17649
  "metadata": {},
17650
  "outputs": [
@@ -17658,21 +17526,44 @@
17658
  "Feature extractor saved in ./preprocessor_config.json\n",
17659
  "tokenizer config file saved in ./tokenizer_config.json\n",
17660
  "Special tokens file saved in ./special_tokens_map.json\n",
17661
- "added tokens file saved in ./added_tokens.json\n",
17662
- "Several commits (2) will be pushed upstream.\n",
17663
- "The progress bars may be unreliable.\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17664
  "To https://huggingface.co/kimbochen/whisper-small-zh-tw\n",
17665
- " 61dfe27..a94bfc3 main -> main\n",
17666
  "\n"
17667
  ]
17668
  },
17669
  {
17670
  "data": {
17671
  "text/plain": [
17672
- "'https://huggingface.co/kimbochen/whisper-small-zh-tw/commit/a94bfc3cbb71b83e10525899df53ee0d4db96e32'"
17673
  ]
17674
  },
17675
- "execution_count": 41,
17676
  "metadata": {},
17677
  "output_type": "execute_result"
17678
  }
 
17221
  },
17222
  {
17223
  "cell_type": "code",
17224
+ "execution_count": 60,
17225
  "id": "0ae3e9af-97b7-4aa0-ae85-20b23b5bcb3a",
17226
  "metadata": {},
17227
  "outputs": [
 
17241
  " per_device_train_batch_size=64,\n",
17242
  " gradient_accumulation_steps=1, # increase by 2x for every 2x decrease in batch size\n",
17243
  " learning_rate=1e-5,\n",
17244
+ " warmup_steps=400,\n",
17245
  " max_steps=1000,\n",
17246
  " gradient_checkpointing=True,\n",
17247
  " fp16=True,\n",
17248
  " evaluation_strategy=\"steps\",\n",
17249
+ " per_device_eval_batch_size=32,\n",
17250
  " predict_with_generate=True,\n",
17251
  " generation_max_length=225,\n",
17252
  " save_steps=200,\n",
 
17308
  },
17309
  {
17310
  "cell_type": "code",
17311
+ "execution_count": 61,
17312
  "id": "d546d7fe-0543-479a-b708-2ebabec19493",
17313
  "metadata": {},
17314
  "outputs": [
 
17347
  },
17348
  {
17349
  "cell_type": "code",
17350
+ "execution_count": 62,
17351
  "id": "a1ccb9ed-cbc8-4419-91c0-651e9424b672",
17352
  "metadata": {},
17353
  "outputs": [
 
17393
  },
17394
  {
17395
  "cell_type": "code",
17396
+ "execution_count": null,
17397
  "id": "ee8b7b8e-1c9a-4d77-9137-1778a629e6de",
17398
  "metadata": {
17399
  "scrolled": false
 
17413
  " Gradient Accumulation steps = 1\n",
17414
  " Total optimization steps = 1000\n",
17415
  " Number of trainable parameters = 241734912\n",
17416
+ "Reading metadata...: 6568it [00:00, 35448.85it/s]\n",
17417
+ "Reading metadata...: 4709it [00:00, 28564.29it/s]\n",
17418
  "The following columns in the training set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n"
17419
  ]
17420
  },
 
17424
  "\n",
17425
  " <div>\n",
17426
  " \n",
17427
+ " <progress value='201' max='1000' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
17428
+ " [ 201/1000 22:02 < 1:28:28, 0.15 it/s, Epoch 1.05/9223372036854775807]\n",
17429
  " </div>\n",
17430
  " <table border=\"1\" class=\"dataframe\">\n",
17431
  " <thead>\n",
 
17433
  " <th>Step</th>\n",
17434
  " <th>Training Loss</th>\n",
17435
  " <th>Validation Loss</th>\n",
 
17436
  " </tr>\n",
17437
  " </thead>\n",
17438
  " <tbody>\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17439
  " </tbody>\n",
17440
  "</table><p>"
17441
  ],
 
17450
  "name": "stderr",
17451
  "output_type": "stream",
17452
  "text": [
17453
+ "Reading metadata...: 6568it [00:00, 74826.88it/s]\n",
17454
+ "Reading metadata...: 4709it [00:00, 56808.90it/s]\n",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17455
  "***** Running Evaluation *****\n",
17456
  " Num examples: Unknown\n",
17457
+ " Batch size = 32\n",
17458
+ "Reading metadata...: 4709it [00:00, 75164.22it/s]\n",
17459
+ "The following columns in the evaluation set don't have a corresponding argument in `WhisperForConditionalGeneration.forward` and have been ignored: input_length. If input_length are not expected by `WhisperForConditionalGeneration.forward`, you can safely ignore this message.\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17460
  ]
 
 
 
 
 
 
 
 
 
 
17461
  }
17462
  ],
17463
  "source": [
 
17486
  },
17487
  {
17488
  "cell_type": "code",
17489
+ "execution_count": 58,
17490
  "id": "6dd0e310-9b07-4133-ac14-2ed2d7524e22",
17491
  "metadata": {},
17492
  "outputs": [],
 
17512
  },
17513
  {
17514
  "cell_type": "code",
17515
+ "execution_count": 59,
17516
  "id": "95737cda-c5dd-4887-a4d0-dfcb0d61d977",
17517
  "metadata": {},
17518
  "outputs": [
 
17526
  "Feature extractor saved in ./preprocessor_config.json\n",
17527
  "tokenizer config file saved in ./tokenizer_config.json\n",
17528
  "Special tokens file saved in ./special_tokens_map.json\n",
17529
+ "added tokens file saved in ./added_tokens.json\n"
17530
+ ]
17531
+ },
17532
+ {
17533
+ "data": {
17534
+ "application/vnd.jupyter.widget-view+json": {
17535
+ "model_id": "0b88e4ea531d43cfa1236af181f8c616",
17536
+ "version_major": 2,
17537
+ "version_minor": 0
17538
+ },
17539
+ "text/plain": [
17540
+ "Upload file runs/Dec12_02-00-57_129-213-26-143/events.out.tfevents.1670810506.129-213-26-143.742932.2: 100%|##…"
17541
+ ]
17542
+ },
17543
+ "metadata": {},
17544
+ "output_type": "display_data"
17545
+ },
17546
+ {
17547
+ "name": "stderr",
17548
+ "output_type": "stream",
17549
+ "text": [
17550
+ "remote: Scanning LFS files for validity, may be slow... \n",
17551
+ "remote: LFS file scan complete. \n",
17552
+ "To https://huggingface.co/kimbochen/whisper-small-zh-tw\n",
17553
+ " 6b0c554..7c46fec main -> main\n",
17554
+ "\n",
17555
  "To https://huggingface.co/kimbochen/whisper-small-zh-tw\n",
17556
+ " 7c46fec..f850092 main -> main\n",
17557
  "\n"
17558
  ]
17559
  },
17560
  {
17561
  "data": {
17562
  "text/plain": [
17563
+ "'https://huggingface.co/kimbochen/whisper-small-zh-tw/commit/7c46fec34e4a0b7f00520d6b3a631c660abd4bcb'"
17564
  ]
17565
  },
17566
+ "execution_count": 59,
17567
  "metadata": {},
17568
  "output_type": "execute_result"
17569
  }
pytorch_model.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:aaecf242a6944c2e9633600b31b6c65ef158093a1c1e3d9eb4f0499ddcb2dca1
3
  size 967102601
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cb37f4807695ef0cf30f794f76b317c5b79f755c467f435befb67f31df77787
3
  size 967102601
runs/Dec12_05-39-20_129-213-26-143/1670823583.842599/events.out.tfevents.1670823583.129-213-26-143.742932.5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d5806263a1076590d79082c55193f82aba73d96ef13fd2e8e0834b98375f7bf
3
+ size 5864
runs/Dec12_05-39-20_129-213-26-143/events.out.tfevents.1670823583.129-213-26-143.742932.4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:996919504c3e7191f68da639257628f842bc64f49df4b512988d59ebeaf27882
3
+ size 5845
training_args.bin CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9d97d92b4d57394382fb181e666c91764f7c97306ef64244dbb9caab670c3ac3
3
  size 3579
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f28d2ccc5bfe83c89432546f340a509d32bcdb5ecc2c9ee24b9703b9d097b8d
3
  size 3579