OutOfMystic commited on
Commit
8af98fa
·
1 Parent(s): 2038b66

two-step learning

Browse files
Files changed (1) hide show
  1. tetris_training.ipynb +592 -28
tetris_training.ipynb CHANGED
@@ -18,11 +18,23 @@
18
  },
19
  {
20
  "cell_type": "code",
21
- "execution_count": null,
22
  "metadata": {
23
- "id": "PHNUG6nYFG8L"
 
 
 
 
24
  },
25
- "outputs": [],
 
 
 
 
 
 
 
 
26
  "source": [
27
  "# Cell 1: Install dependencies\n",
28
  "!pip install peft accelerate -q\n",
@@ -32,11 +44,65 @@
32
  },
33
  {
34
  "cell_type": "code",
35
- "execution_count": null,
36
  "metadata": {
37
- "id": "4CEG1_JMFG8L"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  },
39
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
  "source": [
41
  "# Cell 2: Load Qwen2.5-3B-Instruct + LoRA (INT4 / QLoRA)\n",
42
  "import torch\n",
@@ -77,11 +143,31 @@
77
  },
78
  {
79
  "cell_type": "code",
80
- "execution_count": null,
81
  "metadata": {
82
- "id": "D3HDc8_3FG8L"
 
 
 
 
83
  },
84
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  "source": [
86
  "# Cell 3: Game engine + constants + prompt builder\n",
87
  "import random\n",
@@ -152,11 +238,25 @@
152
  },
153
  {
154
  "cell_type": "code",
155
- "execution_count": null,
156
  "metadata": {
157
- "id": "3O3yawZBFG8M"
 
 
 
 
158
  },
159
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
160
  "source": [
161
  "# Cell 4: Core training functions — batched play + train\n",
162
  "import time as _time\n",
@@ -416,11 +516,54 @@
416
  },
417
  {
418
  "cell_type": "code",
419
- "execution_count": null,
420
  "metadata": {
421
- "id": "JdcKswz5FG8M"
 
 
 
 
422
  },
423
- "outputs": [],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
  "source": [
425
  "# Cell 5: Demo — UNTRAINED model plays one game\n",
426
  "print(\"=== UNTRAINED MODEL ===\\n\")\n",
@@ -441,42 +584,117 @@
441
  {
442
  "cell_type": "code",
443
  "source": [
444
- "# Cell 6: Training loop — 100 iterations of per-piece GRPO\n",
445
  "import time\n",
446
  "\n",
447
  "optimizer = torch.optim.AdamW(\n",
448
  " [p for p in model.parameters() if p.requires_grad],\n",
449
- " lr=5e-6,\n",
450
  " weight_decay=0.01,\n",
451
  ")\n",
452
  "\n",
453
  "history = []\n",
454
  "\n",
455
- "print(\"Starting per-piece GRPO training...\")\n",
456
- "print(f\"Config: {GAMES_PER_ITER} games/iter, max {MAX_PIECES_PER_GAME} pieces/game, \"\n",
457
- " f\"max {MAX_ACTIONS_PER_PIECE} tokens/piece, {NUM_ITERATIONS} iterations\\n\")\n",
 
 
 
 
 
 
458
  "\n",
459
- "for iteration in range(NUM_ITERATIONS):\n",
 
460
  " stats = train_one_iteration(model, optimizer, seed=iteration)\n",
 
461
  " history.append(stats)\n",
462
  "\n",
463
- " print(f\"[Iter {iteration:3d}] \"\n",
464
  " f\"reward={stats['mean_reward']:+8.1f} \"\n",
465
  " f\"std={stats['std_reward']:6.1f} \"\n",
466
  " f\"loss={stats['loss']:7.3f} \"\n",
467
  " f\"steps={stats['avg_steps']:5.1f} \"\n",
468
  " f\"lines={stats['avg_lines']:4.1f} \"\n",
469
  " f\"pieces={stats['avg_pieces']:4.1f} \"\n",
470
- " f\"roll={stats['t_rollout']:.1f}s \"\n",
471
- " f\"upd={stats['t_update']:.1f}s\")\n",
472
  "\n",
473
- "print(\"\\nTraining complete!\")\n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
474
  ],
475
  "metadata": {
476
- "id": "qBMZr8ONcnHf"
 
 
 
 
477
  },
478
  "execution_count": null,
479
- "outputs": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
480
  },
481
  {
482
  "cell_type": "code",
@@ -573,7 +791,353 @@
573
  "gpuType": "L4",
574
  "machine_shape": "hm"
575
  },
576
- "accelerator": "GPU"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  },
578
  "nbformat": 4,
579
  "nbformat_minor": 0
 
18
  },
19
  {
20
  "cell_type": "code",
21
+ "execution_count": 1,
22
  "metadata": {
23
+ "colab": {
24
+ "base_uri": "https://localhost:8080/"
25
+ },
26
+ "id": "PHNUG6nYFG8L",
27
+ "outputId": "0bc2d43c-0e75-4747-ff0a-43f4bf04ce11"
28
  },
29
+ "outputs": [
30
+ {
31
+ "output_type": "stream",
32
+ "name": "stdout",
33
+ "text": [
34
+ "0.49.2\n"
35
+ ]
36
+ }
37
+ ],
38
  "source": [
39
  "# Cell 1: Install dependencies\n",
40
  "!pip install peft accelerate -q\n",
 
44
  },
45
  {
46
  "cell_type": "code",
47
+ "execution_count": 2,
48
  "metadata": {
49
+ "colab": {
50
+ "base_uri": "https://localhost:8080/",
51
+ "height": 225,
52
+ "referenced_widgets": [
53
+ "f92c4ee10cc54940bb03b601032caa3b",
54
+ "dcb73d47d9e74a47b2df0958c244a970",
55
+ "f423256c65cc4d10a0406638c869f966",
56
+ "47be5c68b01e49fd811e78d28ab74982",
57
+ "12a720fa3c824ad697e3c907b64d703d",
58
+ "194015ffd14c44c0a9248c123521f3bd",
59
+ "2f41d69a29374e68bf298817ef58f316",
60
+ "23b8e87348af484bb33902b46a5f92b3",
61
+ "c89e1a38a59c41eaa57f87034a064348",
62
+ "b22f880ebfac47c383ce96a66f6a55c8",
63
+ "342a026486b24535a1b9d94f4b21cbe1"
64
+ ]
65
+ },
66
+ "id": "4CEG1_JMFG8L",
67
+ "outputId": "e4b98f14-8e32-41d0-a52c-3f9a94c3c117"
68
  },
69
+ "outputs": [
70
+ {
71
+ "output_type": "stream",
72
+ "name": "stderr",
73
+ "text": [
74
+ "/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
75
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
76
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
77
+ "You will be able to reuse this secret in all of your notebooks.\n",
78
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
79
+ " warnings.warn(\n",
80
+ "Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n",
81
+ "WARNING:huggingface_hub.utils._http:Warning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n"
82
+ ]
83
+ },
84
+ {
85
+ "output_type": "display_data",
86
+ "data": {
87
+ "text/plain": [
88
+ "Loading weights: 0%| | 0/338 [00:00<?, ?it/s]"
89
+ ],
90
+ "application/vnd.jupyter.widget-view+json": {
91
+ "version_major": 2,
92
+ "version_minor": 0,
93
+ "model_id": "f92c4ee10cc54940bb03b601032caa3b"
94
+ }
95
+ },
96
+ "metadata": {}
97
+ },
98
+ {
99
+ "output_type": "stream",
100
+ "name": "stdout",
101
+ "text": [
102
+ "trainable params: 18,464,768 || all params: 1,562,179,072 || trainable%: 1.1820\n"
103
+ ]
104
+ }
105
+ ],
106
  "source": [
107
  "# Cell 2: Load Qwen2.5-3B-Instruct + LoRA (INT4 / QLoRA)\n",
108
  "import torch\n",
 
143
  },
144
  {
145
  "cell_type": "code",
146
+ "execution_count": 3,
147
  "metadata": {
148
+ "colab": {
149
+ "base_uri": "https://localhost:8080/"
150
+ },
151
+ "id": "D3HDc8_3FG8L",
152
+ "outputId": "15ee2cfc-bca7-4b65-cb82-c7bf43c3dd49"
153
  },
154
+ "outputs": [
155
+ {
156
+ "output_type": "stream",
157
+ "name": "stdout",
158
+ "text": [
159
+ "Game engine v0.5.1\n",
160
+ " 'L' -> token_id 43\n",
161
+ " 'R' -> token_id 49\n",
162
+ " 'C' -> token_id 34\n",
163
+ " 'W' -> token_id 54\n",
164
+ " 'D' -> token_id 35\n",
165
+ " 'S' -> token_id 50\n",
166
+ "\n",
167
+ "Game engine loaded. Action tokens mapped.\n"
168
+ ]
169
+ }
170
+ ],
171
  "source": [
172
  "# Cell 3: Game engine + constants + prompt builder\n",
173
  "import random\n",
 
238
  },
239
  {
240
  "cell_type": "code",
241
+ "execution_count": 4,
242
  "metadata": {
243
+ "colab": {
244
+ "base_uri": "https://localhost:8080/"
245
+ },
246
+ "id": "3O3yawZBFG8M",
247
+ "outputId": "badc191d-b631-45a5-90a9-b92862df6e24"
248
  },
249
+ "outputs": [
250
+ {
251
+ "output_type": "stream",
252
+ "name": "stdout",
253
+ "text": [
254
+ "Smoke test: playing 1 game...\n",
255
+ "Reward: -526.0, Steps: 118, Pieces: 11, Lines: 0\n",
256
+ "Training functions ready.\n"
257
+ ]
258
+ }
259
+ ],
260
  "source": [
261
  "# Cell 4: Core training functions — batched play + train\n",
262
  "import time as _time\n",
 
516
  },
517
  {
518
  "cell_type": "code",
519
+ "execution_count": 5,
520
  "metadata": {
521
+ "colab": {
522
+ "base_uri": "https://localhost:8080/"
523
+ },
524
+ "id": "JdcKswz5FG8M",
525
+ "outputId": "3fbd2913-d654-4762-d5a4-86635596c3ce"
526
  },
527
+ "outputs": [
528
+ {
529
+ "output_type": "stream",
530
+ "name": "stdout",
531
+ "text": [
532
+ "=== UNTRAINED MODEL ===\n",
533
+ "\n",
534
+ "Pieces: 7/200\n",
535
+ "Total actions: 88\n",
536
+ "Lines cleared: 0\n",
537
+ "Game reward: -522.5\n",
538
+ "\n",
539
+ "Final board:\n",
540
+ "+----------+\n",
541
+ "|..####....|\n",
542
+ "|..#.......|\n",
543
+ "|..#.......|\n",
544
+ "|..##......|\n",
545
+ "|..##......|\n",
546
+ "|..##......|\n",
547
+ "|.##.......|\n",
548
+ "|.##.......|\n",
549
+ "|.##.......|\n",
550
+ "|.##.......|\n",
551
+ "|.#........|\n",
552
+ "|##........|\n",
553
+ "|.#........|\n",
554
+ "|##........|\n",
555
+ "|.#........|\n",
556
+ "|.#####....|\n",
557
+ "|####......|\n",
558
+ "|..#.......|\n",
559
+ "|..#.......|\n",
560
+ "|..##......|\n",
561
+ "+----------+\n",
562
+ "\n",
563
+ "Untrained reward: -522.5\n"
564
+ ]
565
+ }
566
+ ],
567
  "source": [
568
  "# Cell 5: Demo — UNTRAINED model plays one game\n",
569
  "print(\"=== UNTRAINED MODEL ===\\n\")\n",
 
584
  {
585
  "cell_type": "code",
586
  "source": [
587
+ "# Cell 6: Two-phase curriculum training\n",
588
  "import time\n",
589
  "\n",
590
  "optimizer = torch.optim.AdamW(\n",
591
  " [p for p in model.parameters() if p.requires_grad],\n",
592
+ " lr=1e-4,\n",
593
  " weight_decay=0.01,\n",
594
  ")\n",
595
  "\n",
596
  "history = []\n",
597
  "\n",
598
+ "# =============================================\n",
599
+ "# PHASE 1: Learn to place pieces (5 pieces max, 50 iterations)\n",
600
+ "# =============================================\n",
601
+ "MAX_PIECES_PER_GAME = 5\n",
602
+ "NUM_ITERATIONS_P1 = 50\n",
603
+ "\n",
604
+ "print(\"=\" * 60)\n",
605
+ "print(f\"PHASE 1: Learning basics — max {MAX_PIECES_PER_GAME} pieces, {NUM_ITERATIONS_P1} iterations\")\n",
606
+ "print(\"=\" * 60)\n",
607
  "\n",
608
+ "for iteration in range(NUM_ITERATIONS_P1):\n",
609
+ " t0 = time.time()\n",
610
  " stats = train_one_iteration(model, optimizer, seed=iteration)\n",
611
+ " t1 = time.time()\n",
612
  " history.append(stats)\n",
613
  "\n",
614
+ " print(f\"[P1 {iteration:3d}] \"\n",
615
  " f\"reward={stats['mean_reward']:+8.1f} \"\n",
616
  " f\"std={stats['std_reward']:6.1f} \"\n",
617
  " f\"loss={stats['loss']:7.3f} \"\n",
618
  " f\"steps={stats['avg_steps']:5.1f} \"\n",
619
  " f\"lines={stats['avg_lines']:4.1f} \"\n",
620
  " f\"pieces={stats['avg_pieces']:4.1f} \"\n",
621
+ " f\"t={t1-t0:.0f}s\")\n",
 
622
  "\n",
623
+ "print(f\"\\nPhase 1 complete! Final avg reward: {history[-1]['mean_reward']:+.1f}\")\n",
624
+ "\n",
625
+ "# =============================================\n",
626
+ "# PHASE 2: Full game (200 pieces max, 200 iterations)\n",
627
+ "# =============================================\n",
628
+ "MAX_PIECES_PER_GAME = 200\n",
629
+ "NUM_ITERATIONS_P2 = 200\n",
630
+ "\n",
631
+ "print(\"\\n\" + \"=\" * 60)\n",
632
+ "print(f\"PHASE 2: Full game — max {MAX_PIECES_PER_GAME} pieces, {NUM_ITERATIONS_P2} iterations\")\n",
633
+ "print(\"=\" * 60)\n",
634
+ "\n",
635
+ "for iteration in range(NUM_ITERATIONS_P2):\n",
636
+ " t0 = time.time()\n",
637
+ " stats = train_one_iteration(model, optimizer, seed=NUM_ITERATIONS_P1 + iteration)\n",
638
+ " t1 = time.time()\n",
639
+ " history.append(stats)\n",
640
+ "\n",
641
+ " print(f\"[P2 {iteration:3d}] \"\n",
642
+ " f\"reward={stats['mean_reward']:+8.1f} \"\n",
643
+ " f\"std={stats['std_reward']:6.1f} \"\n",
644
+ " f\"loss={stats['loss']:7.3f} \"\n",
645
+ " f\"steps={stats['avg_steps']:5.1f} \"\n",
646
+ " f\"lines={stats['avg_lines']:4.1f} \"\n",
647
+ " f\"pieces={stats['avg_pieces']:4.1f} \"\n",
648
+ " f\"t={t1-t0:.0f}s\")\n",
649
+ "\n",
650
+ "print(f\"\\nPhase 2 complete! Final avg reward: {history[-1]['mean_reward']:+.1f}\")\n",
651
+ "print(\"Training complete!\")\n"
652
  ],
653
  "metadata": {
654
+ "colab": {
655
+ "base_uri": "https://localhost:8080/"
656
+ },
657
+ "id": "qBMZr8ONcnHf",
658
+ "outputId": "48986186-3eb0-4b37-8719-591173ee6ee4"
659
  },
660
  "execution_count": null,
661
+ "outputs": [
662
+ {
663
+ "output_type": "stream",
664
+ "name": "stdout",
665
+ "text": [
666
+ "============================================================\n",
667
+ "PHASE 1: Learning basics — max 5 pieces, 50 iterations\n",
668
+ "============================================================\n",
669
+ "[P1 0] reward= -227.3 std= 20.4 loss= 0.247 steps= 70.1 lines= 0.0 pieces= 5.0 t=24s\n",
670
+ "[P1 1] reward= -224.3 std= 43.9 loss= 0.335 steps= 77.2 lines= 0.0 pieces= 5.0 t=24s\n",
671
+ "[P1 2] reward= -242.3 std= 48.1 loss= 0.400 steps= 74.2 lines= 0.0 pieces= 5.0 t=24s\n",
672
+ "[P1 3] reward= -148.2 std= 55.6 loss= 0.043 steps= 62.8 lines= 0.0 pieces= 5.0 t=25s\n",
673
+ "[P1 4] reward= -141.8 std= 48.8 loss= 0.072 steps= 42.9 lines= 0.0 pieces= 5.0 t=24s\n",
674
+ "[P1 5] reward= -116.5 std= 50.9 loss= 0.218 steps= 29.9 lines= 0.0 pieces= 5.0 t=21s\n",
675
+ "[P1 6] reward= -119.1 std= 35.3 loss= -0.372 steps= 27.2 lines= 0.0 pieces= 5.0 t=21s\n",
676
+ "[P1 7] reward= -290.9 std= 92.3 loss= -0.205 steps= 21.6 lines= 0.0 pieces= 5.0 t=17s\n",
677
+ "[P1 8] reward= -210.5 std= 57.0 loss= 0.141 steps= 20.4 lines= 0.0 pieces= 5.0 t=16s\n",
678
+ "[P1 9] reward= -289.8 std= 71.2 loss= -0.015 steps= 20.4 lines= 0.0 pieces= 5.0 t=16s\n",
679
+ "[P1 10] reward= -198.0 std= 63.3 loss= -0.125 steps= 17.2 lines= 0.0 pieces= 5.0 t=16s\n",
680
+ "[P1 11] reward= -472.2 std= 79.1 loss= 0.250 steps= 17.2 lines= 0.0 pieces= 5.0 t=16s\n",
681
+ "[P1 12] reward= -191.3 std= 9.0 loss= -0.395 steps= 14.8 lines= 0.0 pieces= 5.0 t=15s\n",
682
+ "[P1 13] reward= -300.5 std= 45.6 loss= -0.164 steps= 18.5 lines= 0.0 pieces= 5.0 t=16s\n",
683
+ "[P1 14] reward= -142.0 std= 18.7 loss= -0.021 steps= 15.2 lines= 0.0 pieces= 5.0 t=16s\n",
684
+ "[P1 15] reward= -212.0 std= 0.0 loss= 0.000 steps= 15.0 lines= 0.0 pieces= 5.0 t=3s\n",
685
+ "[P1 16] reward= -252.1 std= 0.0 loss= -0.022 steps= 16.0 lines= 0.0 pieces= 5.0 t=15s\n",
686
+ "[P1 17] reward= -321.6 std= 15.8 loss= 0.192 steps= 17.1 lines= 0.0 pieces= 5.0 t=15s\n",
687
+ "[P1 18] reward= -209.7 std= 72.1 loss= -0.009 steps= 16.1 lines= 0.0 pieces= 5.0 t=16s\n",
688
+ "[P1 19] reward= -131.7 std= 5.1 loss= -0.057 steps= 19.6 lines= 0.0 pieces= 5.0 t=16s\n",
689
+ "[P1 20] reward= -548.3 std= 28.3 loss= -0.256 steps= 23.2 lines= 0.0 pieces= 5.0 t=16s\n",
690
+ "[P1 21] reward= -323.0 std= 0.0 loss= 0.000 steps= 20.0 lines= 0.0 pieces= 5.0 t=4s\n",
691
+ "[P1 22] reward= -218.3 std= 22.6 loss= 0.597 steps= 26.1 lines= 0.0 pieces= 5.0 t=18s\n",
692
+ "[P1 23] reward= -175.1 std= 37.2 loss= 0.306 steps= 25.4 lines= 0.0 pieces= 5.0 t=18s\n",
693
+ "[P1 24] reward= -273.4 std= 63.1 loss= -0.166 steps= 37.4 lines= 0.0 pieces= 5.0 t=19s\n",
694
+ "[P1 25] reward= -232.6 std= 77.0 loss= -0.009 steps= 35.0 lines= 0.0 pieces= 5.0 t=19s\n"
695
+ ]
696
+ }
697
+ ]
698
  },
699
  {
700
  "cell_type": "code",
 
791
  "gpuType": "L4",
792
  "machine_shape": "hm"
793
  },
794
+ "accelerator": "GPU",
795
+ "widgets": {
796
+ "application/vnd.jupyter.widget-state+json": {
797
+ "f92c4ee10cc54940bb03b601032caa3b": {
798
+ "model_module": "@jupyter-widgets/controls",
799
+ "model_name": "HBoxModel",
800
+ "model_module_version": "1.5.0",
801
+ "state": {
802
+ "_dom_classes": [],
803
+ "_model_module": "@jupyter-widgets/controls",
804
+ "_model_module_version": "1.5.0",
805
+ "_model_name": "HBoxModel",
806
+ "_view_count": null,
807
+ "_view_module": "@jupyter-widgets/controls",
808
+ "_view_module_version": "1.5.0",
809
+ "_view_name": "HBoxView",
810
+ "box_style": "",
811
+ "children": [
812
+ "IPY_MODEL_dcb73d47d9e74a47b2df0958c244a970",
813
+ "IPY_MODEL_f423256c65cc4d10a0406638c869f966",
814
+ "IPY_MODEL_47be5c68b01e49fd811e78d28ab74982"
815
+ ],
816
+ "layout": "IPY_MODEL_12a720fa3c824ad697e3c907b64d703d"
817
+ }
818
+ },
819
+ "dcb73d47d9e74a47b2df0958c244a970": {
820
+ "model_module": "@jupyter-widgets/controls",
821
+ "model_name": "HTMLModel",
822
+ "model_module_version": "1.5.0",
823
+ "state": {
824
+ "_dom_classes": [],
825
+ "_model_module": "@jupyter-widgets/controls",
826
+ "_model_module_version": "1.5.0",
827
+ "_model_name": "HTMLModel",
828
+ "_view_count": null,
829
+ "_view_module": "@jupyter-widgets/controls",
830
+ "_view_module_version": "1.5.0",
831
+ "_view_name": "HTMLView",
832
+ "description": "",
833
+ "description_tooltip": null,
834
+ "layout": "IPY_MODEL_194015ffd14c44c0a9248c123521f3bd",
835
+ "placeholder": "​",
836
+ "style": "IPY_MODEL_2f41d69a29374e68bf298817ef58f316",
837
+ "value": "Loading weights: 100%"
838
+ }
839
+ },
840
+ "f423256c65cc4d10a0406638c869f966": {
841
+ "model_module": "@jupyter-widgets/controls",
842
+ "model_name": "FloatProgressModel",
843
+ "model_module_version": "1.5.0",
844
+ "state": {
845
+ "_dom_classes": [],
846
+ "_model_module": "@jupyter-widgets/controls",
847
+ "_model_module_version": "1.5.0",
848
+ "_model_name": "FloatProgressModel",
849
+ "_view_count": null,
850
+ "_view_module": "@jupyter-widgets/controls",
851
+ "_view_module_version": "1.5.0",
852
+ "_view_name": "ProgressView",
853
+ "bar_style": "success",
854
+ "description": "",
855
+ "description_tooltip": null,
856
+ "layout": "IPY_MODEL_23b8e87348af484bb33902b46a5f92b3",
857
+ "max": 338,
858
+ "min": 0,
859
+ "orientation": "horizontal",
860
+ "style": "IPY_MODEL_c89e1a38a59c41eaa57f87034a064348",
861
+ "value": 338
862
+ }
863
+ },
864
+ "47be5c68b01e49fd811e78d28ab74982": {
865
+ "model_module": "@jupyter-widgets/controls",
866
+ "model_name": "HTMLModel",
867
+ "model_module_version": "1.5.0",
868
+ "state": {
869
+ "_dom_classes": [],
870
+ "_model_module": "@jupyter-widgets/controls",
871
+ "_model_module_version": "1.5.0",
872
+ "_model_name": "HTMLModel",
873
+ "_view_count": null,
874
+ "_view_module": "@jupyter-widgets/controls",
875
+ "_view_module_version": "1.5.0",
876
+ "_view_name": "HTMLView",
877
+ "description": "",
878
+ "description_tooltip": null,
879
+ "layout": "IPY_MODEL_b22f880ebfac47c383ce96a66f6a55c8",
880
+ "placeholder": "​",
881
+ "style": "IPY_MODEL_342a026486b24535a1b9d94f4b21cbe1",
882
+ "value": " 338/338 [00:01&lt;00:00, 508.45it/s, Materializing param=model.norm.weight]"
883
+ }
884
+ },
885
+ "12a720fa3c824ad697e3c907b64d703d": {
886
+ "model_module": "@jupyter-widgets/base",
887
+ "model_name": "LayoutModel",
888
+ "model_module_version": "1.2.0",
889
+ "state": {
890
+ "_model_module": "@jupyter-widgets/base",
891
+ "_model_module_version": "1.2.0",
892
+ "_model_name": "LayoutModel",
893
+ "_view_count": null,
894
+ "_view_module": "@jupyter-widgets/base",
895
+ "_view_module_version": "1.2.0",
896
+ "_view_name": "LayoutView",
897
+ "align_content": null,
898
+ "align_items": null,
899
+ "align_self": null,
900
+ "border": null,
901
+ "bottom": null,
902
+ "display": null,
903
+ "flex": null,
904
+ "flex_flow": null,
905
+ "grid_area": null,
906
+ "grid_auto_columns": null,
907
+ "grid_auto_flow": null,
908
+ "grid_auto_rows": null,
909
+ "grid_column": null,
910
+ "grid_gap": null,
911
+ "grid_row": null,
912
+ "grid_template_areas": null,
913
+ "grid_template_columns": null,
914
+ "grid_template_rows": null,
915
+ "height": null,
916
+ "justify_content": null,
917
+ "justify_items": null,
918
+ "left": null,
919
+ "margin": null,
920
+ "max_height": null,
921
+ "max_width": null,
922
+ "min_height": null,
923
+ "min_width": null,
924
+ "object_fit": null,
925
+ "object_position": null,
926
+ "order": null,
927
+ "overflow": null,
928
+ "overflow_x": null,
929
+ "overflow_y": null,
930
+ "padding": null,
931
+ "right": null,
932
+ "top": null,
933
+ "visibility": null,
934
+ "width": null
935
+ }
936
+ },
937
+ "194015ffd14c44c0a9248c123521f3bd": {
938
+ "model_module": "@jupyter-widgets/base",
939
+ "model_name": "LayoutModel",
940
+ "model_module_version": "1.2.0",
941
+ "state": {
942
+ "_model_module": "@jupyter-widgets/base",
943
+ "_model_module_version": "1.2.0",
944
+ "_model_name": "LayoutModel",
945
+ "_view_count": null,
946
+ "_view_module": "@jupyter-widgets/base",
947
+ "_view_module_version": "1.2.0",
948
+ "_view_name": "LayoutView",
949
+ "align_content": null,
950
+ "align_items": null,
951
+ "align_self": null,
952
+ "border": null,
953
+ "bottom": null,
954
+ "display": null,
955
+ "flex": null,
956
+ "flex_flow": null,
957
+ "grid_area": null,
958
+ "grid_auto_columns": null,
959
+ "grid_auto_flow": null,
960
+ "grid_auto_rows": null,
961
+ "grid_column": null,
962
+ "grid_gap": null,
963
+ "grid_row": null,
964
+ "grid_template_areas": null,
965
+ "grid_template_columns": null,
966
+ "grid_template_rows": null,
967
+ "height": null,
968
+ "justify_content": null,
969
+ "justify_items": null,
970
+ "left": null,
971
+ "margin": null,
972
+ "max_height": null,
973
+ "max_width": null,
974
+ "min_height": null,
975
+ "min_width": null,
976
+ "object_fit": null,
977
+ "object_position": null,
978
+ "order": null,
979
+ "overflow": null,
980
+ "overflow_x": null,
981
+ "overflow_y": null,
982
+ "padding": null,
983
+ "right": null,
984
+ "top": null,
985
+ "visibility": null,
986
+ "width": null
987
+ }
988
+ },
989
+ "2f41d69a29374e68bf298817ef58f316": {
990
+ "model_module": "@jupyter-widgets/controls",
991
+ "model_name": "DescriptionStyleModel",
992
+ "model_module_version": "1.5.0",
993
+ "state": {
994
+ "_model_module": "@jupyter-widgets/controls",
995
+ "_model_module_version": "1.5.0",
996
+ "_model_name": "DescriptionStyleModel",
997
+ "_view_count": null,
998
+ "_view_module": "@jupyter-widgets/base",
999
+ "_view_module_version": "1.2.0",
1000
+ "_view_name": "StyleView",
1001
+ "description_width": ""
1002
+ }
1003
+ },
1004
+ "23b8e87348af484bb33902b46a5f92b3": {
1005
+ "model_module": "@jupyter-widgets/base",
1006
+ "model_name": "LayoutModel",
1007
+ "model_module_version": "1.2.0",
1008
+ "state": {
1009
+ "_model_module": "@jupyter-widgets/base",
1010
+ "_model_module_version": "1.2.0",
1011
+ "_model_name": "LayoutModel",
1012
+ "_view_count": null,
1013
+ "_view_module": "@jupyter-widgets/base",
1014
+ "_view_module_version": "1.2.0",
1015
+ "_view_name": "LayoutView",
1016
+ "align_content": null,
1017
+ "align_items": null,
1018
+ "align_self": null,
1019
+ "border": null,
1020
+ "bottom": null,
1021
+ "display": null,
1022
+ "flex": null,
1023
+ "flex_flow": null,
1024
+ "grid_area": null,
1025
+ "grid_auto_columns": null,
1026
+ "grid_auto_flow": null,
1027
+ "grid_auto_rows": null,
1028
+ "grid_column": null,
1029
+ "grid_gap": null,
1030
+ "grid_row": null,
1031
+ "grid_template_areas": null,
1032
+ "grid_template_columns": null,
1033
+ "grid_template_rows": null,
1034
+ "height": null,
1035
+ "justify_content": null,
1036
+ "justify_items": null,
1037
+ "left": null,
1038
+ "margin": null,
1039
+ "max_height": null,
1040
+ "max_width": null,
1041
+ "min_height": null,
1042
+ "min_width": null,
1043
+ "object_fit": null,
1044
+ "object_position": null,
1045
+ "order": null,
1046
+ "overflow": null,
1047
+ "overflow_x": null,
1048
+ "overflow_y": null,
1049
+ "padding": null,
1050
+ "right": null,
1051
+ "top": null,
1052
+ "visibility": null,
1053
+ "width": null
1054
+ }
1055
+ },
1056
+ "c89e1a38a59c41eaa57f87034a064348": {
1057
+ "model_module": "@jupyter-widgets/controls",
1058
+ "model_name": "ProgressStyleModel",
1059
+ "model_module_version": "1.5.0",
1060
+ "state": {
1061
+ "_model_module": "@jupyter-widgets/controls",
1062
+ "_model_module_version": "1.5.0",
1063
+ "_model_name": "ProgressStyleModel",
1064
+ "_view_count": null,
1065
+ "_view_module": "@jupyter-widgets/base",
1066
+ "_view_module_version": "1.2.0",
1067
+ "_view_name": "StyleView",
1068
+ "bar_color": null,
1069
+ "description_width": ""
1070
+ }
1071
+ },
1072
+ "b22f880ebfac47c383ce96a66f6a55c8": {
1073
+ "model_module": "@jupyter-widgets/base",
1074
+ "model_name": "LayoutModel",
1075
+ "model_module_version": "1.2.0",
1076
+ "state": {
1077
+ "_model_module": "@jupyter-widgets/base",
1078
+ "_model_module_version": "1.2.0",
1079
+ "_model_name": "LayoutModel",
1080
+ "_view_count": null,
1081
+ "_view_module": "@jupyter-widgets/base",
1082
+ "_view_module_version": "1.2.0",
1083
+ "_view_name": "LayoutView",
1084
+ "align_content": null,
1085
+ "align_items": null,
1086
+ "align_self": null,
1087
+ "border": null,
1088
+ "bottom": null,
1089
+ "display": null,
1090
+ "flex": null,
1091
+ "flex_flow": null,
1092
+ "grid_area": null,
1093
+ "grid_auto_columns": null,
1094
+ "grid_auto_flow": null,
1095
+ "grid_auto_rows": null,
1096
+ "grid_column": null,
1097
+ "grid_gap": null,
1098
+ "grid_row": null,
1099
+ "grid_template_areas": null,
1100
+ "grid_template_columns": null,
1101
+ "grid_template_rows": null,
1102
+ "height": null,
1103
+ "justify_content": null,
1104
+ "justify_items": null,
1105
+ "left": null,
1106
+ "margin": null,
1107
+ "max_height": null,
1108
+ "max_width": null,
1109
+ "min_height": null,
1110
+ "min_width": null,
1111
+ "object_fit": null,
1112
+ "object_position": null,
1113
+ "order": null,
1114
+ "overflow": null,
1115
+ "overflow_x": null,
1116
+ "overflow_y": null,
1117
+ "padding": null,
1118
+ "right": null,
1119
+ "top": null,
1120
+ "visibility": null,
1121
+ "width": null
1122
+ }
1123
+ },
1124
+ "342a026486b24535a1b9d94f4b21cbe1": {
1125
+ "model_module": "@jupyter-widgets/controls",
1126
+ "model_name": "DescriptionStyleModel",
1127
+ "model_module_version": "1.5.0",
1128
+ "state": {
1129
+ "_model_module": "@jupyter-widgets/controls",
1130
+ "_model_module_version": "1.5.0",
1131
+ "_model_name": "DescriptionStyleModel",
1132
+ "_view_count": null,
1133
+ "_view_module": "@jupyter-widgets/base",
1134
+ "_view_module_version": "1.2.0",
1135
+ "_view_name": "StyleView",
1136
+ "description_width": ""
1137
+ }
1138
+ }
1139
+ }
1140
+ }
1141
  },
1142
  "nbformat": 4,
1143
  "nbformat_minor": 0