File size: 54,208 Bytes
24f2eec
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": [],
      "gpuType": "T4"
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    },
    "accelerator": "GPU"
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# osiria/deberta-italian-question-answering\n",
        "## test set metrics"
      ],
      "metadata": {
        "id": "oub2ir8ZDkrH"
      }
    },
    {
      "cell_type": "code",
      "execution_count": 1,
      "metadata": {
        "id": "02K9xO6Gvto1",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "0d492963-a525-4d5a-ac41-7cf1a51008a8"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Collecting git+https://github.com/huggingface/transformers\n",
            "  Cloning https://github.com/huggingface/transformers to /tmp/pip-req-build-dhlxsg5a\n",
            "  Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers /tmp/pip-req-build-dhlxsg5a\n",
            "  Resolved https://github.com/huggingface/transformers to commit df5c5c62ae253055336f5bb0828ca8e3e15ab6bd\n",
            "  Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
            "  Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
            "  Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (3.13.1)\n",
            "Requirement already satisfied: huggingface-hub<1.0,>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (0.19.4)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (1.23.5)\n",
            "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (23.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (6.0.1)\n",
            "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (2023.6.3)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (2.31.0)\n",
            "Requirement already satisfied: tokenizers<0.19,>=0.14 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (0.15.0)\n",
            "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (0.4.1)\n",
            "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers==4.36.0.dev0) (4.66.1)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.19.3->transformers==4.36.0.dev0) (2023.6.0)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.19.3->transformers==4.36.0.dev0) (4.5.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.36.0.dev0) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.36.0.dev0) (3.6)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.36.0.dev0) (2.0.7)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.36.0.dev0) (2023.11.17)\n"
          ]
        }
      ],
      "source": [
        "!pip install git+https://github.com/huggingface/transformers"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install datasets"
      ],
      "metadata": {
        "id": "VKgybrUswa1q",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "3a52c215-7046-4185-cb95-884032b34007"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: datasets in /usr/local/lib/python3.10/dist-packages (2.15.0)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.23.5)\n",
            "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (9.0.0)\n",
            "Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets) (0.6)\n",
            "Requirement already satisfied: dill<0.3.8,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.3.7)\n",
            "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (1.5.3)\n",
            "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.31.0)\n",
            "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.1)\n",
            "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.4.1)\n",
            "Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets) (0.70.15)\n",
            "Requirement already satisfied: fsspec[http]<=2023.10.0,>=2023.1.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.6.0)\n",
            "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.9.1)\n",
            "Requirement already satisfied: huggingface-hub>=0.18.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.19.4)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (23.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.1)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.1.0)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.4)\n",
            "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.3)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.4.0)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
            "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.18.0->datasets) (3.13.1)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.18.0->datasets) (4.5.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.6)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2.0.7)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2023.11.17)\n",
            "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2023.3.post1)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->datasets) (1.16.0)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install accelerate"
      ],
      "metadata": {
        "id": "xYEW0Hjqz2lo",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "391d2364-0eb8-4fb0-9ccb-dcc6b1a3d3a2"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.25.0)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.23.5)\n",
            "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (23.2)\n",
            "Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n",
            "Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from accelerate) (6.0.1)\n",
            "Requirement already satisfied: torch>=1.10.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.1.0+cu118)\n",
            "Requirement already satisfied: huggingface-hub in /usr/local/lib/python3.10/dist-packages (from accelerate) (0.19.4)\n",
            "Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from accelerate) (0.4.1)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.13.1)\n",
            "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (4.5.0)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (1.12)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.2.1)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (3.1.2)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (2023.6.0)\n",
            "Requirement already satisfied: triton==2.1.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.10.0->accelerate) (2.1.0)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface-hub->accelerate) (2.31.0)\n",
            "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub->accelerate) (4.66.1)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.10.0->accelerate) (2.1.3)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->accelerate) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->accelerate) (3.6)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->accelerate) (2.0.7)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface-hub->accelerate) (2023.11.17)\n",
            "Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.10.0->accelerate) (1.3.0)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!pip install evaluate"
      ],
      "metadata": {
        "id": "9OFz3JdR0cQ_",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "c8c102c7-29ec-4551-8994-324853530b56"
      },
      "execution_count": 4,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Requirement already satisfied: evaluate in /usr/local/lib/python3.10/dist-packages (0.4.1)\n",
            "Requirement already satisfied: datasets>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2.15.0)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from evaluate) (1.23.5)\n",
            "Requirement already satisfied: dill in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.3.7)\n",
            "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from evaluate) (1.5.3)\n",
            "Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2.31.0)\n",
            "Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from evaluate) (4.66.1)\n",
            "Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from evaluate) (3.4.1)\n",
            "Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.70.15)\n",
            "Requirement already satisfied: fsspec[http]>=2021.05.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2023.6.0)\n",
            "Requirement already satisfied: huggingface-hub>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.19.4)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from evaluate) (23.2)\n",
            "Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.18.0)\n",
            "Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (9.0.0)\n",
            "Requirement already satisfied: pyarrow-hotfix in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (0.6)\n",
            "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (3.9.1)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (6.0.1)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.7.0->evaluate) (3.13.1)\n",
            "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.7.0->evaluate) (4.5.0)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (3.3.2)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (3.6)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (2.0.7)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (2023.11.17)\n",
            "Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate) (2023.3.post1)\n",
            "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (23.1.0)\n",
            "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (6.0.4)\n",
            "Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.9.3)\n",
            "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.4.0)\n",
            "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.3.1)\n",
            "Requirement already satisfied: async-timeout<5.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (4.0.3)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->evaluate) (1.16.0)\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/run_qa.py\n",
        "!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/trainer_qa.py\n",
        "!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/utils_qa.py"
      ],
      "metadata": {
        "id": "JJhpBNwpxOTK",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "7c34e19d-a391-41a2-8cd5-8abfe3788c6e"
      },
      "execution_count": 5,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "--2023-12-09 13:46:17--  https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/run_qa.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.109.133, 185.199.108.133, 185.199.110.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.109.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 32883 (32K) [text/plain]\n",
            "Saving to: ‘run_qa.py.1’\n",
            "\n",
            "\rrun_qa.py.1           0%[                    ]       0  --.-KB/s               \rrun_qa.py.1         100%[===================>]  32.11K  --.-KB/s    in 0.01s   \n",
            "\n",
            "2023-12-09 13:46:17 (3.06 MB/s) - ‘run_qa.py.1’ saved [32883/32883]\n",
            "\n",
            "--2023-12-09 13:46:17--  https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/trainer_qa.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 6253 (6.1K) [text/plain]\n",
            "Saving to: ‘trainer_qa.py.1’\n",
            "\n",
            "trainer_qa.py.1     100%[===================>]   6.11K  --.-KB/s    in 0s      \n",
            "\n",
            "2023-12-09 13:46:17 (84.8 MB/s) - ‘trainer_qa.py.1’ saved [6253/6253]\n",
            "\n",
            "--2023-12-09 13:46:17--  https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/utils_qa.py\n",
            "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.110.133, ...\n",
            "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.\n",
            "HTTP request sent, awaiting response... 200 OK\n",
            "Length: 22777 (22K) [text/plain]\n",
            "Saving to: ‘utils_qa.py.1’\n",
            "\n",
            "utils_qa.py.1       100%[===================>]  22.24K  --.-KB/s    in 0.002s  \n",
            "\n",
            "2023-12-09 13:46:17 (12.2 MB/s) - ‘utils_qa.py.1’ saved [22777/22777]\n",
            "\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!ls"
      ],
      "metadata": {
        "id": "Loa6y9XqzXJ4",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "657803ce-5234-4690-d8cb-e7cefd81b1c1"
      },
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "eval_results  run_qa.py    sample_data\t  trainer_qa.py.1  utils_qa.py.1\n",
            "__pycache__   run_qa.py.1  trainer_qa.py  utils_qa.py\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!mkdir eval_results"
      ],
      "metadata": {
        "id": "QDNxV31P0reW",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "b84a6344-15b5-448a-d05f-e21ce39e36ec"
      },
      "execution_count": 7,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "mkdir: cannot create directory ‘eval_results’: File exists\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "!python -m run_qa --model_name_or_path osiria/deberta-italian-question-answering --model_revision liteqa --dataset_name squad_it --do_predict --per_device_eval_batch_size=5 --output_dir eval_results"
      ],
      "metadata": {
        "id": "B5O5Lom8x_c4",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "b7207826-cf61-4c92-9776-e5396a62d750"
      },
      "execution_count": 8,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "2023-12-09 13:46:21.130219: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
            "2023-12-09 13:46:21.130273: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
            "2023-12-09 13:46:21.130327: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
            "2023-12-09 13:46:23.380015: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
            "12/09/2023 13:46:26 - WARNING - __main__ - Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: False, 16-bits training: False\n",
            "12/09/2023 13:46:26 - INFO - __main__ - Training/evaluation parameters TrainingArguments(\n",
            "_n_gpu=1,\n",
            "adafactor=False,\n",
            "adam_beta1=0.9,\n",
            "adam_beta2=0.999,\n",
            "adam_epsilon=1e-08,\n",
            "auto_find_batch_size=False,\n",
            "bf16=False,\n",
            "bf16_full_eval=False,\n",
            "data_seed=None,\n",
            "dataloader_drop_last=False,\n",
            "dataloader_num_workers=0,\n",
            "dataloader_persistent_workers=False,\n",
            "dataloader_pin_memory=True,\n",
            "ddp_backend=None,\n",
            "ddp_broadcast_buffers=None,\n",
            "ddp_bucket_cap_mb=None,\n",
            "ddp_find_unused_parameters=None,\n",
            "ddp_timeout=1800,\n",
            "debug=[],\n",
            "deepspeed=None,\n",
            "disable_tqdm=False,\n",
            "dispatch_batches=None,\n",
            "do_eval=False,\n",
            "do_predict=True,\n",
            "do_train=False,\n",
            "eval_accumulation_steps=None,\n",
            "eval_delay=0,\n",
            "eval_steps=None,\n",
            "evaluation_strategy=no,\n",
            "fp16=False,\n",
            "fp16_backend=auto,\n",
            "fp16_full_eval=False,\n",
            "fp16_opt_level=O1,\n",
            "fsdp=[],\n",
            "fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_grad_ckpt': False},\n",
            "fsdp_min_num_params=0,\n",
            "fsdp_transformer_layer_cls_to_wrap=None,\n",
            "full_determinism=False,\n",
            "gradient_accumulation_steps=1,\n",
            "gradient_checkpointing=False,\n",
            "gradient_checkpointing_kwargs=None,\n",
            "greater_is_better=None,\n",
            "group_by_length=False,\n",
            "half_precision_backend=auto,\n",
            "hub_always_push=False,\n",
            "hub_model_id=None,\n",
            "hub_private_repo=False,\n",
            "hub_strategy=every_save,\n",
            "hub_token=<HUB_TOKEN>,\n",
            "ignore_data_skip=False,\n",
            "include_inputs_for_metrics=False,\n",
            "include_num_input_tokens_seen=False,\n",
            "include_tokens_per_second=False,\n",
            "jit_mode_eval=False,\n",
            "label_names=None,\n",
            "label_smoothing_factor=0.0,\n",
            "learning_rate=5e-05,\n",
            "length_column_name=length,\n",
            "load_best_model_at_end=False,\n",
            "local_rank=0,\n",
            "log_level=passive,\n",
            "log_level_replica=warning,\n",
            "log_on_each_node=True,\n",
            "logging_dir=eval_results/runs/Dec09_13-46-26_28318cecc41c,\n",
            "logging_first_step=False,\n",
            "logging_nan_inf_filter=True,\n",
            "logging_steps=500,\n",
            "logging_strategy=steps,\n",
            "lr_scheduler_kwargs={},\n",
            "lr_scheduler_type=linear,\n",
            "max_grad_norm=1.0,\n",
            "max_steps=-1,\n",
            "metric_for_best_model=None,\n",
            "mp_parameters=,\n",
            "neftune_noise_alpha=None,\n",
            "no_cuda=False,\n",
            "num_train_epochs=3.0,\n",
            "optim=adamw_torch,\n",
            "optim_args=None,\n",
            "output_dir=eval_results,\n",
            "overwrite_output_dir=False,\n",
            "past_index=-1,\n",
            "per_device_eval_batch_size=5,\n",
            "per_device_train_batch_size=8,\n",
            "prediction_loss_only=False,\n",
            "push_to_hub=False,\n",
            "push_to_hub_model_id=None,\n",
            "push_to_hub_organization=None,\n",
            "push_to_hub_token=<PUSH_TO_HUB_TOKEN>,\n",
            "ray_scope=last,\n",
            "remove_unused_columns=True,\n",
            "report_to=['tensorboard'],\n",
            "resume_from_checkpoint=None,\n",
            "run_name=eval_results,\n",
            "save_on_each_node=False,\n",
            "save_only_model=False,\n",
            "save_safetensors=True,\n",
            "save_steps=500,\n",
            "save_strategy=steps,\n",
            "save_total_limit=None,\n",
            "seed=42,\n",
            "skip_memory_metrics=True,\n",
            "split_batches=False,\n",
            "tf32=None,\n",
            "torch_compile=False,\n",
            "torch_compile_backend=None,\n",
            "torch_compile_mode=None,\n",
            "torchdynamo=None,\n",
            "tpu_metrics_debug=False,\n",
            "tpu_num_cores=None,\n",
            "use_cpu=False,\n",
            "use_ipex=False,\n",
            "use_legacy_prediction_loop=False,\n",
            "use_mps_device=False,\n",
            "warmup_ratio=0.0,\n",
            "warmup_steps=0,\n",
            "weight_decay=0.0,\n",
            ")\n",
            "Loading Dataset Infos from /root/.cache/huggingface/modules/datasets_modules/datasets/squad_it/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "12/09/2023 13:46:27 - INFO - datasets.info - Loading Dataset Infos from /root/.cache/huggingface/modules/datasets_modules/datasets/squad_it/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "Overwrite dataset info from restored data version if exists.\n",
            "12/09/2023 13:46:27 - INFO - datasets.builder - Overwrite dataset info from restored data version if exists.\n",
            "Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "12/09/2023 13:46:27 - INFO - datasets.info - Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "Found cached dataset squad_it (/root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71)\n",
            "12/09/2023 13:46:27 - INFO - datasets.builder - Found cached dataset squad_it (/root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71)\n",
            "Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "12/09/2023 13:46:27 - INFO - datasets.info - Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
            "config.json: 100% 831/831 [00:00<00:00, 4.83MB/s]\n",
            "[INFO|configuration_utils.py:739] 2023-12-09 13:46:27,364 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--osiria--deberta-italian-question-answering/snapshots/67dcec39da8dab0f1978c5da262349472e7dae1a/config.json\n",
            "[INFO|configuration_utils.py:802] 2023-12-09 13:46:27,368 >> Model config DebertaV2Config {\n",
            "  \"_name_or_path\": \"osiria/deberta-italian-question-answering\",\n",
            "  \"architectures\": [\n",
            "    \"DebertaV2ForQuestionAnswering\"\n",
            "  ],\n",
            "  \"attention_probs_dropout_prob\": 0.1,\n",
            "  \"hidden_act\": \"gelu\",\n",
            "  \"hidden_dropout_prob\": 0.1,\n",
            "  \"hidden_size\": 768,\n",
            "  \"initializer_range\": 0.02,\n",
            "  \"intermediate_size\": 3072,\n",
            "  \"layer_norm_eps\": 1e-07,\n",
            "  \"max_position_embeddings\": 512,\n",
            "  \"max_relative_positions\": -1,\n",
            "  \"model_type\": \"deberta-v2\",\n",
            "  \"norm_rel_ebd\": \"layer_norm\",\n",
            "  \"num_attention_heads\": 12,\n",
            "  \"num_hidden_layers\": 12,\n",
            "  \"pad_token_id\": 0,\n",
            "  \"pooler_dropout\": 0,\n",
            "  \"pooler_hidden_act\": \"gelu\",\n",
            "  \"pooler_hidden_size\": 768,\n",
            "  \"pos_att_type\": [\n",
            "    \"p2c\",\n",
            "    \"c2p\"\n",
            "  ],\n",
            "  \"position_biased_input\": false,\n",
            "  \"position_buckets\": 256,\n",
            "  \"relative_attention\": true,\n",
            "  \"share_att_key\": true,\n",
            "  \"torch_dtype\": \"float32\",\n",
            "  \"transformers_version\": \"4.36.0.dev0\",\n",
            "  \"type_vocab_size\": 0,\n",
            "  \"vocab_size\": 50256\n",
            "}\n",
            "\n",
            "tokenizer_config.json: 100% 412/412 [00:00<00:00, 2.68MB/s]\n",
            "tokenizer.json: 100% 2.02M/2.02M [00:00<00:00, 24.3MB/s]\n",
            "[INFO|tokenization_utils_base.py:2026] 2023-12-09 13:46:27,867 >> loading file spm.model from cache at None\n",
            "[INFO|tokenization_utils_base.py:2026] 2023-12-09 13:46:27,868 >> loading file tokenizer.json from cache at /root/.cache/huggingface/hub/models--osiria--deberta-italian-question-answering/snapshots/67dcec39da8dab0f1978c5da262349472e7dae1a/tokenizer.json\n",
            "[INFO|tokenization_utils_base.py:2026] 2023-12-09 13:46:27,868 >> loading file added_tokens.json from cache at None\n",
            "[INFO|tokenization_utils_base.py:2026] 2023-12-09 13:46:27,868 >> loading file special_tokens_map.json from cache at None\n",
            "[INFO|tokenization_utils_base.py:2026] 2023-12-09 13:46:27,868 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--osiria--deberta-italian-question-answering/snapshots/67dcec39da8dab0f1978c5da262349472e7dae1a/tokenizer_config.json\n",
            "pytorch_model.bin: 100% 496M/496M [00:08<00:00, 60.4MB/s]\n",
            "[INFO|modeling_utils.py:3299] 2023-12-09 13:46:36,709 >> loading weights file pytorch_model.bin from cache at /root/.cache/huggingface/hub/models--osiria--deberta-italian-question-answering/snapshots/67dcec39da8dab0f1978c5da262349472e7dae1a/pytorch_model.bin\n",
            "[INFO|modeling_utils.py:4139] 2023-12-09 13:46:38,836 >> All model checkpoint weights were used when initializing DebertaV2ForQuestionAnswering.\n",
            "\n",
            "[INFO|modeling_utils.py:4147] 2023-12-09 13:46:38,837 >> All the weights of DebertaV2ForQuestionAnswering were initialized from the model checkpoint at osiria/deberta-italian-question-answering.\n",
            "If your task is similar to the task the model of the checkpoint was trained on, you can already use DebertaV2ForQuestionAnswering for predictions without further training.\n",
            "Running tokenizer on prediction dataset:   0% 0/7609 [00:00<?, ? examples/s]Caching processed dataset at /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71/cache-2e8257692e3c7ae9.arrow\n",
            "12/09/2023 13:46:39 - INFO - datasets.arrow_dataset - Caching processed dataset at /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71/cache-2e8257692e3c7ae9.arrow\n",
            "Running tokenizer on prediction dataset: 100% 7609/7609 [00:07<00:00, 992.36 examples/s] \n",
            "Downloading builder script: 100% 4.53k/4.53k [00:00<00:00, 16.7MB/s]\n",
            "Downloading extra modules: 100% 3.32k/3.32k [00:00<00:00, 17.7MB/s]\n",
            "12/09/2023 13:46:52 - INFO - __main__ - *** Predict ***\n",
            "[INFO|trainer.py:712] 2023-12-09 13:46:52,875 >> The following columns in the test set don't have a corresponding argument in `DebertaV2ForQuestionAnswering.forward` and have been ignored: offset_mapping, example_id. If offset_mapping, example_id are not expected by `DebertaV2ForQuestionAnswering.forward`,  you can safely ignore this message.\n",
            "[INFO|trainer.py:3154] 2023-12-09 13:46:52,880 >> ***** Running Prediction *****\n",
            "[INFO|trainer.py:3156] 2023-12-09 13:46:52,880 >>   Num examples = 8565\n",
            "[INFO|trainer.py:3159] 2023-12-09 13:46:52,880 >>   Batch size = 5\n",
            "100% 1713/1713 [04:39<00:00,  6.08it/s]12/09/2023 13:51:46 - INFO - utils_qa - Post-processing 7609 example predictions split into 8565 features.\n",
            "\n",
            "  0% 0/7609 [00:00<?, ?it/s]\u001b[A\n",
            "  0% 30/7609 [00:00<00:25, 296.87it/s]\u001b[A\n",
            "  1% 63/7609 [00:00<00:24, 306.13it/s]\u001b[A\n",
            "  1% 95/7609 [00:00<00:24, 309.31it/s]\u001b[A\n",
            "  2% 130/7609 [00:00<00:23, 323.50it/s]\u001b[A\n",
            "  2% 164/7609 [00:00<00:22, 327.33it/s]\u001b[A\n",
            "  3% 197/7609 [00:00<00:22, 328.10it/s]\u001b[A\n",
            "  3% 233/7609 [00:00<00:21, 337.31it/s]\u001b[A\n",
            "  4% 267/7609 [00:00<00:22, 328.30it/s]\u001b[A\n",
            "  4% 300/7609 [00:00<00:22, 319.62it/s]\u001b[A\n",
            "  4% 333/7609 [00:01<00:23, 312.94it/s]\u001b[A\n",
            "  5% 365/7609 [00:01<00:23, 304.83it/s]\u001b[A\n",
            "  5% 401/7609 [00:01<00:22, 319.08it/s]\u001b[A\n",
            "  6% 434/7609 [00:01<00:22, 316.14it/s]\u001b[A\n",
            "  6% 469/7609 [00:01<00:22, 324.14it/s]\u001b[A\n",
            "  7% 503/7609 [00:01<00:21, 324.56it/s]\u001b[A\n",
            "  7% 536/7609 [00:01<00:24, 283.86it/s]\u001b[A\n",
            "  7% 570/7609 [00:01<00:23, 298.26it/s]\u001b[A\n",
            "  8% 605/7609 [00:01<00:22, 311.69it/s]\u001b[A\n",
            "  8% 639/7609 [00:02<00:21, 318.46it/s]\u001b[A\n",
            "  9% 674/7609 [00:02<00:21, 325.94it/s]\u001b[A\n",
            "  9% 709/7609 [00:02<00:20, 331.10it/s]\u001b[A\n",
            " 10% 743/7609 [00:02<00:20, 328.57it/s]\u001b[A\n",
            " 10% 777/7609 [00:02<00:20, 330.22it/s]\u001b[A\n",
            " 11% 811/7609 [00:02<00:21, 318.91it/s]\u001b[A\n",
            " 11% 844/7609 [00:02<00:23, 294.04it/s]\u001b[A\n",
            " 12% 879/7609 [00:02<00:21, 307.30it/s]\u001b[A\n",
            " 12% 914/7609 [00:02<00:21, 316.53it/s]\u001b[A\n",
            " 12% 947/7609 [00:03<00:21, 305.30it/s]\u001b[A\n",
            " 13% 978/7609 [00:03<00:25, 256.07it/s]\u001b[A\n",
            " 13% 1006/7609 [00:03<00:28, 234.41it/s]\u001b[A\n",
            " 14% 1031/7609 [00:03<00:29, 223.61it/s]\u001b[A\n",
            " 14% 1055/7609 [00:03<00:30, 217.33it/s]\u001b[A\n",
            " 14% 1078/7609 [00:03<00:30, 211.35it/s]\u001b[A\n",
            " 14% 1100/7609 [00:03<00:36, 179.51it/s]\u001b[A\n",
            " 15% 1119/7609 [00:03<00:36, 178.32it/s]\u001b[A\n",
            " 15% 1138/7609 [00:04<00:36, 177.17it/s]\u001b[A\n",
            " 15% 1157/7609 [00:04<00:38, 167.06it/s]\u001b[A\n",
            " 15% 1175/7609 [00:04<00:39, 164.57it/s]\u001b[A\n",
            " 16% 1193/7609 [00:04<00:38, 166.60it/s]\u001b[A\n",
            " 16% 1214/7609 [00:04<00:36, 176.82it/s]\u001b[A\n",
            " 16% 1234/7609 [00:04<00:35, 182.06it/s]\u001b[A\n",
            " 16% 1254/7609 [00:04<00:34, 186.72it/s]\u001b[A\n",
            " 17% 1275/7609 [00:04<00:32, 192.12it/s]\u001b[A\n",
            " 17% 1295/7609 [00:04<00:33, 189.71it/s]\u001b[A\n",
            " 17% 1315/7609 [00:05<00:32, 192.53it/s]\u001b[A\n",
            " 18% 1335/7609 [00:05<00:32, 191.18it/s]\u001b[A\n",
            " 18% 1355/7609 [00:05<00:33, 188.33it/s]\u001b[A\n",
            " 18% 1374/7609 [00:05<00:34, 180.65it/s]\u001b[A\n",
            " 18% 1393/7609 [00:05<00:42, 147.93it/s]\u001b[A\n",
            " 19% 1409/7609 [00:05<00:43, 142.12it/s]\u001b[A\n",
            " 19% 1427/7609 [00:05<00:41, 149.49it/s]\u001b[A\n",
            " 19% 1443/7609 [00:05<00:41, 146.88it/s]\u001b[A\n",
            " 19% 1459/7609 [00:06<00:41, 147.65it/s]\u001b[A\n",
            " 19% 1477/7609 [00:06<00:39, 153.62it/s]\u001b[A\n",
            " 20% 1493/7609 [00:06<00:43, 139.53it/s]\u001b[A\n",
            " 20% 1510/7609 [00:06<00:41, 146.34it/s]\u001b[A\n",
            " 20% 1526/7609 [00:06<00:40, 148.38it/s]\u001b[A\n",
            " 20% 1547/7609 [00:06<00:36, 164.60it/s]\u001b[A\n",
            " 21% 1565/7609 [00:06<00:35, 168.77it/s]\u001b[A\n",
            " 21% 1584/7609 [00:06<00:34, 174.61it/s]\u001b[A\n",
            " 21% 1602/7609 [00:06<00:38, 156.71it/s]\u001b[A\n",
            " 21% 1629/7609 [00:07<00:32, 186.13it/s]\u001b[A\n",
            " 22% 1655/7609 [00:07<00:28, 206.36it/s]\u001b[A\n",
            " 22% 1684/7609 [00:07<00:25, 229.80it/s]\u001b[A\n",
            " 23% 1715/7609 [00:07<00:23, 252.23it/s]\u001b[A\n",
            " 23% 1752/7609 [00:07<00:20, 284.45it/s]\u001b[A\n",
            " 23% 1781/7609 [00:07<00:21, 274.82it/s]\u001b[A\n",
            " 24% 1809/7609 [00:07<00:21, 266.13it/s]\u001b[A\n",
            " 24% 1836/7609 [00:07<00:22, 256.80it/s]\u001b[A\n",
            " 24% 1862/7609 [00:07<00:22, 252.67it/s]\u001b[A\n",
            " 25% 1893/7609 [00:07<00:21, 267.37it/s]\u001b[A\n",
            " 25% 1923/7609 [00:08<00:20, 271.80it/s]\u001b[A\n",
            " 26% 1951/7609 [00:08<00:21, 267.98it/s]\u001b[A\n",
            " 26% 1978/7609 [00:08<00:23, 237.33it/s]\u001b[A\n",
            " 26% 2003/7609 [00:08<00:26, 209.19it/s]\u001b[A\n",
            " 27% 2025/7609 [00:08<00:31, 179.71it/s]\u001b[A\n",
            " 27% 2047/7609 [00:08<00:29, 188.46it/s]\u001b[A\n",
            " 27% 2067/7609 [00:08<00:29, 185.33it/s]\u001b[A\n",
            " 27% 2087/7609 [00:09<00:38, 141.76it/s]\u001b[A\n",
            " 28% 2104/7609 [00:09<00:42, 130.53it/s]\u001b[A\n",
            " 28% 2137/7609 [00:09<00:31, 172.91it/s]\u001b[A\n",
            " 29% 2171/7609 [00:09<00:25, 210.54it/s]\u001b[A\n",
            " 29% 2196/7609 [00:09<00:24, 217.27it/s]\u001b[A\n",
            " 29% 2224/7609 [00:09<00:23, 231.07it/s]\u001b[A\n",
            " 30% 2252/7609 [00:09<00:22, 242.12it/s]\u001b[A\n",
            " 30% 2278/7609 [00:09<00:21, 244.50it/s]\u001b[A\n",
            " 30% 2311/7609 [00:09<00:19, 266.67it/s]\u001b[A\n",
            " 31% 2345/7609 [00:10<00:18, 286.50it/s]\u001b[A\n",
            " 31% 2380/7609 [00:10<00:17, 302.89it/s]\u001b[A\n",
            " 32% 2414/7609 [00:10<00:16, 312.08it/s]\u001b[A\n",
            " 32% 2448/7609 [00:10<00:16, 318.29it/s]\u001b[A\n",
            " 33% 2481/7609 [00:10<00:17, 285.32it/s]\u001b[A\n",
            " 33% 2516/7609 [00:10<00:16, 301.88it/s]\u001b[A\n",
            " 33% 2549/7609 [00:10<00:16, 307.36it/s]\u001b[A\n",
            " 34% 2581/7609 [00:10<00:16, 303.79it/s]\u001b[A\n",
            " 34% 2612/7609 [00:10<00:17, 285.90it/s]\u001b[A\n",
            " 35% 2642/7609 [00:11<00:17, 289.27it/s]\u001b[A\n",
            " 35% 2675/7609 [00:11<00:16, 299.99it/s]\u001b[A\n",
            " 36% 2709/7609 [00:11<00:15, 309.63it/s]\u001b[A\n",
            " 36% 2741/7609 [00:11<00:15, 307.48it/s]\u001b[A\n",
            " 36% 2776/7609 [00:11<00:15, 317.59it/s]\u001b[A\n",
            " 37% 2809/7609 [00:11<00:15, 319.54it/s]\u001b[A\n",
            " 37% 2844/7609 [00:11<00:14, 325.93it/s]\u001b[A\n",
            " 38% 2877/7609 [00:11<00:14, 326.53it/s]\u001b[A\n",
            " 38% 2910/7609 [00:11<00:14, 321.29it/s]\u001b[A\n",
            " 39% 2947/7609 [00:12<00:14, 332.73it/s]\u001b[A\n",
            " 39% 2981/7609 [00:12<00:13, 334.40it/s]\u001b[A\n",
            " 40% 3015/7609 [00:12<00:14, 313.75it/s]\u001b[A\n",
            " 40% 3047/7609 [00:12<00:14, 309.26it/s]\u001b[A\n",
            " 41% 3082/7609 [00:12<00:14, 319.12it/s]\u001b[A\n",
            " 41% 3115/7609 [00:12<00:15, 299.21it/s]\u001b[A\n",
            " 41% 3148/7609 [00:12<00:14, 307.52it/s]\u001b[A\n",
            " 42% 3180/7609 [00:12<00:14, 298.32it/s]\u001b[A\n",
            " 42% 3211/7609 [00:12<00:16, 271.36it/s]\u001b[A\n",
            " 43% 3239/7609 [00:13<00:16, 272.02it/s]\u001b[A\n",
            " 43% 3271/7609 [00:13<00:15, 283.66it/s]\u001b[A\n",
            " 43% 3307/7609 [00:13<00:14, 302.25it/s]\u001b[A\n",
            " 44% 3338/7609 [00:13<00:14, 288.65it/s]\u001b[A\n",
            " 44% 3372/7609 [00:13<00:14, 302.23it/s]\u001b[A\n",
            " 45% 3404/7609 [00:13<00:13, 306.99it/s]\u001b[A\n",
            " 45% 3437/7609 [00:13<00:13, 312.28it/s]\u001b[A\n",
            " 46% 3473/7609 [00:13<00:12, 324.45it/s]\u001b[A\n",
            " 46% 3508/7609 [00:13<00:12, 331.91it/s]\u001b[A\n",
            " 47% 3542/7609 [00:13<00:12, 317.38it/s]\u001b[A\n",
            " 47% 3577/7609 [00:14<00:12, 324.89it/s]\u001b[A\n",
            " 47% 3610/7609 [00:14<00:13, 305.90it/s]\u001b[A\n",
            " 48% 3641/7609 [00:14<00:12, 305.74it/s]\u001b[A\n",
            " 48% 3676/7609 [00:14<00:12, 317.70it/s]\u001b[A\n",
            " 49% 3710/7609 [00:14<00:12, 321.32it/s]\u001b[A\n",
            " 49% 3745/7609 [00:14<00:11, 327.62it/s]\u001b[A\n",
            " 50% 3778/7609 [00:14<00:12, 309.38it/s]\u001b[A\n",
            " 50% 3810/7609 [00:14<00:12, 308.31it/s]\u001b[A\n",
            " 51% 3849/7609 [00:14<00:11, 329.63it/s]\u001b[A\n",
            " 51% 3883/7609 [00:15<00:11, 325.75it/s]\u001b[A\n",
            " 51% 3917/7609 [00:15<00:11, 328.48it/s]\u001b[A\n",
            " 52% 3954/7609 [00:15<00:10, 338.18it/s]\u001b[A\n",
            " 52% 3988/7609 [00:15<00:11, 320.54it/s]\u001b[A\n",
            " 53% 4021/7609 [00:15<00:11, 315.80it/s]\u001b[A\n",
            " 53% 4055/7609 [00:15<00:11, 320.95it/s]\u001b[A\n",
            " 54% 4088/7609 [00:15<00:12, 292.58it/s]\u001b[A\n",
            " 54% 4118/7609 [00:15<00:11, 293.60it/s]\u001b[A\n",
            " 55% 4155/7609 [00:15<00:11, 313.82it/s]\u001b[A\n",
            " 55% 4187/7609 [00:16<00:11, 305.49it/s]\u001b[A\n",
            " 55% 4218/7609 [00:16<00:11, 304.90it/s]\u001b[A\n",
            " 56% 4254/7609 [00:16<00:10, 319.50it/s]\u001b[A\n",
            " 56% 4290/7609 [00:16<00:10, 329.58it/s]\u001b[A\n",
            " 57% 4324/7609 [00:16<00:09, 331.88it/s]\u001b[A\n",
            " 57% 4360/7609 [00:16<00:09, 337.72it/s]\u001b[A\n",
            " 58% 4395/7609 [00:16<00:09, 339.85it/s]\u001b[A\n",
            " 58% 4431/7609 [00:16<00:09, 344.61it/s]\u001b[A\n",
            " 59% 4466/7609 [00:16<00:10, 311.78it/s]\u001b[A\n",
            " 59% 4498/7609 [00:16<00:09, 313.10it/s]\u001b[A\n",
            " 60% 4530/7609 [00:17<00:11, 260.35it/s]\u001b[A\n",
            " 60% 4558/7609 [00:17<00:13, 220.21it/s]\u001b[A\n",
            " 60% 4583/7609 [00:17<00:14, 212.57it/s]\u001b[A\n",
            " 61% 4606/7609 [00:17<00:14, 207.48it/s]\u001b[A\n",
            " 61% 4628/7609 [00:17<00:14, 204.97it/s]\u001b[A\n",
            " 61% 4650/7609 [00:17<00:14, 198.71it/s]\u001b[A\n",
            " 61% 4671/7609 [00:17<00:14, 196.46it/s]\u001b[A\n",
            " 62% 4691/7609 [00:18<00:15, 193.22it/s]\u001b[A\n",
            " 62% 4711/7609 [00:18<00:15, 186.90it/s]\u001b[A\n",
            " 62% 4732/7609 [00:18<00:15, 191.45it/s]\u001b[A\n",
            " 62% 4752/7609 [00:18<00:15, 190.35it/s]\u001b[A\n",
            " 63% 4772/7609 [00:18<00:15, 181.29it/s]\u001b[A\n",
            " 63% 4791/7609 [00:18<00:15, 178.11it/s]\u001b[A\n",
            " 63% 4811/7609 [00:18<00:15, 182.47it/s]\u001b[A\n",
            " 63% 4830/7609 [00:18<00:15, 180.90it/s]\u001b[A\n",
            " 64% 4849/7609 [00:18<00:15, 180.39it/s]\u001b[A\n",
            " 64% 4868/7609 [00:19<00:15, 181.04it/s]\u001b[A\n",
            " 64% 4887/7609 [00:19<00:15, 172.19it/s]\u001b[A\n",
            " 64% 4906/7609 [00:19<00:15, 175.10it/s]\u001b[A\n",
            " 65% 4924/7609 [00:19<00:15, 175.36it/s]\u001b[A\n",
            " 65% 4942/7609 [00:19<00:15, 172.89it/s]\u001b[A\n",
            " 65% 4960/7609 [00:19<00:17, 153.44it/s]\u001b[A\n",
            " 65% 4980/7609 [00:19<00:16, 164.31it/s]\u001b[A\n",
            " 66% 4997/7609 [00:19<00:15, 164.29it/s]\u001b[A\n",
            " 66% 5015/7609 [00:19<00:15, 166.32it/s]\u001b[A\n",
            " 66% 5035/7609 [00:20<00:14, 174.85it/s]\u001b[A\n",
            " 66% 5054/7609 [00:20<00:14, 178.16it/s]\u001b[A\n",
            " 67% 5073/7609 [00:20<00:14, 180.39it/s]\u001b[A\n",
            " 67% 5092/7609 [00:20<00:13, 182.22it/s]\u001b[A\n",
            " 67% 5112/7609 [00:20<00:13, 184.17it/s]\u001b[A\n",
            " 67% 5132/7609 [00:20<00:13, 186.85it/s]\u001b[A\n",
            " 68% 5151/7609 [00:20<00:13, 186.90it/s]\u001b[A\n",
            " 68% 5170/7609 [00:20<00:13, 185.90it/s]\u001b[A\n",
            " 68% 5199/7609 [00:20<00:11, 215.56it/s]\u001b[A\n",
            " 69% 5234/7609 [00:20<00:09, 254.26it/s]\u001b[A\n",
            " 69% 5268/7609 [00:21<00:08, 278.67it/s]\u001b[A\n",
            " 70% 5304/7609 [00:21<00:07, 300.10it/s]\u001b[A\n",
            " 70% 5336/7609 [00:21<00:07, 305.12it/s]\u001b[A\n",
            " 71% 5370/7609 [00:21<00:07, 314.40it/s]\u001b[A\n",
            " 71% 5405/7609 [00:21<00:06, 323.66it/s]\u001b[A\n",
            " 71% 5438/7609 [00:21<00:06, 321.54it/s]\u001b[A\n",
            " 72% 5471/7609 [00:21<00:06, 322.00it/s]\u001b[A\n",
            " 72% 5506/7609 [00:21<00:06, 329.54it/s]\u001b[A\n",
            " 73% 5539/7609 [00:21<00:06, 329.48it/s]\u001b[A\n",
            " 73% 5572/7609 [00:21<00:06, 320.73it/s]\u001b[A\n",
            " 74% 5608/7609 [00:22<00:06, 330.97it/s]\u001b[A\n",
            " 74% 5642/7609 [00:22<00:05, 332.83it/s]\u001b[A\n",
            " 75% 5676/7609 [00:22<00:06, 319.04it/s]\u001b[A\n",
            " 75% 5713/7609 [00:22<00:05, 331.88it/s]\u001b[A\n",
            " 76% 5748/7609 [00:22<00:05, 336.91it/s]\u001b[A\n",
            " 76% 5784/7609 [00:22<00:05, 342.31it/s]\u001b[A\n",
            " 77% 5822/7609 [00:22<00:05, 350.47it/s]\u001b[A\n",
            " 77% 5858/7609 [00:22<00:05, 332.99it/s]\u001b[A\n",
            " 77% 5892/7609 [00:22<00:05, 334.82it/s]\u001b[A\n",
            " 78% 5927/7609 [00:23<00:04, 336.67it/s]\u001b[A\n",
            " 78% 5961/7609 [00:23<00:05, 317.28it/s]\u001b[A\n",
            " 79% 5994/7609 [00:23<00:05, 308.88it/s]\u001b[A\n",
            " 79% 6026/7609 [00:23<00:05, 287.20it/s]\u001b[A\n",
            " 80% 6056/7609 [00:23<00:05, 281.41it/s]\u001b[A\n",
            " 80% 6092/7609 [00:23<00:05, 302.34it/s]\u001b[A\n",
            " 80% 6123/7609 [00:23<00:05, 265.75it/s]\u001b[A\n",
            " 81% 6151/7609 [00:23<00:06, 212.18it/s]\u001b[A\n",
            " 81% 6188/7609 [00:24<00:05, 246.92it/s]\u001b[A\n",
            " 82% 6225/7609 [00:24<00:05, 276.23it/s]\u001b[A\n",
            " 82% 6259/7609 [00:24<00:04, 291.50it/s]\u001b[A\n",
            " 83% 6297/7609 [00:24<00:04, 314.78it/s]\u001b[A\n",
            " 83% 6333/7609 [00:24<00:03, 325.16it/s]\u001b[A\n",
            " 84% 6367/7609 [00:24<00:03, 320.45it/s]\u001b[A\n",
            " 84% 6404/7609 [00:24<00:03, 332.01it/s]\u001b[A\n",
            " 85% 6440/7609 [00:24<00:03, 339.49it/s]\u001b[A\n",
            " 85% 6476/7609 [00:24<00:03, 344.22it/s]\u001b[A\n",
            " 86% 6511/7609 [00:24<00:03, 339.51it/s]\u001b[A\n",
            " 86% 6546/7609 [00:25<00:03, 338.59it/s]\u001b[A\n",
            " 87% 6584/7609 [00:25<00:02, 349.58it/s]\u001b[A\n",
            " 87% 6620/7609 [00:25<00:03, 313.74it/s]\u001b[A\n",
            " 87% 6654/7609 [00:25<00:02, 319.78it/s]\u001b[A\n",
            " 88% 6687/7609 [00:25<00:02, 315.09it/s]\u001b[A\n",
            " 88% 6720/7609 [00:25<00:02, 318.11it/s]\u001b[A\n",
            " 89% 6753/7609 [00:25<00:02, 315.68it/s]\u001b[A\n",
            " 89% 6785/7609 [00:25<00:02, 312.97it/s]\u001b[A\n",
            " 90% 6817/7609 [00:25<00:02, 304.53it/s]\u001b[A\n",
            " 90% 6848/7609 [00:26<00:02, 301.63it/s]\u001b[A\n",
            " 90% 6879/7609 [00:26<00:02, 297.74it/s]\u001b[A\n",
            " 91% 6912/7609 [00:26<00:02, 306.45it/s]\u001b[A\n",
            " 91% 6947/7609 [00:26<00:02, 318.14it/s]\u001b[A\n",
            " 92% 6983/7609 [00:26<00:01, 329.33it/s]\u001b[A\n",
            " 92% 7018/7609 [00:26<00:01, 334.50it/s]\u001b[A\n",
            " 93% 7052/7609 [00:26<00:01, 323.93it/s]\u001b[A\n",
            " 93% 7085/7609 [00:26<00:01, 284.11it/s]\u001b[A\n",
            " 94% 7115/7609 [00:26<00:01, 269.39it/s]\u001b[A\n",
            " 94% 7143/7609 [00:27<00:01, 270.86it/s]\u001b[A\n",
            " 94% 7172/7609 [00:27<00:01, 275.86it/s]\u001b[A\n",
            " 95% 7200/7609 [00:27<00:01, 261.83it/s]\u001b[A\n",
            " 95% 7236/7609 [00:27<00:01, 286.70it/s]\u001b[A\n",
            " 96% 7268/7609 [00:27<00:01, 294.25it/s]\u001b[A\n",
            " 96% 7302/7609 [00:27<00:01, 305.73it/s]\u001b[A\n",
            " 96% 7333/7609 [00:27<00:00, 305.03it/s]\u001b[A\n",
            " 97% 7369/7609 [00:27<00:00, 317.90it/s]\u001b[A\n",
            " 97% 7402/7609 [00:27<00:00, 319.15it/s]\u001b[A\n",
            " 98% 7435/7609 [00:27<00:00, 317.37it/s]\u001b[A\n",
            " 98% 7467/7609 [00:28<00:00, 298.63it/s]\u001b[A\n",
            " 99% 7498/7609 [00:28<00:00, 292.04it/s]\u001b[A\n",
            " 99% 7528/7609 [00:28<00:00, 276.90it/s]\u001b[A\n",
            " 99% 7556/7609 [00:28<00:00, 241.41it/s]\u001b[A\n",
            "100% 7609/7609 [00:28<00:00, 265.00it/s]\n",
            "12/09/2023 13:52:15 - INFO - utils_qa - Saving predictions to eval_results/predict_predictions.json.\n",
            "12/09/2023 13:52:15 - INFO - utils_qa - Saving nbest_preds to eval_results/predict_nbest_predictions.json.\n",
            "***** predict metrics *****\n",
            "  predict_samples         =       8565\n",
            "  test_exact_match        =    70.1932\n",
            "  test_f1                 =     81.017\n",
            "  test_runtime            = 0:04:42.02\n",
            "  test_samples_per_second =     30.369\n",
            "  test_steps_per_second   =      6.074\n",
            "[INFO|modelcard.py:452] 2023-12-09 13:52:19,396 >> Dropping the following result as it does not have all the necessary fields:\n",
            "{'task': {'name': 'Question Answering', 'type': 'question-answering'}, 'dataset': {'name': 'squad_it', 'type': 'squad_it'}}\n",
            "100% 1713/1713 [05:23<00:00,  5.29it/s]\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [],
      "metadata": {
        "id": "ij8YkY0xyNXI"
      },
      "execution_count": null,
      "outputs": []
    }
  ]
}