File size: 61,466 Bytes
678763a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
{
  "nbformat": 4,
  "nbformat_minor": 0,
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "name": "python3",
      "display_name": "Python 3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "## Step 1: Setting Up Optimum ExecuTorch"
      ],
      "metadata": {
        "id": "JJ2zK7BTZ2no"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "! touch /content/optimum-executorch; rm -rf /content/optimum-executorch\n",
        "! git clone https://github.com/huggingface/optimum-executorch ; cd /content/optimum-executorch; pip install --pre executorch==0.6.0 torch==2.7.0 torchvision --extra-index-url \"https://download.pytorch.org/whl/test/cpu\"; pip install .; pip list"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "jQiHrRPgroP1",
        "outputId": "22f835bb-96b5-4d83-8abe-84ca8f6626d8"
      },
      "execution_count": 2,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Cloning into 'optimum-executorch'...\n",
            "remote: Enumerating objects: 533, done.\u001b[K\n",
            "remote: Counting objects: 100% (234/234), done.\u001b[K\n",
            "remote: Compressing objects: 100% (114/114), done.\u001b[K\n",
            "remote: Total 533 (delta 168), reused 129 (delta 116), pack-reused 299 (from 2)\u001b[K\n",
            "Receiving objects: 100% (533/533), 173.70 KiB | 5.26 MiB/s, done.\n",
            "Resolving deltas: 100% (275/275), done.\n",
            "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/test/cpu\n",
            "Requirement already satisfied: executorch==0.6.0 in /usr/local/lib/python3.11/dist-packages (0.6.0+cpu)\n",
            "Collecting torch==2.7.0\n",
            "  Downloading https://download.pytorch.org/whl/test/cpu/torch-2.7.0%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (27 kB)\n",
            "Requirement already satisfied: torchvision in /usr/local/lib/python3.11/dist-packages (0.20.0)\n",
            "Requirement already satisfied: expecttest in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.3.0)\n",
            "Requirement already satisfied: flatbuffers in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (25.2.10)\n",
            "Requirement already satisfied: hypothesis in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (6.131.0)\n",
            "Requirement already satisfied: mpmath==1.3.0 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (1.3.0)\n",
            "Requirement already satisfied: numpy>=2.0.0 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (2.2.4)\n",
            "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (24.2)\n",
            "Requirement already satisfied: pandas>=2.2.2 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (2.2.2)\n",
            "Requirement already satisfied: parameterized in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.9.0)\n",
            "Requirement already satisfied: pytest in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (8.3.5)\n",
            "Requirement already satisfied: pytest-xdist in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (3.6.1)\n",
            "Requirement already satisfied: pytest-rerunfailures in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (15.0)\n",
            "Requirement already satisfied: pyyaml in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (6.0.2)\n",
            "Requirement already satisfied: ruamel.yaml in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.18.10)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (1.13.1)\n",
            "Requirement already satisfied: tabulate in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.9.0)\n",
            "Requirement already satisfied: torchao==0.10.0 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.10.0+cpu)\n",
            "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (4.13.1)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.18.0)\n",
            "Collecting sympy (from executorch==0.6.0)\n",
            "  Downloading https://download.pytorch.org/whl/test/sympy-1.13.3-py3-none-any.whl.metadata (12 kB)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.4.2)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.1.6)\n",
            "Requirement already satisfied: fsspec in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (2024.12.0)\n",
            "INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.\n",
            "Collecting torchvision\n",
            "  Downloading https://download.pytorch.org/whl/test/cpu/torchvision-0.22.0%2Bcpu-cp311-cp311-linux_x86_64.whl.metadata (6.1 kB)\n",
            "Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.11/dist-packages (from torchvision) (11.1.0)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch==0.6.0) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch==0.6.0) (2025.2)\n",
            "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch==0.6.0) (2025.2)\n",
            "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.11/dist-packages (from hypothesis->executorch==0.6.0) (25.3.0)\n",
            "Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in /usr/local/lib/python3.11/dist-packages (from hypothesis->executorch==0.6.0) (2.4.0)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch==2.7.0) (3.0.2)\n",
            "Requirement already satisfied: iniconfig in /usr/local/lib/python3.11/dist-packages (from pytest->executorch==0.6.0) (2.1.0)\n",
            "Requirement already satisfied: pluggy<2,>=1.5 in /usr/local/lib/python3.11/dist-packages (from pytest->executorch==0.6.0) (1.5.0)\n",
            "Requirement already satisfied: execnet>=2.1 in /usr/local/lib/python3.11/dist-packages (from pytest-xdist->executorch==0.6.0) (2.1.1)\n",
            "Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /usr/local/lib/python3.11/dist-packages (from ruamel.yaml->executorch==0.6.0) (0.2.12)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->pandas>=2.2.2->executorch==0.6.0) (1.17.0)\n",
            "Downloading https://download.pytorch.org/whl/test/cpu/torch-2.7.0%2Bcpu-cp311-cp311-manylinux_2_28_x86_64.whl (176.0 MB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m176.0/176.0 MB\u001b[0m \u001b[31m7.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading https://download.pytorch.org/whl/test/cpu/torchvision-0.22.0%2Bcpu-cp311-cp311-linux_x86_64.whl (2.0 MB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.0/2.0 MB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hDownloading https://download.pytorch.org/whl/test/sympy-1.13.3-py3-none-any.whl (6.2 MB)\n",
            "\u001b[2K   \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m6.2/6.2 MB\u001b[0m \u001b[31m12.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
            "\u001b[?25hInstalling collected packages: sympy, torch, torchvision\n",
            "  Attempting uninstall: sympy\n",
            "    Found existing installation: sympy 1.13.1\n",
            "    Uninstalling sympy-1.13.1:\n",
            "      Successfully uninstalled sympy-1.13.1\n",
            "  Attempting uninstall: torch\n",
            "    Found existing installation: torch 2.5.0+cpu\n",
            "    Uninstalling torch-2.5.0+cpu:\n",
            "      Successfully uninstalled torch-2.5.0+cpu\n",
            "  Attempting uninstall: torchvision\n",
            "    Found existing installation: torchvision 0.20.0\n",
            "    Uninstalling torchvision-0.20.0:\n",
            "      Successfully uninstalled torchvision-0.20.0\n",
            "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
            "torchaudio 2.5.0 requires torch==2.5.0, but you have torch 2.7.0+cpu which is incompatible.\n",
            "fastai 2.7.19 requires torch<2.7,>=1.10, but you have torch 2.7.0+cpu which is incompatible.\u001b[0m\u001b[31m\n",
            "\u001b[0mSuccessfully installed sympy-1.13.3 torch-2.7.0+cpu torchvision-0.22.0+cpu\n",
            "Processing /content/optimum-executorch\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: optimum~=1.24 in /usr/local/lib/python3.11/dist-packages (from optimum-executorch==0.0.0.dev0) (1.24.0)\n",
            "Requirement already satisfied: executorch!=0.5.0,>=0.4.0 in /usr/local/lib/python3.11/dist-packages (from optimum-executorch==0.0.0.dev0) (0.6.0+cpu)\n",
            "Requirement already satisfied: transformers==4.51.0 in /usr/local/lib/python3.11/dist-packages (from optimum-executorch==0.0.0.dev0) (4.51.0)\n",
            "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (3.18.0)\n",
            "Requirement already satisfied: huggingface-hub<1.0,>=0.30.0 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (0.30.1)\n",
            "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2.2.4)\n",
            "Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (24.2)\n",
            "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (6.0.2)\n",
            "Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2024.11.6)\n",
            "Requirement already satisfied: requests in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2.32.3)\n",
            "Requirement already satisfied: tokenizers<0.22,>=0.21 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (0.21.1)\n",
            "Requirement already satisfied: safetensors>=0.4.3 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (0.5.3)\n",
            "Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.11/dist-packages (from transformers==4.51.0->optimum-executorch==0.0.0.dev0) (4.67.1)\n",
            "Requirement already satisfied: expecttest in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.3.0)\n",
            "Requirement already satisfied: flatbuffers in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (25.2.10)\n",
            "Requirement already satisfied: hypothesis in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (6.131.0)\n",
            "Requirement already satisfied: mpmath==1.3.0 in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (1.3.0)\n",
            "Requirement already satisfied: pandas>=2.2.2 in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2.2.2)\n",
            "Requirement already satisfied: parameterized in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.9.0)\n",
            "Requirement already satisfied: pytest in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (8.3.5)\n",
            "Requirement already satisfied: pytest-xdist in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (3.6.1)\n",
            "Requirement already satisfied: pytest-rerunfailures in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (15.0)\n",
            "Requirement already satisfied: ruamel.yaml in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.18.10)\n",
            "Requirement already satisfied: sympy in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (1.13.3)\n",
            "Requirement already satisfied: tabulate in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.9.0)\n",
            "Requirement already satisfied: torchao==0.10.0 in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.10.0+cpu)\n",
            "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/dist-packages (from executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (4.13.1)\n",
            "Requirement already satisfied: torch>=1.11 in /usr/local/lib/python3.11/dist-packages (from optimum~=1.24->optimum-executorch==0.0.0.dev0) (2.7.0+cpu)\n",
            "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.11/dist-packages (from huggingface-hub<1.0,>=0.30.0->transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2024.12.0)\n",
            "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2.8.2)\n",
            "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2025.2)\n",
            "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.11/dist-packages (from pandas>=2.2.2->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2025.2)\n",
            "Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch>=1.11->optimum~=1.24->optimum-executorch==0.0.0.dev0) (3.4.2)\n",
            "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch>=1.11->optimum~=1.24->optimum-executorch==0.0.0.dev0) (3.1.6)\n",
            "Requirement already satisfied: attrs>=22.2.0 in /usr/local/lib/python3.11/dist-packages (from hypothesis->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (25.3.0)\n",
            "Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in /usr/local/lib/python3.11/dist-packages (from hypothesis->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2.4.0)\n",
            "Requirement already satisfied: iniconfig in /usr/local/lib/python3.11/dist-packages (from pytest->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2.1.0)\n",
            "Requirement already satisfied: pluggy<2,>=1.5 in /usr/local/lib/python3.11/dist-packages (from pytest->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (1.5.0)\n",
            "Requirement already satisfied: execnet>=2.1 in /usr/local/lib/python3.11/dist-packages (from pytest-xdist->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (2.1.1)\n",
            "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.51.0->optimum-executorch==0.0.0.dev0) (3.4.1)\n",
            "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.51.0->optimum-executorch==0.0.0.dev0) (3.10)\n",
            "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2.3.0)\n",
            "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.11/dist-packages (from requests->transformers==4.51.0->optimum-executorch==0.0.0.dev0) (2025.1.31)\n",
            "Requirement already satisfied: ruamel.yaml.clib>=0.2.7 in /usr/local/lib/python3.11/dist-packages (from ruamel.yaml->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (0.2.12)\n",
            "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.11/dist-packages (from python-dateutil>=2.8.2->pandas>=2.2.2->executorch!=0.5.0,>=0.4.0->optimum-executorch==0.0.0.dev0) (1.17.0)\n",
            "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch>=1.11->optimum~=1.24->optimum-executorch==0.0.0.dev0) (3.0.2)\n",
            "Building wheels for collected packages: optimum-executorch\n",
            "  Building wheel for optimum-executorch (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
            "  Created wheel for optimum-executorch: filename=optimum_executorch-0.0.0.dev0-py3-none-any.whl size=44746 sha256=ebc1067584b477af642c69687bd2851967b6936ba696c8b7b55a47f0abb44850\n",
            "  Stored in directory: /root/.cache/pip/wheels/8f/7c/a6/ff41f7e873d3e74183b74cf6c37176e23ba574ae9e795ff660\n",
            "Successfully built optimum-executorch\n",
            "Installing collected packages: optimum-executorch\n",
            "  Attempting uninstall: optimum-executorch\n",
            "    Found existing installation: optimum-executorch 0.0.0.dev0\n",
            "    Uninstalling optimum-executorch-0.0.0.dev0:\n",
            "      Successfully uninstalled optimum-executorch-0.0.0.dev0\n",
            "Successfully installed optimum-executorch-0.0.0.dev0\n",
            "Package                            Version\n",
            "---------------------------------- -------------------\n",
            "absl-py                            1.4.0\n",
            "accelerate                         1.5.2\n",
            "aiohappyeyeballs                   2.6.1\n",
            "aiohttp                            3.11.15\n",
            "aiosignal                          1.3.2\n",
            "alabaster                          1.0.0\n",
            "albucore                           0.0.23\n",
            "albumentations                     2.0.5\n",
            "ale-py                             0.10.2\n",
            "altair                             5.5.0\n",
            "annotated-types                    0.7.0\n",
            "anyio                              4.9.0\n",
            "argon2-cffi                        23.1.0\n",
            "argon2-cffi-bindings               21.2.0\n",
            "array_record                       0.7.1\n",
            "arviz                              0.21.0\n",
            "astropy                            7.0.1\n",
            "astropy-iers-data                  0.2025.3.31.0.36.18\n",
            "astunparse                         1.6.3\n",
            "atpublic                           5.1\n",
            "attrs                              25.3.0\n",
            "audioread                          3.0.1\n",
            "autograd                           1.7.0\n",
            "babel                              2.17.0\n",
            "backcall                           0.2.0\n",
            "beautifulsoup4                     4.13.3\n",
            "betterproto                        2.0.0b6\n",
            "bigframes                          1.42.0\n",
            "bigquery-magics                    0.9.0\n",
            "bleach                             6.2.0\n",
            "blinker                            1.9.0\n",
            "blis                               1.3.0\n",
            "blosc2                             3.2.1\n",
            "bokeh                              3.6.3\n",
            "Bottleneck                         1.4.2\n",
            "bqplot                             0.12.44\n",
            "branca                             0.8.1\n",
            "CacheControl                       0.14.2\n",
            "cachetools                         5.5.2\n",
            "catalogue                          2.0.10\n",
            "certifi                            2025.1.31\n",
            "cffi                               1.17.1\n",
            "chardet                            5.2.0\n",
            "charset-normalizer                 3.4.1\n",
            "chex                               0.1.89\n",
            "clarabel                           0.10.0\n",
            "click                              8.1.8\n",
            "cloudpathlib                       0.21.0\n",
            "cloudpickle                        3.1.1\n",
            "cmake                              3.31.6\n",
            "cmdstanpy                          1.2.5\n",
            "colorcet                           3.1.0\n",
            "colorlover                         0.3.0\n",
            "colour                             0.1.5\n",
            "community                          1.0.0b1\n",
            "confection                         0.1.5\n",
            "cons                               0.4.6\n",
            "contourpy                          1.3.1\n",
            "cramjam                            2.9.1\n",
            "cryptography                       43.0.3\n",
            "cuda-python                        12.6.2.post1\n",
            "cudf-cu12                          25.2.1\n",
            "cudf-polars-cu12                   25.2.2\n",
            "cufflinks                          0.17.3\n",
            "cuml-cu12                          25.2.1\n",
            "cupy-cuda12x                       13.3.0\n",
            "cuvs-cu12                          25.2.1\n",
            "cvxopt                             1.3.2\n",
            "cvxpy                              1.6.4\n",
            "cycler                             0.12.1\n",
            "cyipopt                            1.5.0\n",
            "cymem                              2.0.11\n",
            "Cython                             3.0.12\n",
            "dask                               2024.12.1\n",
            "dask-cuda                          25.2.0\n",
            "dask-cudf-cu12                     25.2.2\n",
            "dask-expr                          1.1.21\n",
            "datascience                        0.17.6\n",
            "datasets                           3.5.0\n",
            "db-dtypes                          1.4.2\n",
            "dbus-python                        1.2.18\n",
            "debugpy                            1.8.0\n",
            "decorator                          4.4.2\n",
            "defusedxml                         0.7.1\n",
            "Deprecated                         1.2.18\n",
            "diffusers                          0.32.2\n",
            "dill                               0.3.8\n",
            "distributed                        2024.12.1\n",
            "distributed-ucxx-cu12              0.42.0\n",
            "distro                             1.9.0\n",
            "dlib                               19.24.6\n",
            "dm-tree                            0.1.9\n",
            "docker-pycreds                     0.4.0\n",
            "docstring_parser                   0.16\n",
            "docutils                           0.21.2\n",
            "dopamine_rl                        4.1.2\n",
            "duckdb                             1.2.1\n",
            "earthengine-api                    1.5.9\n",
            "easydict                           1.13\n",
            "editdistance                       0.8.1\n",
            "eerepr                             0.1.1\n",
            "einops                             0.8.1\n",
            "en_core_web_sm                     3.8.0\n",
            "entrypoints                        0.4\n",
            "et_xmlfile                         2.0.0\n",
            "etils                              1.12.2\n",
            "etuples                            0.3.9\n",
            "execnet                            2.1.1\n",
            "executorch                         0.6.0+cpu\n",
            "expecttest                         0.3.0\n",
            "Farama-Notifications               0.0.4\n",
            "fastai                             2.7.19\n",
            "fastcore                           1.7.29\n",
            "fastdownload                       0.0.7\n",
            "fastjsonschema                     2.21.1\n",
            "fastprogress                       1.0.3\n",
            "fastrlock                          0.8.3\n",
            "filelock                           3.18.0\n",
            "firebase-admin                     6.7.0\n",
            "Flask                              3.1.0\n",
            "flatbuffers                        25.2.10\n",
            "flax                               0.10.5\n",
            "folium                             0.19.5\n",
            "fonttools                          4.57.0\n",
            "frozendict                         2.4.6\n",
            "frozenlist                         1.5.0\n",
            "fsspec                             2024.12.0\n",
            "future                             1.0.0\n",
            "gast                               0.6.0\n",
            "gcsfs                              2025.3.2\n",
            "GDAL                               3.6.4\n",
            "gdown                              5.2.0\n",
            "geemap                             0.35.3\n",
            "geocoder                           1.38.1\n",
            "geographiclib                      2.0\n",
            "geopandas                          1.0.1\n",
            "geopy                              2.4.1\n",
            "gin-config                         0.5.0\n",
            "gitdb                              4.0.12\n",
            "GitPython                          3.1.44\n",
            "glob2                              0.7\n",
            "google                             2.0.3\n",
            "google-ai-generativelanguage       0.6.15\n",
            "google-api-core                    2.24.2\n",
            "google-api-python-client           2.164.0\n",
            "google-auth                        2.38.0\n",
            "google-auth-httplib2               0.2.0\n",
            "google-auth-oauthlib               1.2.1\n",
            "google-cloud-aiplatform            1.87.0\n",
            "google-cloud-bigquery              3.31.0\n",
            "google-cloud-bigquery-connection   1.18.2\n",
            "google-cloud-bigquery-storage      2.30.0\n",
            "google-cloud-bigtable              2.30.0\n",
            "google-cloud-core                  2.4.3\n",
            "google-cloud-dataproc              5.18.1\n",
            "google-cloud-datastore             2.20.2\n",
            "google-cloud-firestore             2.20.1\n",
            "google-cloud-functions             1.20.2\n",
            "google-cloud-iam                   2.18.3\n",
            "google-cloud-language              2.17.1\n",
            "google-cloud-pubsub                2.29.0\n",
            "google-cloud-resource-manager      1.14.2\n",
            "google-cloud-spanner               3.53.0\n",
            "google-cloud-storage               2.19.0\n",
            "google-cloud-translate             3.20.2\n",
            "google-colab                       1.0.0\n",
            "google-crc32c                      1.7.1\n",
            "google-genai                       1.9.0\n",
            "google-generativeai                0.8.4\n",
            "google-pasta                       0.2.0\n",
            "google-resumable-media             2.7.2\n",
            "google-spark-connect               0.5.2\n",
            "googleapis-common-protos           1.69.2\n",
            "googledrivedownloader              1.1.0\n",
            "graphviz                           0.20.3\n",
            "greenlet                           3.1.1\n",
            "grpc-google-iam-v1                 0.14.2\n",
            "grpc-interceptor                   0.15.4\n",
            "grpcio                             1.71.0\n",
            "grpcio-status                      1.71.0\n",
            "grpclib                            0.4.7\n",
            "gspread                            6.2.0\n",
            "gspread-dataframe                  4.0.0\n",
            "gym                                0.25.2\n",
            "gym-notices                        0.0.8\n",
            "gymnasium                          1.1.1\n",
            "h11                                0.14.0\n",
            "h2                                 4.2.0\n",
            "h5netcdf                           1.6.1\n",
            "h5py                               3.13.0\n",
            "hdbscan                            0.8.40\n",
            "highspy                            1.9.0\n",
            "holidays                           0.69\n",
            "holoviews                          1.20.2\n",
            "hpack                              4.1.0\n",
            "html5lib                           1.1\n",
            "httpcore                           1.0.7\n",
            "httpimport                         1.4.1\n",
            "httplib2                           0.22.0\n",
            "httpx                              0.28.1\n",
            "huggingface-hub                    0.30.1\n",
            "humanize                           4.12.2\n",
            "hyperframe                         6.1.0\n",
            "hyperopt                           0.2.7\n",
            "hypothesis                         6.131.0\n",
            "ibis-framework                     9.5.0\n",
            "idna                               3.10\n",
            "imageio                            2.37.0\n",
            "imageio-ffmpeg                     0.6.0\n",
            "imagesize                          1.4.1\n",
            "imbalanced-learn                   0.13.0\n",
            "immutabledict                      4.2.1\n",
            "importlib_metadata                 8.6.1\n",
            "importlib_resources                6.5.2\n",
            "imutils                            0.5.4\n",
            "inflect                            7.5.0\n",
            "iniconfig                          2.1.0\n",
            "intel-cmplr-lib-ur                 2025.1.0\n",
            "intel-openmp                       2025.1.0\n",
            "ipyevents                          2.0.2\n",
            "ipyfilechooser                     0.6.0\n",
            "ipykernel                          6.17.1\n",
            "ipyleaflet                         0.19.2\n",
            "ipyparallel                        8.8.0\n",
            "ipython                            7.34.0\n",
            "ipython-genutils                   0.2.0\n",
            "ipython-sql                        0.5.0\n",
            "ipytree                            0.2.2\n",
            "ipywidgets                         7.7.1\n",
            "itsdangerous                       2.2.0\n",
            "jax                                0.5.2\n",
            "jax-cuda12-pjrt                    0.5.1\n",
            "jax-cuda12-plugin                  0.5.1\n",
            "jaxlib                             0.5.1\n",
            "jeepney                            0.7.1\n",
            "jellyfish                          1.1.0\n",
            "jieba                              0.42.1\n",
            "Jinja2                             3.1.6\n",
            "jiter                              0.9.0\n",
            "joblib                             1.4.2\n",
            "jsonpatch                          1.33\n",
            "jsonpickle                         4.0.5\n",
            "jsonpointer                        3.0.0\n",
            "jsonschema                         4.23.0\n",
            "jsonschema-specifications          2024.10.1\n",
            "jupyter-client                     6.1.12\n",
            "jupyter-console                    6.1.0\n",
            "jupyter_core                       5.7.2\n",
            "jupyter-leaflet                    0.19.2\n",
            "jupyter-server                     1.16.0\n",
            "jupyterlab_pygments                0.3.0\n",
            "jupyterlab_widgets                 3.0.13\n",
            "kaggle                             1.7.4.2\n",
            "kagglehub                          0.3.11\n",
            "keras                              3.8.0\n",
            "keras-hub                          0.18.1\n",
            "keras-nlp                          0.18.1\n",
            "keyring                            23.5.0\n",
            "kiwisolver                         1.4.8\n",
            "langchain                          0.3.23\n",
            "langchain-core                     0.3.51\n",
            "langchain-text-splitters           0.3.8\n",
            "langcodes                          3.5.0\n",
            "langsmith                          0.3.24\n",
            "language_data                      1.3.0\n",
            "launchpadlib                       1.10.16\n",
            "lazr.restfulclient                 0.14.4\n",
            "lazr.uri                           1.0.6\n",
            "lazy_loader                        0.4\n",
            "libclang                           18.1.1\n",
            "libcudf-cu12                       25.2.1\n",
            "libcugraph-cu12                    25.2.0\n",
            "libcuml-cu12                       25.2.1\n",
            "libcuvs-cu12                       25.2.1\n",
            "libkvikio-cu12                     25.2.1\n",
            "libraft-cu12                       25.2.0\n",
            "librosa                            0.11.0\n",
            "libucx-cu12                        1.18.0\n",
            "libucxx-cu12                       0.42.0\n",
            "lightgbm                           4.5.0\n",
            "linkify-it-py                      2.0.3\n",
            "llvmlite                           0.43.0\n",
            "locket                             1.0.0\n",
            "logical-unification                0.4.6\n",
            "lxml                               5.3.1\n",
            "Mako                               1.1.3\n",
            "marisa-trie                        1.2.1\n",
            "Markdown                           3.7\n",
            "markdown-it-py                     3.0.0\n",
            "MarkupSafe                         3.0.2\n",
            "matplotlib                         3.10.0\n",
            "matplotlib-inline                  0.1.7\n",
            "matplotlib-venn                    1.1.2\n",
            "mdit-py-plugins                    0.4.2\n",
            "mdurl                              0.1.2\n",
            "miniKanren                         1.0.3\n",
            "missingno                          0.5.2\n",
            "mistune                            3.1.3\n",
            "mizani                             0.13.2\n",
            "mkl                                2025.0.1\n",
            "ml-dtypes                          0.4.1\n",
            "mlxtend                            0.23.4\n",
            "more-itertools                     10.6.0\n",
            "moviepy                            1.0.3\n",
            "mpmath                             1.3.0\n",
            "msgpack                            1.1.0\n",
            "multidict                          6.3.2\n",
            "multipledispatch                   1.0.0\n",
            "multiprocess                       0.70.16\n",
            "multitasking                       0.0.11\n",
            "murmurhash                         1.0.12\n",
            "music21                            9.3.0\n",
            "namex                              0.0.8\n",
            "narwhals                           1.33.0\n",
            "natsort                            8.4.0\n",
            "nbclassic                          1.2.0\n",
            "nbclient                           0.10.2\n",
            "nbconvert                          7.16.6\n",
            "nbformat                           5.10.4\n",
            "ndindex                            1.9.2\n",
            "nest-asyncio                       1.6.0\n",
            "networkx                           3.4.2\n",
            "nibabel                            5.3.2\n",
            "nltk                               3.9.1\n",
            "notebook                           6.5.7\n",
            "notebook_shim                      0.2.4\n",
            "numba                              0.60.0\n",
            "numba-cuda                         0.2.0\n",
            "numexpr                            2.10.2\n",
            "numpy                              2.2.4\n",
            "nvidia-cublas-cu12                 12.4.5.8\n",
            "nvidia-cuda-cupti-cu12             12.4.127\n",
            "nvidia-cuda-nvcc-cu12              12.5.82\n",
            "nvidia-cuda-nvrtc-cu12             12.4.127\n",
            "nvidia-cuda-runtime-cu12           12.4.127\n",
            "nvidia-cudnn-cu12                  9.1.0.70\n",
            "nvidia-cufft-cu12                  11.2.1.3\n",
            "nvidia-curand-cu12                 10.3.5.147\n",
            "nvidia-cusolver-cu12               11.6.1.9\n",
            "nvidia-cusparse-cu12               12.3.1.170\n",
            "nvidia-cusparselt-cu12             0.6.2\n",
            "nvidia-ml-py                       12.570.86\n",
            "nvidia-nccl-cu12                   2.21.5\n",
            "nvidia-nvcomp-cu12                 4.2.0.11\n",
            "nvidia-nvjitlink-cu12              12.4.127\n",
            "nvidia-nvtx-cu12                   12.4.127\n",
            "nvtx                               0.2.11\n",
            "nx-cugraph-cu12                    25.2.0\n",
            "oauth2client                       4.1.3\n",
            "oauthlib                           3.2.2\n",
            "openai                             1.70.0\n",
            "opencv-contrib-python              4.11.0.86\n",
            "opencv-python                      4.11.0.86\n",
            "opencv-python-headless             4.11.0.86\n",
            "openpyxl                           3.1.5\n",
            "opentelemetry-api                  1.31.1\n",
            "opentelemetry-sdk                  1.31.1\n",
            "opentelemetry-semantic-conventions 0.52b1\n",
            "opt_einsum                         3.4.0\n",
            "optax                              0.2.4\n",
            "optimum                            1.24.0\n",
            "optimum-executorch                 0.0.0.dev0\n",
            "optree                             0.14.1\n",
            "orbax-checkpoint                   0.11.10\n",
            "orjson                             3.10.16\n",
            "osqp                               1.0.3\n",
            "packaging                          24.2\n",
            "pandas                             2.2.2\n",
            "pandas-datareader                  0.10.0\n",
            "pandas-gbq                         0.28.0\n",
            "pandas-stubs                       2.2.2.240909\n",
            "pandocfilters                      1.5.1\n",
            "panel                              1.6.2\n",
            "param                              2.2.0\n",
            "parameterized                      0.9.0\n",
            "parso                              0.8.4\n",
            "parsy                              2.1\n",
            "partd                              1.4.2\n",
            "pathlib                            1.0.1\n",
            "patsy                              1.0.1\n",
            "peewee                             3.17.9\n",
            "peft                               0.14.0\n",
            "pexpect                            4.9.0\n",
            "pickleshare                        0.7.5\n",
            "pillow                             11.1.0\n",
            "pip                                24.1.2\n",
            "platformdirs                       4.3.7\n",
            "plotly                             5.24.1\n",
            "plotnine                           0.14.5\n",
            "pluggy                             1.5.0\n",
            "ply                                3.11\n",
            "polars                             1.21.0\n",
            "pooch                              1.8.2\n",
            "portpicker                         1.5.2\n",
            "preshed                            3.0.9\n",
            "prettytable                        3.16.0\n",
            "proglog                            0.1.11\n",
            "progressbar2                       4.5.0\n",
            "prometheus_client                  0.21.1\n",
            "promise                            2.3\n",
            "prompt_toolkit                     3.0.50\n",
            "propcache                          0.3.1\n",
            "prophet                            1.1.6\n",
            "proto-plus                         1.26.1\n",
            "protobuf                           5.29.4\n",
            "psutil                             5.9.5\n",
            "psycopg2                           2.9.10\n",
            "ptyprocess                         0.7.0\n",
            "py-cpuinfo                         9.0.0\n",
            "py4j                               0.10.9.7\n",
            "pyarrow                            18.1.0\n",
            "pyasn1                             0.6.1\n",
            "pyasn1_modules                     0.4.2\n",
            "pycairo                            1.27.0\n",
            "pycocotools                        2.0.8\n",
            "pycparser                          2.22\n",
            "pydantic                           2.11.2\n",
            "pydantic_core                      2.33.1\n",
            "pydata-google-auth                 1.9.1\n",
            "pydot                              3.0.4\n",
            "pydotplus                          2.0.2\n",
            "PyDrive                            1.3.1\n",
            "PyDrive2                           1.21.3\n",
            "pyerfa                             2.0.1.5\n",
            "pygame                             2.6.1\n",
            "pygit2                             1.17.0\n",
            "Pygments                           2.18.0\n",
            "PyGObject                          3.42.0\n",
            "PyJWT                              2.10.1\n",
            "pylibcudf-cu12                     25.2.1\n",
            "pylibcugraph-cu12                  25.2.0\n",
            "pylibraft-cu12                     25.2.0\n",
            "pymc                               5.21.2\n",
            "pymystem3                          0.2.0\n",
            "pynndescent                        0.5.13\n",
            "pynvjitlink-cu12                   0.5.2\n",
            "pynvml                             12.0.0\n",
            "pyogrio                            0.10.0\n",
            "Pyomo                              6.8.2\n",
            "PyOpenGL                           3.1.9\n",
            "pyOpenSSL                          24.2.1\n",
            "pyparsing                          3.2.3\n",
            "pyperclip                          1.9.0\n",
            "pyproj                             3.7.1\n",
            "pyshp                              2.3.1\n",
            "PySocks                            1.7.1\n",
            "pyspark                            3.5.5\n",
            "pytensor                           2.30.2\n",
            "pytest                             8.3.5\n",
            "pytest-rerunfailures               15.0\n",
            "pytest-xdist                       3.6.1\n",
            "python-apt                         0.0.0\n",
            "python-box                         7.3.2\n",
            "python-dateutil                    2.8.2\n",
            "python-louvain                     0.16\n",
            "python-slugify                     8.0.4\n",
            "python-snappy                      0.7.3\n",
            "python-utils                       3.9.1\n",
            "pytz                               2025.2\n",
            "pyviz_comms                        3.0.4\n",
            "PyYAML                             6.0.2\n",
            "pyzmq                              24.0.1\n",
            "raft-dask-cu12                     25.2.0\n",
            "rapids-dask-dependency             25.2.0\n",
            "ratelim                            0.1.6\n",
            "referencing                        0.36.2\n",
            "regex                              2024.11.6\n",
            "requests                           2.32.3\n",
            "requests-oauthlib                  2.0.0\n",
            "requests-toolbelt                  1.0.0\n",
            "requirements-parser                0.9.0\n",
            "rich                               13.9.4\n",
            "rmm-cu12                           25.2.0\n",
            "roman-numerals-py                  3.1.0\n",
            "rpds-py                            0.24.0\n",
            "rpy2                               3.5.17\n",
            "rsa                                4.9\n",
            "ruamel.yaml                        0.18.10\n",
            "ruamel.yaml.clib                   0.2.12\n",
            "safetensors                        0.5.3\n",
            "scikit-image                       0.25.2\n",
            "scikit-learn                       1.6.1\n",
            "scipy                              1.13.1\n",
            "scooby                             0.10.0\n",
            "scs                                3.2.7.post2\n",
            "seaborn                            0.13.2\n",
            "SecretStorage                      3.3.1\n",
            "Send2Trash                         1.8.3\n",
            "sentence-transformers              3.4.1\n",
            "sentencepiece                      0.2.0\n",
            "sentry-sdk                         2.25.1\n",
            "setproctitle                       1.3.5\n",
            "setuptools                         75.2.0\n",
            "shap                               0.47.1\n",
            "shapely                            2.1.0\n",
            "shellingham                        1.5.4\n",
            "simple-parsing                     0.1.7\n",
            "simplejson                         3.20.1\n",
            "simsimd                            6.2.1\n",
            "six                                1.17.0\n",
            "sklearn-compat                     0.1.3\n",
            "sklearn-pandas                     2.2.0\n",
            "slicer                             0.0.8\n",
            "smart-open                         7.1.0\n",
            "smmap                              5.0.2\n",
            "sniffio                            1.3.1\n",
            "snowballstemmer                    2.2.0\n",
            "sortedcontainers                   2.4.0\n",
            "soundfile                          0.13.1\n",
            "soupsieve                          2.6\n",
            "soxr                               0.5.0.post1\n",
            "spacy                              3.8.5\n",
            "spacy-legacy                       3.0.12\n",
            "spacy-loggers                      1.0.5\n",
            "spanner-graph-notebook             1.1.6\n",
            "Sphinx                             8.2.3\n",
            "sphinxcontrib-applehelp            2.0.0\n",
            "sphinxcontrib-devhelp              2.0.0\n",
            "sphinxcontrib-htmlhelp             2.1.0\n",
            "sphinxcontrib-jsmath               1.0.1\n",
            "sphinxcontrib-qthelp               2.0.0\n",
            "sphinxcontrib-serializinghtml      2.0.0\n",
            "SQLAlchemy                         2.0.40\n",
            "sqlglot                            25.20.2\n",
            "sqlparse                           0.5.3\n",
            "srsly                              2.5.1\n",
            "stanio                             0.5.1\n",
            "statsmodels                        0.14.4\n",
            "stringzilla                        3.12.3\n",
            "sympy                              1.13.3\n",
            "tables                             3.10.2\n",
            "tabulate                           0.9.0\n",
            "tbb                                2022.1.0\n",
            "tblib                              3.1.0\n",
            "tcmlib                             1.3.0\n",
            "tenacity                           9.1.2\n",
            "tensorboard                        2.18.0\n",
            "tensorboard-data-server            0.7.2\n",
            "tensorflow                         2.18.0\n",
            "tensorflow-datasets                4.9.8\n",
            "tensorflow_decision_forests        1.11.0\n",
            "tensorflow-hub                     0.16.1\n",
            "tensorflow-io-gcs-filesystem       0.37.1\n",
            "tensorflow-metadata                1.17.0\n",
            "tensorflow-probability             0.25.0\n",
            "tensorflow-text                    2.18.1\n",
            "tensorstore                        0.1.73\n",
            "termcolor                          3.0.1\n",
            "terminado                          0.18.1\n",
            "text-unidecode                     1.3\n",
            "textblob                           0.19.0\n",
            "tf_keras                           2.18.0\n",
            "tf-slim                            1.1.0\n",
            "thinc                              8.3.6\n",
            "threadpoolctl                      3.6.0\n",
            "tifffile                           2025.3.30\n",
            "timm                               1.0.15\n",
            "tinycss2                           1.4.0\n",
            "tokenizers                         0.21.1\n",
            "toml                               0.10.2\n",
            "toolz                              0.12.1\n",
            "torch                              2.7.0+cpu\n",
            "torchao                            0.10.0+cpu\n",
            "torchaudio                         2.5.0\n",
            "torchsummary                       1.5.1\n",
            "torchvision                        0.22.0+cpu\n",
            "tornado                            6.4.2\n",
            "tqdm                               4.67.1\n",
            "traitlets                          5.7.1\n",
            "traittypes                         0.2.1\n",
            "transformers                       4.51.0\n",
            "treelite                           4.4.1\n",
            "treescope                          0.1.9\n",
            "triton                             3.2.0\n",
            "tweepy                             4.15.0\n",
            "typeguard                          4.4.2\n",
            "typer                              0.15.2\n",
            "types-pytz                         2025.2.0.20250326\n",
            "types-setuptools                   78.1.0.20250329\n",
            "typing_extensions                  4.13.1\n",
            "typing-inspection                  0.4.0\n",
            "tzdata                             2025.2\n",
            "tzlocal                            5.3.1\n",
            "uc-micro-py                        1.0.3\n",
            "ucx-py-cu12                        0.42.0\n",
            "ucxx-cu12                          0.42.0\n",
            "umap-learn                         0.5.7\n",
            "umf                                0.10.0\n",
            "uritemplate                        4.1.1\n",
            "urllib3                            2.3.0\n",
            "vega-datasets                      0.9.0\n",
            "wadllib                            1.3.6\n",
            "wandb                              0.19.9\n",
            "wasabi                             1.1.3\n",
            "wcwidth                            0.2.13\n",
            "weasel                             0.4.1\n",
            "webcolors                          24.11.1\n",
            "webencodings                       0.5.1\n",
            "websocket-client                   1.8.0\n",
            "websockets                         15.0.1\n",
            "Werkzeug                           3.1.3\n",
            "wheel                              0.45.1\n",
            "widgetsnbextension                 3.6.10\n",
            "wordcloud                          1.9.4\n",
            "wrapt                              1.17.2\n",
            "wurlitzer                          3.1.1\n",
            "xarray                             2025.1.2\n",
            "xarray-einstats                    0.8.0\n",
            "xgboost                            2.1.4\n",
            "xlrd                               2.0.1\n",
            "xxhash                             3.5.0\n",
            "xyzservices                        2025.1.0\n",
            "yarl                               1.18.3\n",
            "ydf                                0.11.0\n",
            "yellowbrick                        1.5\n",
            "yfinance                           0.2.55\n",
            "zict                               3.0.0\n",
            "zipp                               3.21.0\n",
            "zstandard                          0.23.0\n"
          ]
        }
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "## Step 2: Export to ExecuTorch"
      ],
      "metadata": {
        "id": "fC9CGHJraXYo"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "! cd /content/optimum-executorch; optimum-cli export executorch \\\n",
        "  --model \"HuggingFaceTB/SmolLM2-135M\" \\\n",
        "  --task \"text-generation\" \\\n",
        "  --recipe \"xnnpack\" \\\n",
        "  --output_dir=\"./smollmv2_135m_custom_sdpa\" \\\n",
        "  --use_custom_sdpa\n",
        "\n",
        "! cd /content/optimum-executorch; ls -all ./smollmv2_135m_custom_sdpa"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "gCVEovBPbk1p",
        "outputId": "c0c5416c-8dfa-4763-d407-4ab9c9f6dd70"
      },
      "execution_count": 3,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "2025-04-11 21:20:23.780684: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
            "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
            "E0000 00:00:1744406423.808206    7311 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
            "E0000 00:00:1744406423.816142    7311 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
            "2025-04-11 21:20:23.843321: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
            "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
            "config.json: 100% 704/704 [00:00<00:00, 3.09MB/s]\n",
            "model.safetensors: 100% 269M/269M [00:01<00:00, 173MB/s]\n",
            "/usr/local/lib/python3.11/dist-packages/executorch/exir/emit/_emitter.py:1592: UserWarning: Mutation on a buffer in the model is detected. ExecuTorch assumes buffers that are mutated in the graph have a meaningless initial state, only the shape and dtype will be serialized, unless a pass which sets meta[\"et_init_buffer\"] to True such as InitializedMutableBufferPass is run.\n",
            "  warnings.warn(\n",
            "total 640584\n",
            "drwxr-xr-x  2 root root      4096 Apr 11 21:24 .\n",
            "drwxr-xr-x 10 root root      4096 Apr 11 21:20 ..\n",
            "-rw-r--r--  1 root root 655943040 Apr 11 21:24 model.pte\n"
          ]
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "from optimum.executorch import ExecuTorchModelForCausalLM\n",
        "from transformers import AutoTokenizer\n",
        "\n",
        "# Load the exported model\n",
        "model = ExecuTorchModelForCausalLM.from_pretrained(\"/content/optimum-executorch/smollmv2_135m_custom_sdpa\")\n",
        "\n",
        "# Initialize tokenizer and generate text\n",
        "generated_text = model.text_generation(\n",
        "    tokenizer=AutoTokenizer.from_pretrained(\"HuggingFaceTB/SmolLM2-135M\"),\n",
        "    prompt=\"Simply put, the theory of relativity states that\",\n",
        "    max_seq_len=32\n",
        ")\n",
        "print(generated_text)"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "jCJvCG5RviKF",
        "outputId": "d2321adc-5e6e-4d74-8764-26bec82ae84a"
      },
      "execution_count": 6,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "[program.cpp:135] InternalConsistency verification requested but not available\n"
          ]
        },
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "PyTorchObserver {\"prompt_tokens\": 9, \"generated_tokens\": 23, \"model_load_start_ms\": 0, \"model_load_end_ms\": 0, \"inference_start_ms\": 1744406841892, \"token_encode_end_ms\": 1744406841892, \"model_execution_start_ms\": 1744406850941, \"model_execution_end_ms\": 1744406851168, \"inference_end_ms\": 1744406851169, \"prompt_eval_end_ms\": 1744406845805, \"first_token_ms\": 1744406846041, \"aggregate_sampling_time_ms\": 9271, \"SCALING_FACTOR_UNITS_PER_SECOND\": 1000}\n",
            "\tPrompt Tokens: 9 Generated Tokens: 23\n",
            "\tModel Load Time:\t\t0.000000 (seconds)\n",
            "\tTotal inference time:\t\t9.277000 (seconds)\t\t Rate: \t2.479250 (tokens/second)\n",
            "\t\tPrompt evaluation:\t3.913000 (seconds)\t\t Rate: \t2.300026 (tokens/second)\n",
            "\t\tGenerated 23 tokens:\t5.364000 (seconds)\t\t Rate: \t4.287845 (tokens/second)\n",
            "\tTime to first generated token:\t4.149000 (seconds)\n",
            "\tSampling time over 32 tokens:\t9.271000 (seconds)\n",
            "Simply put, the theory of relativity states that the speed of light is constant, regardless of the speed of the observer. This is a very important fact, because\n"
          ]
        }
      ]
    }
  ]
}