File size: 91,370 Bytes
9091c0d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "b3b92bc7-d105-405f-970d-804d298b9976",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting accelerate\n",
      "  Downloading accelerate-0.26.1-py3-none-any.whl.metadata (18 kB)\n",
      "Collecting transformers\n",
      "  Downloading transformers-4.37.2-py3-none-any.whl.metadata (129 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m129.4/129.4 kB\u001b[0m \u001b[31m893.7 kB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting einops\n",
      "  Downloading einops-0.7.0-py3-none-any.whl.metadata (13 kB)\n",
      "Collecting datasets\n",
      "  Downloading datasets-2.16.1-py3-none-any.whl.metadata (20 kB)\n",
      "Collecting peft\n",
      "  Downloading peft-0.8.2-py3-none-any.whl.metadata (25 kB)\n",
      "Collecting bitsandbytes\n",
      "  Downloading bitsandbytes-0.42.0-py3-none-any.whl.metadata (9.9 kB)\n",
      "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.11/site-packages (from accelerate) (1.26.4)\n",
      "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.11/site-packages (from accelerate) (23.2)\n",
      "Requirement already satisfied: psutil in /usr/local/lib/python3.11/site-packages (from accelerate) (5.9.8)\n",
      "Requirement already satisfied: pyyaml in /usr/local/lib/python3.11/site-packages (from accelerate) (6.0.1)\n",
      "Collecting torch>=1.10.0 (from accelerate)\n",
      "  Downloading torch-2.2.0-cp311-cp311-manylinux1_x86_64.whl.metadata (25 kB)\n",
      "Collecting huggingface-hub (from accelerate)\n",
      "  Downloading huggingface_hub-0.20.3-py3-none-any.whl.metadata (12 kB)\n",
      "Collecting safetensors>=0.3.1 (from accelerate)\n",
      "  Downloading safetensors-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.8 kB)\n",
      "Collecting filelock (from transformers)\n",
      "  Downloading filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB)\n",
      "Collecting regex!=2019.12.17 (from transformers)\n",
      "  Downloading regex-2023.12.25-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (40 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.9/40.9 kB\u001b[0m \u001b[31m121.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: requests in /usr/local/lib/python3.11/site-packages (from transformers) (2.31.0)\n",
      "Collecting tokenizers<0.19,>=0.14 (from transformers)\n",
      "  Downloading tokenizers-0.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)\n",
      "Collecting tqdm>=4.27 (from transformers)\n",
      "  Downloading tqdm-4.66.1-py3-none-any.whl.metadata (57 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m57.6/57.6 kB\u001b[0m \u001b[31m47.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting pyarrow>=8.0.0 (from datasets)\n",
      "  Downloading pyarrow-15.0.0-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (3.0 kB)\n",
      "Collecting pyarrow-hotfix (from datasets)\n",
      "  Downloading pyarrow_hotfix-0.6-py3-none-any.whl.metadata (3.6 kB)\n",
      "Collecting dill<0.3.8,>=0.3.0 (from datasets)\n",
      "  Downloading dill-0.3.7-py3-none-any.whl.metadata (9.9 kB)\n",
      "Collecting pandas (from datasets)\n",
      "  Downloading pandas-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)\n",
      "Collecting xxhash (from datasets)\n",
      "  Downloading xxhash-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
      "Collecting multiprocess (from datasets)\n",
      "  Downloading multiprocess-0.70.16-py311-none-any.whl.metadata (7.2 kB)\n",
      "Collecting fsspec<=2023.10.0,>=2023.1.0 (from fsspec[http]<=2023.10.0,>=2023.1.0->datasets)\n",
      "  Downloading fsspec-2023.10.0-py3-none-any.whl.metadata (6.8 kB)\n",
      "Requirement already satisfied: aiohttp in /usr/local/lib/python3.11/site-packages (from datasets) (3.8.3)\n",
      "Collecting scipy (from bitsandbytes)\n",
      "  Downloading scipy-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m60.4/60.4 kB\u001b[0m \u001b[31m54.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (23.2.0)\n",
      "Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (2.1.1)\n",
      "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (6.0.5)\n",
      "Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (4.0.3)\n",
      "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (1.9.4)\n",
      "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (1.4.1)\n",
      "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.11/site-packages (from aiohttp->datasets) (1.3.1)\n",
      "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/site-packages (from huggingface-hub->accelerate) (4.9.0)\n",
      "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests->transformers) (3.6)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests->transformers) (2.2.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/site-packages (from requests->transformers) (2024.2.2)\n",
      "Collecting sympy (from torch>=1.10.0->accelerate)\n",
      "  Downloading sympy-1.12-py3-none-any.whl (5.7 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.7/5.7 MB\u001b[0m \u001b[31m32.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hCollecting networkx (from torch>=1.10.0->accelerate)\n",
      "  Downloading networkx-3.2.1-py3-none-any.whl.metadata (5.2 kB)\n",
      "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/site-packages (from torch>=1.10.0->accelerate) (3.1.3)\n",
      "Collecting nvidia-cuda-nvrtc-cu12==12.1.105 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cuda_nvrtc_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (23.7 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m23.7/23.7 MB\u001b[0m \u001b[31m61.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cuda-runtime-cu12==12.1.105 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cuda_runtime_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (823 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m823.6/823.6 kB\u001b[0m \u001b[31m93.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cuda-cupti-cu12==12.1.105 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cuda_cupti_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (14.1 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m14.1/14.1 MB\u001b[0m \u001b[31m44.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cudnn-cu12==8.9.2.26 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl.metadata (1.6 kB)\n",
      "Collecting nvidia-cublas-cu12==12.1.3.1 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cublas_cu12-12.1.3.1-py3-none-manylinux1_x86_64.whl (410.6 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m410.6/410.6 MB\u001b[0m \u001b[31m59.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cufft-cu12==11.0.2.54 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cufft_cu12-11.0.2.54-py3-none-manylinux1_x86_64.whl (121.6 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m121.6/121.6 MB\u001b[0m \u001b[31m59.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-curand-cu12==10.3.2.106 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_curand_cu12-10.3.2.106-py3-none-manylinux1_x86_64.whl (56.5 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m56.5/56.5 MB\u001b[0m \u001b[31m60.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cusolver-cu12==11.4.5.107 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cusolver_cu12-11.4.5.107-py3-none-manylinux1_x86_64.whl (124.2 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m124.2/124.2 MB\u001b[0m \u001b[31m50.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-cusparse-cu12==12.1.0.106 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_cusparse_cu12-12.1.0.106-py3-none-manylinux1_x86_64.whl (196.0 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m196.0/196.0 MB\u001b[0m \u001b[31m40.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hCollecting nvidia-nccl-cu12==2.19.3 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl.metadata (1.8 kB)\n",
      "Collecting nvidia-nvtx-cu12==12.1.105 (from torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_nvtx_cu12-12.1.105-py3-none-manylinux1_x86_64.whl (99 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m99.1/99.1 kB\u001b[0m \u001b[31m60.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hCollecting triton==2.2.0 (from torch>=1.10.0->accelerate)\n",
      "  Downloading triton-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.4 kB)\n",
      "Collecting nvidia-nvjitlink-cu12 (from nvidia-cusolver-cu12==11.4.5.107->torch>=1.10.0->accelerate)\n",
      "  Downloading nvidia_nvjitlink_cu12-12.3.101-py3-none-manylinux1_x86_64.whl.metadata (1.5 kB)\n",
      "INFO: pip is looking at multiple versions of multiprocess to determine which version is compatible with other requirements. This could take a while.\n",
      "Collecting multiprocess (from datasets)\n",
      "  Downloading multiprocess-0.70.15-py311-none-any.whl.metadata (7.2 kB)\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/site-packages (from pandas->datasets) (2.8.2)\n",
      "Collecting pytz>=2020.1 (from pandas->datasets)\n",
      "  Downloading pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)\n",
      "Collecting tzdata>=2022.7 (from pandas->datasets)\n",
      "  Downloading tzdata-2023.4-py2.py3-none-any.whl.metadata (1.4 kB)\n",
      "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/site-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.16.0)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/site-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.5)\n",
      "Collecting mpmath>=0.19 (from sympy->torch>=1.10.0->accelerate)\n",
      "  Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m536.2/536.2 kB\u001b[0m \u001b[31m73.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading accelerate-0.26.1-py3-none-any.whl (270 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m270.9/270.9 kB\u001b[0m \u001b[31m105.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading transformers-4.37.2-py3-none-any.whl (8.4 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.4/8.4 MB\u001b[0m \u001b[31m41.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading einops-0.7.0-py3-none-any.whl (44 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m44.6/44.6 kB\u001b[0m \u001b[31m139.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading datasets-2.16.1-py3-none-any.whl (507 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m507.1/507.1 kB\u001b[0m \u001b[31m77.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading peft-0.8.2-py3-none-any.whl (183 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m183.4/183.4 kB\u001b[0m \u001b[31m101.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading bitsandbytes-0.42.0-py3-none-any.whl (105.0 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m105.0/105.0 MB\u001b[0m \u001b[31m33.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading dill-0.3.7-py3-none-any.whl (115 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m115.3/115.3 kB\u001b[0m \u001b[31m97.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading fsspec-2023.10.0-py3-none-any.whl (166 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m166.4/166.4 kB\u001b[0m \u001b[31m197.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading huggingface_hub-0.20.3-py3-none-any.whl (330 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m330.1/330.1 kB\u001b[0m \u001b[31m52.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading pyarrow-15.0.0-cp311-cp311-manylinux_2_28_x86_64.whl (38.3 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m38.3/38.3 MB\u001b[0m \u001b[31m33.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading regex-2023.12.25-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (785 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m785.1/785.1 kB\u001b[0m \u001b[31m50.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading safetensors-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.3/1.3 MB\u001b[0m \u001b[31m38.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading tokenizers-0.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.6/3.6 MB\u001b[0m \u001b[31m36.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading torch-2.2.0-cp311-cp311-manylinux1_x86_64.whl (755.5 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m755.5/755.5 MB\u001b[0m \u001b[31m10.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m0:03\u001b[0mm\n",
      "\u001b[?25hDownloading nvidia_cudnn_cu12-8.9.2.26-py3-none-manylinux1_x86_64.whl (731.7 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m731.7/731.7 MB\u001b[0m \u001b[31m28.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading nvidia_nccl_cu12-2.19.3-py3-none-manylinux1_x86_64.whl (166.0 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m166.0/166.0 MB\u001b[0m \u001b[31m33.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading triton-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (167.9 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m167.9/167.9 MB\u001b[0m \u001b[31m26.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading tqdm-4.66.1-py3-none-any.whl (78 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m78.3/78.3 kB\u001b[0m \u001b[31m77.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading filelock-3.13.1-py3-none-any.whl (11 kB)\n",
      "Downloading multiprocess-0.70.15-py311-none-any.whl (135 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m135.4/135.4 kB\u001b[0m \u001b[31m77.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading pandas-2.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m13.0/13.0 MB\u001b[0m \u001b[31m28.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading pyarrow_hotfix-0.6-py3-none-any.whl (7.9 kB)\n",
      "Downloading scipy-1.12.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (38.4 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m38.4/38.4 MB\u001b[0m \u001b[31m28.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hDownloading xxhash-3.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.8/194.8 kB\u001b[0m \u001b[31m92.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading pytz-2024.1-py2.py3-none-any.whl (505 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m505.5/505.5 kB\u001b[0m \u001b[31m49.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading tzdata-2023.4-py2.py3-none-any.whl (346 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m346.6/346.6 kB\u001b[0m \u001b[31m100.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading networkx-3.2.1-py3-none-any.whl (1.6 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.6/1.6 MB\u001b[0m \u001b[31m34.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading nvidia_nvjitlink_cu12-12.3.101-py3-none-manylinux1_x86_64.whl (20.5 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m20.5/20.5 MB\u001b[0m \u001b[31m22.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n",
      "\u001b[?25hInstalling collected packages: pytz, mpmath, xxhash, tzdata, tqdm, sympy, scipy, safetensors, regex, pyarrow-hotfix, pyarrow, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, networkx, fsspec, filelock, einops, dill, triton, pandas, nvidia-cusparse-cu12, nvidia-cudnn-cu12, multiprocess, huggingface-hub, bitsandbytes, tokenizers, nvidia-cusolver-cu12, transformers, torch, datasets, accelerate, peft\n",
      "Successfully installed accelerate-0.26.1 bitsandbytes-0.42.0 datasets-2.16.1 dill-0.3.7 einops-0.7.0 filelock-3.13.1 fsspec-2023.10.0 huggingface-hub-0.20.3 mpmath-1.3.0 multiprocess-0.70.15 networkx-3.2.1 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-8.9.2.26 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.19.3 nvidia-nvjitlink-cu12-12.3.101 nvidia-nvtx-cu12-12.1.105 pandas-2.2.0 peft-0.8.2 pyarrow-15.0.0 pyarrow-hotfix-0.6 pytz-2024.1 regex-2023.12.25 safetensors-0.4.2 scipy-1.12.0 sympy-1.12 tokenizers-0.15.1 torch-2.2.0 tqdm-4.66.1 transformers-4.37.2 triton-2.2.0 tzdata-2023.4 xxhash-3.4.1\n"
     ]
    }
   ],
   "source": [
    "!pip install accelerate transformers einops datasets peft bitsandbytes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "46a53303-b585-4b02-956f-4af173410e25",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/usr/local/lib/python3.11/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
      "  from .autonotebook import tqdm as notebook_tqdm\n"
     ]
    }
   ],
   "source": [
    "import torch\n",
    "from datasets import load_dataset, Dataset\n",
    "from transformers import AutoModelForCausalLM, AutoTokenizer, TrainingArguments, Trainer, DataCollatorForLanguageModeling, BitsAndBytesConfig\n",
    "from peft import LoraConfig, get_peft_model\n",
    "import os"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "ffa3ee11-3929-4032-8758-322cda3a912e",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "tokenizer_config.json: 100%|██████████| 7.34k/7.34k [00:00<00:00, 13.7MB/s]\n",
      "vocab.json: 100%|██████████| 798k/798k [00:00<00:00, 17.5MB/s]\n",
      "merges.txt: 100%|██████████| 456k/456k [00:00<00:00, 43.7MB/s]\n",
      "tokenizer.json: 100%|██████████| 2.11M/2.11M [00:00<00:00, 16.5MB/s]\n",
      "added_tokens.json: 100%|██████████| 1.08k/1.08k [00:00<00:00, 2.35MB/s]\n",
      "special_tokens_map.json: 100%|██████████| 99.0/99.0 [00:00<00:00, 269kB/s]\n",
      "Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.\n"
     ]
    }
   ],
   "source": [
    "tokenizer = AutoTokenizer.from_pretrained(\"microsoft/phi-2\", trust_remote_code=True)\n",
    "tokenizer.pad_token = tokenizer.eos_token"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "b17096e6-c633-4d88-8cfc-fb738c1e4ca0",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "config.json: 100%|██████████| 863/863 [00:00<00:00, 2.00MB/s]\n",
      "configuration_phi.py: 100%|██████████| 9.26k/9.26k [00:00<00:00, 11.4MB/s]\n",
      "A new version of the following files was downloaded from https://huggingface.co/microsoft/phi-2:\n",
      "- configuration_phi.py\n",
      ". Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.\n",
      "modeling_phi.py: 100%|██████████| 62.7k/62.7k [00:00<00:00, 48.8MB/s]\n",
      "A new version of the following files was downloaded from https://huggingface.co/microsoft/phi-2:\n",
      "- modeling_phi.py\n",
      ". Make sure to double-check they do not contain any added malicious code. To avoid downloading new versions of the code file, you can pin a revision.\n",
      "model.safetensors.index.json: 100%|██████████| 35.7k/35.7k [00:00<00:00, 33.7MB/s]\n",
      "Downloading shards:   0%|          | 0/2 [00:00<?, ?it/s]\n",
      "model-00001-of-00002.safetensors:   0%|          | 0.00/5.00G [00:00<?, ?B/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   0%|          | 10.5M/5.00G [00:00<00:55, 90.4MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   1%|          | 31.5M/5.00G [00:00<00:41, 119MB/s] \u001b[A\n",
      "model-00001-of-00002.safetensors:   1%|          | 52.4M/5.00G [00:00<00:37, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   1%|▏         | 73.4M/5.00G [00:00<00:35, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   2%|▏         | 94.4M/5.00G [00:00<00:34, 143MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   2%|▏         | 115M/5.00G [00:00<00:33, 146MB/s] \u001b[A\n",
      "model-00001-of-00002.safetensors:   3%|▎         | 136M/5.00G [00:00<00:34, 142MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   3%|▎         | 157M/5.00G [00:01<00:35, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   4%|▎         | 178M/5.00G [00:01<00:35, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   4%|▍         | 199M/5.00G [00:01<00:35, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   4%|▍         | 220M/5.00G [00:01<00:35, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   5%|▍         | 241M/5.00G [00:01<00:34, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   5%|▌         | 262M/5.00G [00:01<00:34, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   6%|▌         | 283M/5.00G [00:02<00:37, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   6%|▌         | 304M/5.00G [00:02<00:37, 127MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   7%|▋         | 325M/5.00G [00:02<00:36, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   7%|▋         | 346M/5.00G [00:02<00:35, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   7%|▋         | 367M/5.00G [00:02<00:34, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   8%|▊         | 388M/5.00G [00:02<00:33, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   8%|▊         | 409M/5.00G [00:03<00:32, 141MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   9%|▊         | 430M/5.00G [00:03<00:32, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   9%|▉         | 451M/5.00G [00:03<00:32, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:   9%|▉         | 472M/5.00G [00:03<00:33, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  10%|▉         | 493M/5.00G [00:03<00:32, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  10%|█         | 514M/5.00G [00:03<00:31, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  11%|█         | 535M/5.00G [00:03<00:31, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  11%|█         | 556M/5.00G [00:04<00:31, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  12%|█▏        | 577M/5.00G [00:04<00:31, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  12%|█▏        | 598M/5.00G [00:04<00:31, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  12%|█▏        | 619M/5.00G [00:04<00:31, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  13%|█▎        | 640M/5.00G [00:04<00:32, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  13%|█▎        | 661M/5.00G [00:04<00:31, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  14%|█▎        | 682M/5.00G [00:05<00:31, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  14%|█▍        | 703M/5.00G [00:05<00:32, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  14%|█▍        | 724M/5.00G [00:05<00:32, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  15%|█▍        | 744M/5.00G [00:05<00:31, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  15%|█▌        | 765M/5.00G [00:05<00:31, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  16%|█▌        | 786M/5.00G [00:05<00:31, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  16%|█▌        | 807M/5.00G [00:05<00:31, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  17%|█▋        | 828M/5.00G [00:06<00:30, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  17%|█▋        | 849M/5.00G [00:06<00:31, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  17%|█▋        | 870M/5.00G [00:06<00:30, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  18%|█▊        | 891M/5.00G [00:06<00:29, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  18%|█▊        | 912M/5.00G [00:06<00:29, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  19%|█▊        | 933M/5.00G [00:06<00:28, 141MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  19%|█▉        | 954M/5.00G [00:07<00:28, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  20%|█▉        | 975M/5.00G [00:07<00:29, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  20%|█▉        | 996M/5.00G [00:07<00:29, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  20%|██        | 1.02G/5.00G [00:07<00:28, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  21%|██        | 1.04G/5.00G [00:07<00:29, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  21%|██        | 1.06G/5.00G [00:07<00:29, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  22%|██▏       | 1.08G/5.00G [00:07<00:29, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  22%|██▏       | 1.10G/5.00G [00:08<00:29, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  22%|██▏       | 1.12G/5.00G [00:08<00:30, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  23%|██▎       | 1.14G/5.00G [00:08<00:29, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  23%|██▎       | 1.16G/5.00G [00:08<00:29, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  24%|██▎       | 1.18G/5.00G [00:08<00:28, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  24%|██▍       | 1.21G/5.00G [00:08<00:27, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  25%|██▍       | 1.23G/5.00G [00:09<00:27, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  25%|██▍       | 1.25G/5.00G [00:09<00:27, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  25%|██▌       | 1.27G/5.00G [00:09<00:27, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  26%|██▌       | 1.29G/5.00G [00:09<00:26, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  26%|██▌       | 1.31G/5.00G [00:09<00:27, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  27%|██▋       | 1.33G/5.00G [00:09<00:26, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  27%|██▋       | 1.35G/5.00G [00:09<00:26, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  27%|██▋       | 1.37G/5.00G [00:10<00:26, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  28%|██▊       | 1.39G/5.00G [00:10<00:29, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  28%|██▊       | 1.42G/5.00G [00:10<00:28, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  29%|██▉       | 1.44G/5.00G [00:10<00:27, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  29%|██▉       | 1.46G/5.00G [00:10<00:26, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  30%|██▉       | 1.48G/5.00G [00:10<00:26, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  30%|███       | 1.50G/5.00G [00:11<00:25, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  30%|███       | 1.52G/5.00G [00:11<00:25, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  31%|███       | 1.54G/5.00G [00:11<00:25, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  31%|███▏      | 1.56G/5.00G [00:11<00:25, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  32%|███▏      | 1.58G/5.00G [00:11<00:24, 141MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  32%|███▏      | 1.60G/5.00G [00:11<00:23, 142MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  33%|███▎      | 1.63G/5.00G [00:11<00:23, 142MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  33%|███▎      | 1.65G/5.00G [00:12<00:34, 97.8MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  33%|███▎      | 1.67G/5.00G [00:12<00:31, 107MB/s] \u001b[A\n",
      "model-00001-of-00002.safetensors:  34%|███▍      | 1.69G/5.00G [00:12<00:28, 114MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  34%|███▍      | 1.71G/5.00G [00:12<00:27, 120MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  35%|███▍      | 1.73G/5.00G [00:12<00:26, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  35%|███▌      | 1.75G/5.00G [00:13<00:26, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  35%|███▌      | 1.77G/5.00G [00:13<00:25, 127MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  36%|███▌      | 1.79G/5.00G [00:13<00:25, 126MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  36%|███▋      | 1.81G/5.00G [00:13<00:25, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  37%|███▋      | 1.84G/5.00G [00:13<00:24, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  37%|███▋      | 1.86G/5.00G [00:13<00:24, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  38%|███▊      | 1.88G/5.00G [00:14<00:23, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  38%|███▊      | 1.90G/5.00G [00:14<00:22, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  38%|███▊      | 1.92G/5.00G [00:14<00:23, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  39%|███▉      | 1.94G/5.00G [00:14<00:22, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  39%|███▉      | 1.96G/5.00G [00:14<00:22, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  40%|███▉      | 1.98G/5.00G [00:14<00:22, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  40%|████      | 2.00G/5.00G [00:15<00:22, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  41%|████      | 2.02G/5.00G [00:15<00:22, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  41%|████      | 2.04G/5.00G [00:15<00:22, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  41%|████▏     | 2.07G/5.00G [00:15<00:22, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  42%|████▏     | 2.09G/5.00G [00:15<00:22, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  42%|████▏     | 2.11G/5.00G [00:15<00:21, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  43%|████▎     | 2.13G/5.00G [00:15<00:21, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  43%|████▎     | 2.15G/5.00G [00:16<00:20, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  43%|████▎     | 2.17G/5.00G [00:16<00:20, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  44%|████▍     | 2.19G/5.00G [00:16<00:20, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  44%|████▍     | 2.21G/5.00G [00:16<00:20, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  45%|████▍     | 2.23G/5.00G [00:16<00:20, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  45%|████▌     | 2.25G/5.00G [00:16<00:19, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  46%|████▌     | 2.28G/5.00G [00:17<00:19, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  46%|████▌     | 2.30G/5.00G [00:17<00:19, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  46%|████▋     | 2.32G/5.00G [00:17<00:19, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  47%|████▋     | 2.34G/5.00G [00:17<00:20, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  47%|████▋     | 2.36G/5.00G [00:17<00:19, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  48%|████▊     | 2.38G/5.00G [00:17<00:20, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  48%|████▊     | 2.40G/5.00G [00:18<00:20, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  48%|████▊     | 2.42G/5.00G [00:18<00:19, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  49%|████▉     | 2.44G/5.00G [00:18<00:19, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  49%|████▉     | 2.46G/5.00G [00:18<00:19, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  50%|████▉     | 2.49G/5.00G [00:18<00:18, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  50%|█████     | 2.51G/5.00G [00:18<00:18, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  51%|█████     | 2.53G/5.00G [00:18<00:18, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  51%|█████     | 2.55G/5.00G [00:19<00:17, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  51%|█████▏    | 2.57G/5.00G [00:19<00:18, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  52%|█████▏    | 2.59G/5.00G [00:19<00:17, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  52%|█████▏    | 2.61G/5.00G [00:19<00:20, 116MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  53%|█████▎    | 2.63G/5.00G [00:19<00:20, 117MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  53%|█████▎    | 2.65G/5.00G [00:19<00:19, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  54%|█████▎    | 2.67G/5.00G [00:20<00:18, 127MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  54%|█████▍    | 2.69G/5.00G [00:20<00:18, 126MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  54%|█████▍    | 2.72G/5.00G [00:20<00:17, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  55%|█████▍    | 2.74G/5.00G [00:20<00:20, 109MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  55%|█████▌    | 2.76G/5.00G [00:20<00:19, 113MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  56%|█████▌    | 2.78G/5.00G [00:21<00:18, 120MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  56%|█████▌    | 2.80G/5.00G [00:21<00:17, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  56%|█████▋    | 2.82G/5.00G [00:21<00:17, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  57%|█████▋    | 2.84G/5.00G [00:21<00:16, 127MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  57%|█████▋    | 2.86G/5.00G [00:21<00:21, 97.7MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  58%|█████▊    | 2.88G/5.00G [00:22<00:19, 107MB/s] \u001b[A\n",
      "model-00001-of-00002.safetensors:  58%|█████▊    | 2.90G/5.00G [00:22<00:18, 116MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  59%|█████▊    | 2.93G/5.00G [00:22<00:16, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  59%|█████▉    | 2.95G/5.00G [00:22<00:16, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  59%|█████▉    | 2.97G/5.00G [00:22<00:16, 120MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  60%|█████▉    | 2.99G/5.00G [00:22<00:16, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  60%|██████    | 3.01G/5.00G [00:22<00:15, 126MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  61%|██████    | 3.03G/5.00G [00:23<00:15, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  61%|██████    | 3.05G/5.00G [00:23<00:14, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  62%|██████▏   | 3.07G/5.00G [00:23<00:14, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  62%|██████▏   | 3.09G/5.00G [00:23<00:15, 126MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  62%|██████▏   | 3.11G/5.00G [00:23<00:14, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  63%|██████▎   | 3.14G/5.00G [00:23<00:14, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  63%|██████▎   | 3.16G/5.00G [00:24<00:14, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  64%|██████▎   | 3.18G/5.00G [00:24<00:13, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  64%|██████▍   | 3.20G/5.00G [00:24<00:13, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  64%|██████▍   | 3.22G/5.00G [00:24<00:13, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  65%|██████▍   | 3.24G/5.00G [00:24<00:13, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  65%|██████▌   | 3.26G/5.00G [00:24<00:13, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  66%|██████▌   | 3.28G/5.00G [00:25<00:12, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  66%|██████▌   | 3.30G/5.00G [00:25<00:12, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  67%|██████▋   | 3.32G/5.00G [00:25<00:12, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  67%|██████▋   | 3.34G/5.00G [00:25<00:12, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  67%|██████▋   | 3.37G/5.00G [00:25<00:12, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  68%|██████▊   | 3.39G/5.00G [00:25<00:12, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  68%|██████▊   | 3.41G/5.00G [00:26<00:12, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  69%|██████▊   | 3.43G/5.00G [00:26<00:11, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  69%|██████▉   | 3.45G/5.00G [00:26<00:11, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  69%|██████▉   | 3.47G/5.00G [00:26<00:11, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  70%|██████▉   | 3.49G/5.00G [00:26<00:11, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  70%|███████   | 3.51G/5.00G [00:26<00:11, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  71%|███████   | 3.53G/5.00G [00:26<00:11, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  71%|███████   | 3.55G/5.00G [00:27<00:10, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  72%|███████▏  | 3.58G/5.00G [00:27<00:10, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  72%|███████▏  | 3.60G/5.00G [00:27<00:10, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  72%|███████▏  | 3.62G/5.00G [00:27<00:10, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  73%|███████▎  | 3.64G/5.00G [00:27<00:10, 124MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  73%|███████▎  | 3.66G/5.00G [00:27<00:11, 121MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  74%|███████▎  | 3.68G/5.00G [00:28<00:10, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  74%|███████▍  | 3.70G/5.00G [00:28<00:09, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  75%|███████▍  | 3.72G/5.00G [00:28<00:09, 133MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  75%|███████▍  | 3.74G/5.00G [00:28<00:10, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  75%|███████▌  | 3.76G/5.00G [00:28<00:09, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  76%|███████▌  | 3.79G/5.00G [00:28<00:09, 126MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  76%|███████▌  | 3.81G/5.00G [00:29<00:09, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  77%|███████▋  | 3.83G/5.00G [00:29<00:09, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  77%|███████▋  | 3.85G/5.00G [00:29<00:08, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  77%|███████▋  | 3.87G/5.00G [00:29<00:12, 88.9MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  78%|███████▊  | 3.89G/5.00G [00:30<00:11, 98.1MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  78%|███████▊  | 3.91G/5.00G [00:30<00:10, 105MB/s] \u001b[A\n",
      "model-00001-of-00002.safetensors:  79%|███████▊  | 3.93G/5.00G [00:30<00:09, 112MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  79%|███████▉  | 3.95G/5.00G [00:30<00:08, 119MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  80%|███████▉  | 3.97G/5.00G [00:30<00:08, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  80%|███████▉  | 4.00G/5.00G [00:30<00:08, 115MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  80%|████████  | 4.02G/5.00G [00:31<00:08, 114MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  81%|████████  | 4.04G/5.00G [00:31<00:08, 116MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  81%|████████  | 4.06G/5.00G [00:31<00:08, 117MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  82%|████████▏ | 4.08G/5.00G [00:31<00:07, 120MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  82%|████████▏ | 4.10G/5.00G [00:31<00:07, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  82%|████████▏ | 4.12G/5.00G [00:31<00:07, 118MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  83%|████████▎ | 4.14G/5.00G [00:32<00:07, 119MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  83%|████████▎ | 4.16G/5.00G [00:32<00:06, 120MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  84%|████████▍ | 4.18G/5.00G [00:32<00:06, 119MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  84%|████████▍ | 4.20G/5.00G [00:32<00:06, 121MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  85%|████████▍ | 4.23G/5.00G [00:32<00:06, 122MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  85%|████████▌ | 4.25G/5.00G [00:32<00:06, 123MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  85%|████████▌ | 4.27G/5.00G [00:33<00:05, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  86%|████████▌ | 4.29G/5.00G [00:33<00:05, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  86%|████████▋ | 4.31G/5.00G [00:33<00:05, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  87%|████████▋ | 4.33G/5.00G [00:33<00:04, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  87%|████████▋ | 4.35G/5.00G [00:33<00:04, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  88%|████████▊ | 4.37G/5.00G [00:33<00:05, 125MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  88%|████████▊ | 4.39G/5.00G [00:34<00:04, 128MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  88%|████████▊ | 4.41G/5.00G [00:34<00:04, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  89%|████████▉ | 4.44G/5.00G [00:34<00:04, 129MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  89%|████████▉ | 4.46G/5.00G [00:34<00:04, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  90%|████████▉ | 4.48G/5.00G [00:34<00:03, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  90%|█████████ | 4.50G/5.00G [00:34<00:03, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  90%|█████████ | 4.52G/5.00G [00:34<00:03, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  91%|█████████ | 4.54G/5.00G [00:35<00:03, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  91%|█████████▏| 4.56G/5.00G [00:35<00:03, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  92%|█████████▏| 4.58G/5.00G [00:35<00:03, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  92%|█████████▏| 4.60G/5.00G [00:35<00:02, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  93%|█████████▎| 4.62G/5.00G [00:35<00:02, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  93%|█████████▎| 4.65G/5.00G [00:35<00:02, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  93%|█████████▎| 4.67G/5.00G [00:36<00:02, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  94%|█████████▍| 4.69G/5.00G [00:36<00:02, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  94%|█████████▍| 4.71G/5.00G [00:36<00:02, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  95%|█████████▍| 4.73G/5.00G [00:36<00:01, 134MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  95%|█████████▌| 4.75G/5.00G [00:36<00:01, 130MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  96%|█████████▌| 4.77G/5.00G [00:36<00:01, 131MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  96%|█████████▌| 4.79G/5.00G [00:37<00:01, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  96%|█████████▋| 4.81G/5.00G [00:37<00:01, 132MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  97%|█████████▋| 4.83G/5.00G [00:37<00:01, 136MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  97%|█████████▋| 4.85G/5.00G [00:37<00:01, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  98%|█████████▊| 4.88G/5.00G [00:37<00:00, 135MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  98%|█████████▊| 4.90G/5.00G [00:37<00:00, 138MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  98%|█████████▊| 4.92G/5.00G [00:37<00:00, 139MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  99%|█████████▉| 4.94G/5.00G [00:38<00:00, 140MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors:  99%|█████████▉| 4.96G/5.00G [00:38<00:00, 142MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors: 100%|█████████▉| 4.98G/5.00G [00:38<00:00, 137MB/s]\u001b[A\n",
      "model-00001-of-00002.safetensors: 100%|██████████| 5.00G/5.00G [00:38<00:00, 130MB/s]\u001b[A\n",
      "Downloading shards:  50%|█████     | 1/2 [00:38<00:38, 38.64s/it]\n",
      "model-00002-of-00002.safetensors:   0%|          | 0.00/564M [00:00<?, ?B/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:   4%|▎         | 21.0M/564M [00:00<00:03, 150MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:   7%|▋         | 41.9M/564M [00:00<00:03, 143MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  11%|█         | 62.9M/564M [00:00<00:03, 126MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  15%|█▍        | 83.9M/564M [00:00<00:03, 130MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  19%|█▊        | 105M/564M [00:00<00:03, 129MB/s] \u001b[A\n",
      "model-00002-of-00002.safetensors:  22%|██▏       | 126M/564M [00:00<00:03, 133MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  26%|██▌       | 147M/564M [00:01<00:03, 134MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  30%|██▉       | 168M/564M [00:01<00:02, 135MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  33%|███▎      | 189M/564M [00:01<00:02, 128MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  37%|███▋      | 210M/564M [00:01<00:02, 131MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  41%|████      | 231M/564M [00:01<00:02, 131MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  45%|████▍     | 252M/564M [00:01<00:02, 131MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  48%|████▊     | 273M/564M [00:02<00:02, 133MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  52%|█████▏    | 294M/564M [00:02<00:02, 133MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  56%|█████▌    | 315M/564M [00:02<00:01, 136MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  60%|█████▉    | 336M/564M [00:02<00:01, 135MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  63%|██████▎   | 357M/564M [00:02<00:01, 134MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  67%|██████▋   | 377M/564M [00:02<00:01, 134MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  71%|███████   | 398M/564M [00:02<00:01, 137MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  74%|███████▍  | 419M/564M [00:03<00:01, 136MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  78%|███████▊  | 440M/564M [00:03<00:00, 136MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  82%|████████▏ | 461M/564M [00:03<00:01, 95.4MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  86%|████████▌ | 482M/564M [00:03<00:00, 103MB/s] \u001b[A\n",
      "model-00002-of-00002.safetensors:  89%|████████▉ | 503M/564M [00:04<00:00, 109MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  93%|█████████▎| 524M/564M [00:04<00:00, 116MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors:  97%|█████████▋| 545M/564M [00:04<00:00, 120MB/s]\u001b[A\n",
      "model-00002-of-00002.safetensors: 100%|██████████| 564M/564M [00:04<00:00, 126MB/s]\u001b[A\n",
      "Downloading shards: 100%|██████████| 2/2 [00:43<00:00, 21.61s/it]\n",
      "Loading checkpoint shards: 100%|██████████| 2/2 [00:08<00:00,  4.06s/it]\n",
      "generation_config.json: 100%|██████████| 124/124 [00:00<00:00, 278kB/s]\n"
     ]
    }
   ],
   "source": [
    "bnb_config = BitsAndBytesConfig(\n",
    "    load_in_4bit=True,\n",
    "    bnb_4bit_use_double_quant=True,\n",
    "    bnb_4bit_quant_type=\"nf4\",\n",
    "    bnb_4bit_compute_dtype=torch.float16\n",
    ")\n",
    "\n",
    "model = AutoModelForCausalLM.from_pretrained(\n",
    "    \"microsoft/phi-2\",\n",
    "    device_map={\"\":0},\n",
    "    trust_remote_code=True,\n",
    "    quantization_config=bnb_config\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "e15aa794-e17c-4b09-a64a-c60377259218",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "PhiForCausalLM(\n",
      "  (model): PhiModel(\n",
      "    (embed_tokens): Embedding(51200, 2560)\n",
      "    (embed_dropout): Dropout(p=0.0, inplace=False)\n",
      "    (layers): ModuleList(\n",
      "      (0-31): 32 x PhiDecoderLayer(\n",
      "        (self_attn): PhiAttention(\n",
      "          (q_proj): Linear4bit(in_features=2560, out_features=2560, bias=True)\n",
      "          (k_proj): Linear4bit(in_features=2560, out_features=2560, bias=True)\n",
      "          (v_proj): Linear4bit(in_features=2560, out_features=2560, bias=True)\n",
      "          (dense): Linear4bit(in_features=2560, out_features=2560, bias=True)\n",
      "          (rotary_emb): PhiRotaryEmbedding()\n",
      "        )\n",
      "        (mlp): PhiMLP(\n",
      "          (activation_fn): NewGELUActivation()\n",
      "          (fc1): Linear4bit(in_features=2560, out_features=10240, bias=True)\n",
      "          (fc2): Linear4bit(in_features=10240, out_features=2560, bias=True)\n",
      "        )\n",
      "        (input_layernorm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)\n",
      "        (resid_dropout): Dropout(p=0.1, inplace=False)\n",
      "      )\n",
      "    )\n",
      "    (final_layernorm): LayerNorm((2560,), eps=1e-05, elementwise_affine=True)\n",
      "  )\n",
      "  (lm_head): Linear(in_features=2560, out_features=51200, bias=True)\n",
      ")\n"
     ]
    }
   ],
   "source": [
    "print(model)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "18d5599f-992d-4d8e-a90c-4d43774be473",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "trainable params: 17,039,360 || all params: 2,796,723,200 || trainable%: 0.6092615815537269\n"
     ]
    }
   ],
   "source": [
    "config = LoraConfig(\n",
    "    r=16,\n",
    "    lora_alpha=16,\n",
    "    target_modules=[\"dense\", \"fc2\",\"q_proj\",\"k_proj\",\"v_proj\"],\n",
    "    lora_dropout=0.05,\n",
    "    bias=\"none\",\n",
    "    task_type=\"CAUSAL_LM\"\n",
    ")\n",
    "\n",
    "model = get_peft_model(model, config)\n",
    "model.print_trainable_parameters()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "baeee903-3dce-48b2-93c3-7a697d8c6daf",
   "metadata": {},
   "outputs": [],
   "source": [
    "def tokenize(sample):\n",
    "    model_inps =  tokenizer(sample[\"text\"], padding=True, truncation=True, max_length=512)\n",
    "    return model_inps"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "28a9b24a-a822-4fcb-96b3-d77b7ea30a5f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Collecting scikit-learn\n",
      "  Downloading scikit_learn-1.4.0-1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)\n",
      "Requirement already satisfied: numpy<2.0,>=1.19.5 in /usr/local/lib/python3.11/site-packages (from scikit-learn) (1.26.4)\n",
      "Requirement already satisfied: scipy>=1.6.0 in /usr/local/lib/python3.11/site-packages (from scikit-learn) (1.12.0)\n",
      "Collecting joblib>=1.2.0 (from scikit-learn)\n",
      "  Downloading joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)\n",
      "Collecting threadpoolctl>=2.0.0 (from scikit-learn)\n",
      "  Downloading threadpoolctl-3.2.0-py3-none-any.whl.metadata (10.0 kB)\n",
      "Downloading scikit_learn-1.4.0-1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.1 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m12.1/12.1 MB\u001b[0m \u001b[31m62.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading joblib-1.3.2-py3-none-any.whl (302 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m302.2/302.2 kB\u001b[0m \u001b[31m279.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading threadpoolctl-3.2.0-py3-none-any.whl (15 kB)\n",
      "Installing collected packages: threadpoolctl, joblib, scikit-learn\n",
      "Successfully installed joblib-1.3.2 scikit-learn-1.4.0 threadpoolctl-3.2.0\n"
     ]
    }
   ],
   "source": [
    "!pip install scikit-learn"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "1ee7fd2a-38e4-4f23-a978-0bdeeda64d8b",
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "\n",
    "from sklearn.model_selection import train_test_split\n",
    "dataset_name='data.csv'\n",
    "df = pd.read_csv(dataset_name)\n",
    "train, test = train_test_split(df, test_size=0.2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "e84c29e2-843e-42c2-8c0f-324d392e671c",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Tokenizing data: 100%|██████████| 13129/13129 [00:04<00:00, 2739.65 examples/s]\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "Dataset({\n",
       "    features: ['input_ids', 'attention_mask'],\n",
       "    num_rows: 13129\n",
       "})"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data_df = train\n",
    "data_df[\"text\"] = data_df[[\"user\", \"assistant\"]].apply(lambda x: \"question: \" + str(x[\"user\"]) + \" answer: \" + str(x[\"assistant\"]), axis=1)\n",
    "data = Dataset.from_pandas(data_df)\n",
    "tokenized_data = data.map(tokenize, batched=True, desc=\"Tokenizing data\", remove_columns=data.column_names)\n",
    "tokenized_data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ac968254-5338-49df-950d-222b82647407",
   "metadata": {},
   "outputs": [],
   "source": [
    "training_arguments = TrainingArguments(\n",
    "        output_dir=\".\",\n",
    "        per_device_train_batch_size=4,\n",
    "        gradient_accumulation_steps=1,\n",
    "        learning_rate=2e-4,\n",
    "        lr_scheduler_type=\"cosine\",\n",
    "        save_strategy=\"epoch\",\n",
    "        logging_steps=100,\n",
    "        max_steps=1100,\n",
    "        num_train_epochs=2,\n",
    "        push_to_hub=True\n",
    "    )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "729df2d0-0890-4ac4-adf3-c167a6e9669d",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
      "To disable this warning, you can either:\n",
      "\t- Avoid using `tokenizers` before the fork if possible\n",
      "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.11/site-packages (0.20.3)\n",
      "Requirement already satisfied: filelock in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (3.13.1)\n",
      "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (2023.10.0)\n",
      "Requirement already satisfied: requests in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (2.31.0)\n",
      "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (4.66.1)\n",
      "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (6.0.1)\n",
      "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (4.9.0)\n",
      "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.11/site-packages (from huggingface_hub) (23.2)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/site-packages (from requests->huggingface_hub) (2.1.1)\n",
      "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/site-packages (from requests->huggingface_hub) (3.6)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests->huggingface_hub) (2.2.0)\n",
      "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/site-packages (from requests->huggingface_hub) (2024.2.2)\n"
     ]
    }
   ],
   "source": [
    "!pip install huggingface_hub"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "525f81a4-eb92-466e-bb9c-cd63122231ab",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "huggingface/tokenizers: The current process just got forked, after parallelism has already been used. Disabling parallelism to avoid deadlocks...\n",
      "To disable this warning, you can either:\n",
      "\t- Avoid using `tokenizers` before the fork if possible\n",
      "\t- Explicitly set the environment variable TOKENIZERS_PARALLELISM=(true | false)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Requirement already satisfied: jupyterlab in /usr/local/lib/python3.11/site-packages (4.1.0)\n",
      "Collecting jupyterlab-git\n",
      "  Downloading jupyterlab_git-0.50.0-py3-none-any.whl.metadata (31 kB)\n",
      "Requirement already satisfied: async-lru>=1.0.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (2.0.4)\n",
      "Requirement already satisfied: httpx>=0.25.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (0.26.0)\n",
      "Requirement already satisfied: ipykernel in /usr/local/lib/python3.11/site-packages (from jupyterlab) (6.29.1)\n",
      "Requirement already satisfied: jinja2>=3.0.3 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (3.1.3)\n",
      "Requirement already satisfied: jupyter-core in /usr/local/lib/python3.11/site-packages (from jupyterlab) (5.7.1)\n",
      "Requirement already satisfied: jupyter-lsp>=2.0.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (2.2.2)\n",
      "Requirement already satisfied: jupyter-server<3,>=2.4.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (2.12.5)\n",
      "Requirement already satisfied: jupyterlab-server<3,>=2.19.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (2.25.2)\n",
      "Requirement already satisfied: notebook-shim>=0.2 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (0.2.3)\n",
      "Requirement already satisfied: packaging in /usr/local/lib/python3.11/site-packages (from jupyterlab) (23.2)\n",
      "Requirement already satisfied: tornado>=6.2.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab) (6.4)\n",
      "Requirement already satisfied: traitlets in /usr/local/lib/python3.11/site-packages (from jupyterlab) (5.14.1)\n",
      "Collecting nbdime~=4.0.1 (from jupyterlab-git)\n",
      "  Downloading nbdime-4.0.1-py3-none-any.whl.metadata (9.5 kB)\n",
      "Requirement already satisfied: nbformat in /usr/local/lib/python3.11/site-packages (from jupyterlab-git) (5.9.2)\n",
      "Requirement already satisfied: pexpect in /usr/local/lib/python3.11/site-packages (from jupyterlab-git) (4.9.0)\n",
      "Requirement already satisfied: anyio in /usr/local/lib/python3.11/site-packages (from httpx>=0.25.0->jupyterlab) (4.2.0)\n",
      "Requirement already satisfied: certifi in /usr/local/lib/python3.11/site-packages (from httpx>=0.25.0->jupyterlab) (2024.2.2)\n",
      "Requirement already satisfied: httpcore==1.* in /usr/local/lib/python3.11/site-packages (from httpx>=0.25.0->jupyterlab) (1.0.2)\n",
      "Requirement already satisfied: idna in /usr/local/lib/python3.11/site-packages (from httpx>=0.25.0->jupyterlab) (3.6)\n",
      "Requirement already satisfied: sniffio in /usr/local/lib/python3.11/site-packages (from httpx>=0.25.0->jupyterlab) (1.3.0)\n",
      "Requirement already satisfied: h11<0.15,>=0.13 in /usr/local/lib/python3.11/site-packages (from httpcore==1.*->httpx>=0.25.0->jupyterlab) (0.14.0)\n",
      "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/site-packages (from jinja2>=3.0.3->jupyterlab) (2.1.5)\n",
      "Requirement already satisfied: argon2-cffi in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (23.1.0)\n",
      "Requirement already satisfied: jupyter-client>=7.4.4 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (8.6.0)\n",
      "Requirement already satisfied: jupyter-events>=0.9.0 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.9.0)\n",
      "Requirement already satisfied: jupyter-server-terminals in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.5.2)\n",
      "Requirement already satisfied: nbconvert>=6.4.4 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.15.0)\n",
      "Requirement already satisfied: overrides in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (7.7.0)\n",
      "Requirement already satisfied: prometheus-client in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.19.0)\n",
      "Requirement already satisfied: pyzmq>=24 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (25.1.2)\n",
      "Requirement already satisfied: send2trash>=1.8.2 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.8.2)\n",
      "Requirement already satisfied: terminado>=0.8.3 in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (0.18.0)\n",
      "Requirement already satisfied: websocket-client in /usr/local/lib/python3.11/site-packages (from jupyter-server<3,>=2.4.0->jupyterlab) (1.7.0)\n",
      "Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.11/site-packages (from jupyter-core->jupyterlab) (4.2.0)\n",
      "Requirement already satisfied: babel>=2.10 in /usr/local/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (2.14.0)\n",
      "Requirement already satisfied: json5>=0.9.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (0.9.14)\n",
      "Requirement already satisfied: jsonschema>=4.18.0 in /usr/local/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (4.21.1)\n",
      "Requirement already satisfied: requests>=2.31 in /usr/local/lib/python3.11/site-packages (from jupyterlab-server<3,>=2.19.0->jupyterlab) (2.31.0)\n",
      "Collecting colorama (from nbdime~=4.0.1->jupyterlab-git)\n",
      "  Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)\n",
      "Collecting gitpython!=2.1.4,!=2.1.5,!=2.1.6 (from nbdime~=4.0.1->jupyterlab-git)\n",
      "  Downloading GitPython-3.1.41-py3-none-any.whl.metadata (14 kB)\n",
      "Collecting jupyter-server-mathjax>=0.2.2 (from nbdime~=4.0.1->jupyterlab-git)\n",
      "  Downloading jupyter_server_mathjax-0.2.6-py3-none-any.whl (3.1 MB)\n",
      "\u001b[2K     \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m3.1/3.1 MB\u001b[0m \u001b[31m18.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hRequirement already satisfied: pygments in /usr/local/lib/python3.11/site-packages (from nbdime~=4.0.1->jupyterlab-git) (2.17.2)\n",
      "Requirement already satisfied: fastjsonschema in /usr/local/lib/python3.11/site-packages (from nbformat->jupyterlab-git) (2.19.1)\n",
      "Requirement already satisfied: comm>=0.1.1 in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (0.2.1)\n",
      "Requirement already satisfied: debugpy>=1.6.5 in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (1.8.0)\n",
      "Requirement already satisfied: ipython>=7.23.1 in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (8.21.0)\n",
      "Requirement already satisfied: matplotlib-inline>=0.1 in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (0.1.6)\n",
      "Requirement already satisfied: nest-asyncio in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (1.6.0)\n",
      "Requirement already satisfied: psutil in /usr/local/lib/python3.11/site-packages (from ipykernel->jupyterlab) (5.9.8)\n",
      "Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.11/site-packages (from pexpect->jupyterlab-git) (0.7.0)\n",
      "Collecting gitdb<5,>=4.0.1 (from gitpython!=2.1.4,!=2.1.5,!=2.1.6->nbdime~=4.0.1->jupyterlab-git)\n",
      "  Downloading gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)\n",
      "Requirement already satisfied: decorator in /usr/local/lib/python3.11/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (5.1.1)\n",
      "Requirement already satisfied: jedi>=0.16 in /usr/local/lib/python3.11/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.19.1)\n",
      "Requirement already satisfied: prompt-toolkit<3.1.0,>=3.0.41 in /usr/local/lib/python3.11/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (3.0.43)\n",
      "Requirement already satisfied: stack-data in /usr/local/lib/python3.11/site-packages (from ipython>=7.23.1->ipykernel->jupyterlab) (0.6.3)\n",
      "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (23.2.0)\n",
      "Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (2023.12.1)\n",
      "Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (0.33.0)\n",
      "Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.11/site-packages (from jsonschema>=4.18.0->jupyterlab-server<3,>=2.19.0->jupyterlab) (0.17.1)\n",
      "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/site-packages (from jupyter-client>=7.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (2.8.2)\n",
      "Requirement already satisfied: python-json-logger>=2.0.4 in /usr/local/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.0.7)\n",
      "Requirement already satisfied: pyyaml>=5.3 in /usr/local/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (6.0.1)\n",
      "Requirement already satisfied: rfc3339-validator in /usr/local/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.4)\n",
      "Requirement already satisfied: rfc3986-validator>=0.1.1 in /usr/local/lib/python3.11/site-packages (from jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (0.1.1)\n",
      "Requirement already satisfied: beautifulsoup4 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (4.12.3)\n",
      "Requirement already satisfied: bleach!=5.0.0 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (6.1.0)\n",
      "Requirement already satisfied: defusedxml in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.7.1)\n",
      "Requirement already satisfied: jupyterlab-pygments in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.3.0)\n",
      "Requirement already satisfied: mistune<4,>=2.0.3 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (3.0.2)\n",
      "Requirement already satisfied: nbclient>=0.5.0 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.9.0)\n",
      "Requirement already satisfied: pandocfilters>=1.4.1 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.5.1)\n",
      "Requirement already satisfied: tinycss2 in /usr/local/lib/python3.11/site-packages (from nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.2.1)\n",
      "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.19.0->jupyterlab) (2.1.1)\n",
      "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/site-packages (from requests>=2.31->jupyterlab-server<3,>=2.19.0->jupyterlab) (2.2.0)\n",
      "Requirement already satisfied: argon2-cffi-bindings in /usr/local/lib/python3.11/site-packages (from argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (21.2.0)\n",
      "Requirement already satisfied: six>=1.9.0 in /usr/local/lib/python3.11/site-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (1.16.0)\n",
      "Requirement already satisfied: webencodings in /usr/local/lib/python3.11/site-packages (from bleach!=5.0.0->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (0.5.1)\n",
      "Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython!=2.1.4,!=2.1.5,!=2.1.6->nbdime~=4.0.1->jupyterlab-git)\n",
      "  Downloading smmap-5.0.1-py3-none-any.whl.metadata (4.3 kB)\n",
      "Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.11/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel->jupyterlab) (0.8.3)\n",
      "Requirement already satisfied: fqdn in /usr/local/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.5.1)\n",
      "Requirement already satisfied: isoduration in /usr/local/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (20.11.0)\n",
      "Requirement already satisfied: jsonpointer>1.13 in /usr/local/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.4)\n",
      "Requirement already satisfied: uri-template in /usr/local/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)\n",
      "Requirement already satisfied: webcolors>=1.11 in /usr/local/lib/python3.11/site-packages (from jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.13)\n",
      "Requirement already satisfied: wcwidth in /usr/local/lib/python3.11/site-packages (from prompt-toolkit<3.1.0,>=3.0.41->ipython>=7.23.1->ipykernel->jupyterlab) (0.2.13)\n",
      "Requirement already satisfied: cffi>=1.0.1 in /usr/local/lib/python3.11/site-packages (from argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (1.16.0)\n",
      "Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.11/site-packages (from beautifulsoup4->nbconvert>=6.4.4->jupyter-server<3,>=2.4.0->jupyterlab) (2.5)\n",
      "Requirement already satisfied: executing>=1.2.0 in /usr/local/lib/python3.11/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (2.0.1)\n",
      "Requirement already satisfied: asttokens>=2.1.0 in /usr/local/lib/python3.11/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (2.4.1)\n",
      "Requirement already satisfied: pure-eval in /usr/local/lib/python3.11/site-packages (from stack-data->ipython>=7.23.1->ipykernel->jupyterlab) (0.2.2)\n",
      "Requirement already satisfied: pycparser in /usr/local/lib/python3.11/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->jupyter-server<3,>=2.4.0->jupyterlab) (2.21)\n",
      "Requirement already satisfied: arrow>=0.15.0 in /usr/local/lib/python3.11/site-packages (from isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (1.3.0)\n",
      "Requirement already satisfied: types-python-dateutil>=2.8.10 in /usr/local/lib/python3.11/site-packages (from arrow>=0.15.0->isoduration->jsonschema[format-nongpl]>=4.18.0->jupyter-events>=0.9.0->jupyter-server<3,>=2.4.0->jupyterlab) (2.8.19.20240106)\n",
      "Downloading jupyterlab_git-0.50.0-py3-none-any.whl (1.2 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.2/1.2 MB\u001b[0m \u001b[31m80.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading nbdime-4.0.1-py3-none-any.whl (5.9 MB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m5.9/5.9 MB\u001b[0m \u001b[31m43.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0ma \u001b[36m0:00:01\u001b[0m\n",
      "\u001b[?25hDownloading GitPython-3.1.41-py3-none-any.whl (196 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m196.4/196.4 kB\u001b[0m \u001b[31m43.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading gitdb-4.0.11-py3-none-any.whl (62 kB)\n",
      "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m62.7/62.7 kB\u001b[0m \u001b[31m132.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
      "\u001b[?25hDownloading smmap-5.0.1-py3-none-any.whl (24 kB)\n",
      "Installing collected packages: smmap, colorama, gitdb, gitpython, jupyter-server-mathjax, nbdime, jupyterlab-git\n",
      "Successfully installed colorama-0.4.6 gitdb-4.0.11 gitpython-3.1.41 jupyter-server-mathjax-0.2.6 jupyterlab-git-0.50.0 nbdime-4.0.1 smmap-5.0.1\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    }
   ],
   "source": [
    "pip install --upgrade jupyterlab jupyterlab-git"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "05d58512-a9e2-4319-88bf-9331c6a0584c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "    _|    _|  _|    _|    _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|_|_|_|    _|_|      _|_|_|  _|_|_|_|\n",
      "    _|    _|  _|    _|  _|        _|          _|    _|_|    _|  _|            _|        _|    _|  _|        _|\n",
      "    _|_|_|_|  _|    _|  _|  _|_|  _|  _|_|    _|    _|  _|  _|  _|  _|_|      _|_|_|    _|_|_|_|  _|        _|_|_|\n",
      "    _|    _|  _|    _|  _|    _|  _|    _|    _|    _|    _|_|  _|    _|      _|        _|    _|  _|        _|\n",
      "    _|    _|    _|_|      _|_|_|    _|_|_|  _|_|_|  _|      _|    _|_|_|      _|        _|    _|    _|_|_|  _|_|_|_|\n",
      "\n",
      "    A token is already saved on your machine. Run `huggingface-cli whoami` to get more information or `huggingface-cli logout` if you want to log out.\n",
      "    Setting a new token will erase the existing one.\n",
      "    To login, `huggingface_hub` requires a token generated from https://huggingface.co/settings/tokens .\n"
     ]
    },
    {
     "name": "stdin",
     "output_type": "stream",
     "text": [
      "Token:  ········\n",
      "Add token as git credential? (Y/n)  n\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Token is valid (permission: write).\n",
      "Your token has been saved to /root/.cache/huggingface/token\n",
      "Login successful\n"
     ]
    }
   ],
   "source": [
    "from huggingface_hub import interpreter_login\n",
    "interpreter_login()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3bf553b6-b26c-49c3-9407-74c8d53a395e",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "Detected kernel version 4.4.0, which is below the recommended minimum of 5.5.0; this can cause the process to hang. It is recommended to upgrade the kernel to the minimum version or higher.\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "\n",
       "    <div>\n",
       "      \n",
       "      <progress value='865' max='1100' style='width:300px; height:20px; vertical-align: middle;'></progress>\n",
       "      [ 865/1100 06:23 < 01:44, 2.25 it/s, Epoch 0.26/1]\n",
       "    </div>\n",
       "    <table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       " <tr style=\"text-align: left;\">\n",
       "      <th>Step</th>\n",
       "      <th>Training Loss</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <td>100</td>\n",
       "      <td>1.304900</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>200</td>\n",
       "      <td>1.187200</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>300</td>\n",
       "      <td>1.169100</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>400</td>\n",
       "      <td>1.171700</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>500</td>\n",
       "      <td>1.143400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>600</td>\n",
       "      <td>1.191400</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>700</td>\n",
       "      <td>1.144800</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <td>800</td>\n",
       "      <td>1.152100</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table><p>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "trainer = Trainer(\n",
    "    model=model,\n",
    "    train_dataset=tokenized_data,\n",
    "    args=training_arguments,\n",
    "    data_collator=DataCollatorForLanguageModeling(tokenizer, mlm=False)\n",
    ")\n",
    "trainer.train()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "263cc15e-8e9d-4bd8-9708-ec1638bc1165",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "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.11.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}