guangy10 commited on
Commit
678763a
·
verified ·
1 Parent(s): 351ac17

Upload Export_Recipe.ipynb

Browse files
Files changed (1) hide show
  1. Export_Recipe.ipynb +907 -0
Export_Recipe.ipynb ADDED
@@ -0,0 +1,907 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": []
7
+ },
8
+ "kernelspec": {
9
+ "name": "python3",
10
+ "display_name": "Python 3"
11
+ },
12
+ "language_info": {
13
+ "name": "python"
14
+ }
15
+ },
16
+ "cells": [
17
+ {
18
+ "cell_type": "markdown",
19
+ "source": [
20
+ "## Step 1: Setting Up Optimum ExecuTorch"
21
+ ],
22
+ "metadata": {
23
+ "id": "JJ2zK7BTZ2no"
24
+ }
25
+ },
26
+ {
27
+ "cell_type": "code",
28
+ "source": [
29
+ "! touch /content/optimum-executorch; rm -rf /content/optimum-executorch\n",
30
+ "! 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"
31
+ ],
32
+ "metadata": {
33
+ "colab": {
34
+ "base_uri": "https://localhost:8080/"
35
+ },
36
+ "id": "jQiHrRPgroP1",
37
+ "outputId": "22f835bb-96b5-4d83-8abe-84ca8f6626d8"
38
+ },
39
+ "execution_count": 2,
40
+ "outputs": [
41
+ {
42
+ "output_type": "stream",
43
+ "name": "stdout",
44
+ "text": [
45
+ "Cloning into 'optimum-executorch'...\n",
46
+ "remote: Enumerating objects: 533, done.\u001b[K\n",
47
+ "remote: Counting objects: 100% (234/234), done.\u001b[K\n",
48
+ "remote: Compressing objects: 100% (114/114), done.\u001b[K\n",
49
+ "remote: Total 533 (delta 168), reused 129 (delta 116), pack-reused 299 (from 2)\u001b[K\n",
50
+ "Receiving objects: 100% (533/533), 173.70 KiB | 5.26 MiB/s, done.\n",
51
+ "Resolving deltas: 100% (275/275), done.\n",
52
+ "Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/test/cpu\n",
53
+ "Requirement already satisfied: executorch==0.6.0 in /usr/local/lib/python3.11/dist-packages (0.6.0+cpu)\n",
54
+ "Collecting torch==2.7.0\n",
55
+ " 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",
56
+ "Requirement already satisfied: torchvision in /usr/local/lib/python3.11/dist-packages (0.20.0)\n",
57
+ "Requirement already satisfied: expecttest in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.3.0)\n",
58
+ "Requirement already satisfied: flatbuffers in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (25.2.10)\n",
59
+ "Requirement already satisfied: hypothesis in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (6.131.0)\n",
60
+ "Requirement already satisfied: mpmath==1.3.0 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (1.3.0)\n",
61
+ "Requirement already satisfied: numpy>=2.0.0 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (2.2.4)\n",
62
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (24.2)\n",
63
+ "Requirement already satisfied: pandas>=2.2.2 in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (2.2.2)\n",
64
+ "Requirement already satisfied: parameterized in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.9.0)\n",
65
+ "Requirement already satisfied: pytest in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (8.3.5)\n",
66
+ "Requirement already satisfied: pytest-xdist in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (3.6.1)\n",
67
+ "Requirement already satisfied: pytest-rerunfailures in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (15.0)\n",
68
+ "Requirement already satisfied: pyyaml in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (6.0.2)\n",
69
+ "Requirement already satisfied: ruamel.yaml in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.18.10)\n",
70
+ "Requirement already satisfied: sympy in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (1.13.1)\n",
71
+ "Requirement already satisfied: tabulate in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (0.9.0)\n",
72
+ "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",
73
+ "Requirement already satisfied: typing-extensions in /usr/local/lib/python3.11/dist-packages (from executorch==0.6.0) (4.13.1)\n",
74
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.18.0)\n",
75
+ "Collecting sympy (from executorch==0.6.0)\n",
76
+ " Downloading https://download.pytorch.org/whl/test/sympy-1.13.3-py3-none-any.whl.metadata (12 kB)\n",
77
+ "Requirement already satisfied: networkx in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.4.2)\n",
78
+ "Requirement already satisfied: jinja2 in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (3.1.6)\n",
79
+ "Requirement already satisfied: fsspec in /usr/local/lib/python3.11/dist-packages (from torch==2.7.0) (2024.12.0)\n",
80
+ "INFO: pip is looking at multiple versions of torchvision to determine which version is compatible with other requirements. This could take a while.\n",
81
+ "Collecting torchvision\n",
82
+ " Downloading https://download.pytorch.org/whl/test/cpu/torchvision-0.22.0%2Bcpu-cp311-cp311-linux_x86_64.whl.metadata (6.1 kB)\n",
83
+ "Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.11/dist-packages (from torchvision) (11.1.0)\n",
84
+ "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",
85
+ "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",
86
+ "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",
87
+ "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",
88
+ "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",
89
+ "Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.11/dist-packages (from jinja2->torch==2.7.0) (3.0.2)\n",
90
+ "Requirement already satisfied: iniconfig in /usr/local/lib/python3.11/dist-packages (from pytest->executorch==0.6.0) (2.1.0)\n",
91
+ "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",
92
+ "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",
93
+ "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",
94
+ "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",
95
+ "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",
96
+ "\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",
97
+ "\u001b[?25hDownloading https://download.pytorch.org/whl/test/cpu/torchvision-0.22.0%2Bcpu-cp311-cp311-linux_x86_64.whl (2.0 MB)\n",
98
+ "\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",
99
+ "\u001b[?25hDownloading https://download.pytorch.org/whl/test/sympy-1.13.3-py3-none-any.whl (6.2 MB)\n",
100
+ "\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",
101
+ "\u001b[?25hInstalling collected packages: sympy, torch, torchvision\n",
102
+ " Attempting uninstall: sympy\n",
103
+ " Found existing installation: sympy 1.13.1\n",
104
+ " Uninstalling sympy-1.13.1:\n",
105
+ " Successfully uninstalled sympy-1.13.1\n",
106
+ " Attempting uninstall: torch\n",
107
+ " Found existing installation: torch 2.5.0+cpu\n",
108
+ " Uninstalling torch-2.5.0+cpu:\n",
109
+ " Successfully uninstalled torch-2.5.0+cpu\n",
110
+ " Attempting uninstall: torchvision\n",
111
+ " Found existing installation: torchvision 0.20.0\n",
112
+ " Uninstalling torchvision-0.20.0:\n",
113
+ " Successfully uninstalled torchvision-0.20.0\n",
114
+ "\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",
115
+ "torchaudio 2.5.0 requires torch==2.5.0, but you have torch 2.7.0+cpu which is incompatible.\n",
116
+ "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",
117
+ "\u001b[0mSuccessfully installed sympy-1.13.3 torch-2.7.0+cpu torchvision-0.22.0+cpu\n",
118
+ "Processing /content/optimum-executorch\n",
119
+ " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
120
+ " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
121
+ " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
122
+ "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",
123
+ "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",
124
+ "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",
125
+ "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",
126
+ "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",
127
+ "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",
128
+ "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",
129
+ "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",
130
+ "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",
131
+ "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",
132
+ "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",
133
+ "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",
134
+ "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",
135
+ "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",
136
+ "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",
137
+ "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",
138
+ "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",
139
+ "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",
140
+ "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",
141
+ "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",
142
+ "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",
143
+ "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",
144
+ "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",
145
+ "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",
146
+ "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",
147
+ "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",
148
+ "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",
149
+ "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",
150
+ "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",
151
+ "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",
152
+ "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",
153
+ "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",
154
+ "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",
155
+ "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",
156
+ "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",
157
+ "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",
158
+ "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",
159
+ "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",
160
+ "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",
161
+ "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",
162
+ "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",
163
+ "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",
164
+ "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",
165
+ "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",
166
+ "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",
167
+ "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",
168
+ "Building wheels for collected packages: optimum-executorch\n",
169
+ " Building wheel for optimum-executorch (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
170
+ " Created wheel for optimum-executorch: filename=optimum_executorch-0.0.0.dev0-py3-none-any.whl size=44746 sha256=ebc1067584b477af642c69687bd2851967b6936ba696c8b7b55a47f0abb44850\n",
171
+ " Stored in directory: /root/.cache/pip/wheels/8f/7c/a6/ff41f7e873d3e74183b74cf6c37176e23ba574ae9e795ff660\n",
172
+ "Successfully built optimum-executorch\n",
173
+ "Installing collected packages: optimum-executorch\n",
174
+ " Attempting uninstall: optimum-executorch\n",
175
+ " Found existing installation: optimum-executorch 0.0.0.dev0\n",
176
+ " Uninstalling optimum-executorch-0.0.0.dev0:\n",
177
+ " Successfully uninstalled optimum-executorch-0.0.0.dev0\n",
178
+ "Successfully installed optimum-executorch-0.0.0.dev0\n",
179
+ "Package Version\n",
180
+ "---------------------------------- -------------------\n",
181
+ "absl-py 1.4.0\n",
182
+ "accelerate 1.5.2\n",
183
+ "aiohappyeyeballs 2.6.1\n",
184
+ "aiohttp 3.11.15\n",
185
+ "aiosignal 1.3.2\n",
186
+ "alabaster 1.0.0\n",
187
+ "albucore 0.0.23\n",
188
+ "albumentations 2.0.5\n",
189
+ "ale-py 0.10.2\n",
190
+ "altair 5.5.0\n",
191
+ "annotated-types 0.7.0\n",
192
+ "anyio 4.9.0\n",
193
+ "argon2-cffi 23.1.0\n",
194
+ "argon2-cffi-bindings 21.2.0\n",
195
+ "array_record 0.7.1\n",
196
+ "arviz 0.21.0\n",
197
+ "astropy 7.0.1\n",
198
+ "astropy-iers-data 0.2025.3.31.0.36.18\n",
199
+ "astunparse 1.6.3\n",
200
+ "atpublic 5.1\n",
201
+ "attrs 25.3.0\n",
202
+ "audioread 3.0.1\n",
203
+ "autograd 1.7.0\n",
204
+ "babel 2.17.0\n",
205
+ "backcall 0.2.0\n",
206
+ "beautifulsoup4 4.13.3\n",
207
+ "betterproto 2.0.0b6\n",
208
+ "bigframes 1.42.0\n",
209
+ "bigquery-magics 0.9.0\n",
210
+ "bleach 6.2.0\n",
211
+ "blinker 1.9.0\n",
212
+ "blis 1.3.0\n",
213
+ "blosc2 3.2.1\n",
214
+ "bokeh 3.6.3\n",
215
+ "Bottleneck 1.4.2\n",
216
+ "bqplot 0.12.44\n",
217
+ "branca 0.8.1\n",
218
+ "CacheControl 0.14.2\n",
219
+ "cachetools 5.5.2\n",
220
+ "catalogue 2.0.10\n",
221
+ "certifi 2025.1.31\n",
222
+ "cffi 1.17.1\n",
223
+ "chardet 5.2.0\n",
224
+ "charset-normalizer 3.4.1\n",
225
+ "chex 0.1.89\n",
226
+ "clarabel 0.10.0\n",
227
+ "click 8.1.8\n",
228
+ "cloudpathlib 0.21.0\n",
229
+ "cloudpickle 3.1.1\n",
230
+ "cmake 3.31.6\n",
231
+ "cmdstanpy 1.2.5\n",
232
+ "colorcet 3.1.0\n",
233
+ "colorlover 0.3.0\n",
234
+ "colour 0.1.5\n",
235
+ "community 1.0.0b1\n",
236
+ "confection 0.1.5\n",
237
+ "cons 0.4.6\n",
238
+ "contourpy 1.3.1\n",
239
+ "cramjam 2.9.1\n",
240
+ "cryptography 43.0.3\n",
241
+ "cuda-python 12.6.2.post1\n",
242
+ "cudf-cu12 25.2.1\n",
243
+ "cudf-polars-cu12 25.2.2\n",
244
+ "cufflinks 0.17.3\n",
245
+ "cuml-cu12 25.2.1\n",
246
+ "cupy-cuda12x 13.3.0\n",
247
+ "cuvs-cu12 25.2.1\n",
248
+ "cvxopt 1.3.2\n",
249
+ "cvxpy 1.6.4\n",
250
+ "cycler 0.12.1\n",
251
+ "cyipopt 1.5.0\n",
252
+ "cymem 2.0.11\n",
253
+ "Cython 3.0.12\n",
254
+ "dask 2024.12.1\n",
255
+ "dask-cuda 25.2.0\n",
256
+ "dask-cudf-cu12 25.2.2\n",
257
+ "dask-expr 1.1.21\n",
258
+ "datascience 0.17.6\n",
259
+ "datasets 3.5.0\n",
260
+ "db-dtypes 1.4.2\n",
261
+ "dbus-python 1.2.18\n",
262
+ "debugpy 1.8.0\n",
263
+ "decorator 4.4.2\n",
264
+ "defusedxml 0.7.1\n",
265
+ "Deprecated 1.2.18\n",
266
+ "diffusers 0.32.2\n",
267
+ "dill 0.3.8\n",
268
+ "distributed 2024.12.1\n",
269
+ "distributed-ucxx-cu12 0.42.0\n",
270
+ "distro 1.9.0\n",
271
+ "dlib 19.24.6\n",
272
+ "dm-tree 0.1.9\n",
273
+ "docker-pycreds 0.4.0\n",
274
+ "docstring_parser 0.16\n",
275
+ "docutils 0.21.2\n",
276
+ "dopamine_rl 4.1.2\n",
277
+ "duckdb 1.2.1\n",
278
+ "earthengine-api 1.5.9\n",
279
+ "easydict 1.13\n",
280
+ "editdistance 0.8.1\n",
281
+ "eerepr 0.1.1\n",
282
+ "einops 0.8.1\n",
283
+ "en_core_web_sm 3.8.0\n",
284
+ "entrypoints 0.4\n",
285
+ "et_xmlfile 2.0.0\n",
286
+ "etils 1.12.2\n",
287
+ "etuples 0.3.9\n",
288
+ "execnet 2.1.1\n",
289
+ "executorch 0.6.0+cpu\n",
290
+ "expecttest 0.3.0\n",
291
+ "Farama-Notifications 0.0.4\n",
292
+ "fastai 2.7.19\n",
293
+ "fastcore 1.7.29\n",
294
+ "fastdownload 0.0.7\n",
295
+ "fastjsonschema 2.21.1\n",
296
+ "fastprogress 1.0.3\n",
297
+ "fastrlock 0.8.3\n",
298
+ "filelock 3.18.0\n",
299
+ "firebase-admin 6.7.0\n",
300
+ "Flask 3.1.0\n",
301
+ "flatbuffers 25.2.10\n",
302
+ "flax 0.10.5\n",
303
+ "folium 0.19.5\n",
304
+ "fonttools 4.57.0\n",
305
+ "frozendict 2.4.6\n",
306
+ "frozenlist 1.5.0\n",
307
+ "fsspec 2024.12.0\n",
308
+ "future 1.0.0\n",
309
+ "gast 0.6.0\n",
310
+ "gcsfs 2025.3.2\n",
311
+ "GDAL 3.6.4\n",
312
+ "gdown 5.2.0\n",
313
+ "geemap 0.35.3\n",
314
+ "geocoder 1.38.1\n",
315
+ "geographiclib 2.0\n",
316
+ "geopandas 1.0.1\n",
317
+ "geopy 2.4.1\n",
318
+ "gin-config 0.5.0\n",
319
+ "gitdb 4.0.12\n",
320
+ "GitPython 3.1.44\n",
321
+ "glob2 0.7\n",
322
+ "google 2.0.3\n",
323
+ "google-ai-generativelanguage 0.6.15\n",
324
+ "google-api-core 2.24.2\n",
325
+ "google-api-python-client 2.164.0\n",
326
+ "google-auth 2.38.0\n",
327
+ "google-auth-httplib2 0.2.0\n",
328
+ "google-auth-oauthlib 1.2.1\n",
329
+ "google-cloud-aiplatform 1.87.0\n",
330
+ "google-cloud-bigquery 3.31.0\n",
331
+ "google-cloud-bigquery-connection 1.18.2\n",
332
+ "google-cloud-bigquery-storage 2.30.0\n",
333
+ "google-cloud-bigtable 2.30.0\n",
334
+ "google-cloud-core 2.4.3\n",
335
+ "google-cloud-dataproc 5.18.1\n",
336
+ "google-cloud-datastore 2.20.2\n",
337
+ "google-cloud-firestore 2.20.1\n",
338
+ "google-cloud-functions 1.20.2\n",
339
+ "google-cloud-iam 2.18.3\n",
340
+ "google-cloud-language 2.17.1\n",
341
+ "google-cloud-pubsub 2.29.0\n",
342
+ "google-cloud-resource-manager 1.14.2\n",
343
+ "google-cloud-spanner 3.53.0\n",
344
+ "google-cloud-storage 2.19.0\n",
345
+ "google-cloud-translate 3.20.2\n",
346
+ "google-colab 1.0.0\n",
347
+ "google-crc32c 1.7.1\n",
348
+ "google-genai 1.9.0\n",
349
+ "google-generativeai 0.8.4\n",
350
+ "google-pasta 0.2.0\n",
351
+ "google-resumable-media 2.7.2\n",
352
+ "google-spark-connect 0.5.2\n",
353
+ "googleapis-common-protos 1.69.2\n",
354
+ "googledrivedownloader 1.1.0\n",
355
+ "graphviz 0.20.3\n",
356
+ "greenlet 3.1.1\n",
357
+ "grpc-google-iam-v1 0.14.2\n",
358
+ "grpc-interceptor 0.15.4\n",
359
+ "grpcio 1.71.0\n",
360
+ "grpcio-status 1.71.0\n",
361
+ "grpclib 0.4.7\n",
362
+ "gspread 6.2.0\n",
363
+ "gspread-dataframe 4.0.0\n",
364
+ "gym 0.25.2\n",
365
+ "gym-notices 0.0.8\n",
366
+ "gymnasium 1.1.1\n",
367
+ "h11 0.14.0\n",
368
+ "h2 4.2.0\n",
369
+ "h5netcdf 1.6.1\n",
370
+ "h5py 3.13.0\n",
371
+ "hdbscan 0.8.40\n",
372
+ "highspy 1.9.0\n",
373
+ "holidays 0.69\n",
374
+ "holoviews 1.20.2\n",
375
+ "hpack 4.1.0\n",
376
+ "html5lib 1.1\n",
377
+ "httpcore 1.0.7\n",
378
+ "httpimport 1.4.1\n",
379
+ "httplib2 0.22.0\n",
380
+ "httpx 0.28.1\n",
381
+ "huggingface-hub 0.30.1\n",
382
+ "humanize 4.12.2\n",
383
+ "hyperframe 6.1.0\n",
384
+ "hyperopt 0.2.7\n",
385
+ "hypothesis 6.131.0\n",
386
+ "ibis-framework 9.5.0\n",
387
+ "idna 3.10\n",
388
+ "imageio 2.37.0\n",
389
+ "imageio-ffmpeg 0.6.0\n",
390
+ "imagesize 1.4.1\n",
391
+ "imbalanced-learn 0.13.0\n",
392
+ "immutabledict 4.2.1\n",
393
+ "importlib_metadata 8.6.1\n",
394
+ "importlib_resources 6.5.2\n",
395
+ "imutils 0.5.4\n",
396
+ "inflect 7.5.0\n",
397
+ "iniconfig 2.1.0\n",
398
+ "intel-cmplr-lib-ur 2025.1.0\n",
399
+ "intel-openmp 2025.1.0\n",
400
+ "ipyevents 2.0.2\n",
401
+ "ipyfilechooser 0.6.0\n",
402
+ "ipykernel 6.17.1\n",
403
+ "ipyleaflet 0.19.2\n",
404
+ "ipyparallel 8.8.0\n",
405
+ "ipython 7.34.0\n",
406
+ "ipython-genutils 0.2.0\n",
407
+ "ipython-sql 0.5.0\n",
408
+ "ipytree 0.2.2\n",
409
+ "ipywidgets 7.7.1\n",
410
+ "itsdangerous 2.2.0\n",
411
+ "jax 0.5.2\n",
412
+ "jax-cuda12-pjrt 0.5.1\n",
413
+ "jax-cuda12-plugin 0.5.1\n",
414
+ "jaxlib 0.5.1\n",
415
+ "jeepney 0.7.1\n",
416
+ "jellyfish 1.1.0\n",
417
+ "jieba 0.42.1\n",
418
+ "Jinja2 3.1.6\n",
419
+ "jiter 0.9.0\n",
420
+ "joblib 1.4.2\n",
421
+ "jsonpatch 1.33\n",
422
+ "jsonpickle 4.0.5\n",
423
+ "jsonpointer 3.0.0\n",
424
+ "jsonschema 4.23.0\n",
425
+ "jsonschema-specifications 2024.10.1\n",
426
+ "jupyter-client 6.1.12\n",
427
+ "jupyter-console 6.1.0\n",
428
+ "jupyter_core 5.7.2\n",
429
+ "jupyter-leaflet 0.19.2\n",
430
+ "jupyter-server 1.16.0\n",
431
+ "jupyterlab_pygments 0.3.0\n",
432
+ "jupyterlab_widgets 3.0.13\n",
433
+ "kaggle 1.7.4.2\n",
434
+ "kagglehub 0.3.11\n",
435
+ "keras 3.8.0\n",
436
+ "keras-hub 0.18.1\n",
437
+ "keras-nlp 0.18.1\n",
438
+ "keyring 23.5.0\n",
439
+ "kiwisolver 1.4.8\n",
440
+ "langchain 0.3.23\n",
441
+ "langchain-core 0.3.51\n",
442
+ "langchain-text-splitters 0.3.8\n",
443
+ "langcodes 3.5.0\n",
444
+ "langsmith 0.3.24\n",
445
+ "language_data 1.3.0\n",
446
+ "launchpadlib 1.10.16\n",
447
+ "lazr.restfulclient 0.14.4\n",
448
+ "lazr.uri 1.0.6\n",
449
+ "lazy_loader 0.4\n",
450
+ "libclang 18.1.1\n",
451
+ "libcudf-cu12 25.2.1\n",
452
+ "libcugraph-cu12 25.2.0\n",
453
+ "libcuml-cu12 25.2.1\n",
454
+ "libcuvs-cu12 25.2.1\n",
455
+ "libkvikio-cu12 25.2.1\n",
456
+ "libraft-cu12 25.2.0\n",
457
+ "librosa 0.11.0\n",
458
+ "libucx-cu12 1.18.0\n",
459
+ "libucxx-cu12 0.42.0\n",
460
+ "lightgbm 4.5.0\n",
461
+ "linkify-it-py 2.0.3\n",
462
+ "llvmlite 0.43.0\n",
463
+ "locket 1.0.0\n",
464
+ "logical-unification 0.4.6\n",
465
+ "lxml 5.3.1\n",
466
+ "Mako 1.1.3\n",
467
+ "marisa-trie 1.2.1\n",
468
+ "Markdown 3.7\n",
469
+ "markdown-it-py 3.0.0\n",
470
+ "MarkupSafe 3.0.2\n",
471
+ "matplotlib 3.10.0\n",
472
+ "matplotlib-inline 0.1.7\n",
473
+ "matplotlib-venn 1.1.2\n",
474
+ "mdit-py-plugins 0.4.2\n",
475
+ "mdurl 0.1.2\n",
476
+ "miniKanren 1.0.3\n",
477
+ "missingno 0.5.2\n",
478
+ "mistune 3.1.3\n",
479
+ "mizani 0.13.2\n",
480
+ "mkl 2025.0.1\n",
481
+ "ml-dtypes 0.4.1\n",
482
+ "mlxtend 0.23.4\n",
483
+ "more-itertools 10.6.0\n",
484
+ "moviepy 1.0.3\n",
485
+ "mpmath 1.3.0\n",
486
+ "msgpack 1.1.0\n",
487
+ "multidict 6.3.2\n",
488
+ "multipledispatch 1.0.0\n",
489
+ "multiprocess 0.70.16\n",
490
+ "multitasking 0.0.11\n",
491
+ "murmurhash 1.0.12\n",
492
+ "music21 9.3.0\n",
493
+ "namex 0.0.8\n",
494
+ "narwhals 1.33.0\n",
495
+ "natsort 8.4.0\n",
496
+ "nbclassic 1.2.0\n",
497
+ "nbclient 0.10.2\n",
498
+ "nbconvert 7.16.6\n",
499
+ "nbformat 5.10.4\n",
500
+ "ndindex 1.9.2\n",
501
+ "nest-asyncio 1.6.0\n",
502
+ "networkx 3.4.2\n",
503
+ "nibabel 5.3.2\n",
504
+ "nltk 3.9.1\n",
505
+ "notebook 6.5.7\n",
506
+ "notebook_shim 0.2.4\n",
507
+ "numba 0.60.0\n",
508
+ "numba-cuda 0.2.0\n",
509
+ "numexpr 2.10.2\n",
510
+ "numpy 2.2.4\n",
511
+ "nvidia-cublas-cu12 12.4.5.8\n",
512
+ "nvidia-cuda-cupti-cu12 12.4.127\n",
513
+ "nvidia-cuda-nvcc-cu12 12.5.82\n",
514
+ "nvidia-cuda-nvrtc-cu12 12.4.127\n",
515
+ "nvidia-cuda-runtime-cu12 12.4.127\n",
516
+ "nvidia-cudnn-cu12 9.1.0.70\n",
517
+ "nvidia-cufft-cu12 11.2.1.3\n",
518
+ "nvidia-curand-cu12 10.3.5.147\n",
519
+ "nvidia-cusolver-cu12 11.6.1.9\n",
520
+ "nvidia-cusparse-cu12 12.3.1.170\n",
521
+ "nvidia-cusparselt-cu12 0.6.2\n",
522
+ "nvidia-ml-py 12.570.86\n",
523
+ "nvidia-nccl-cu12 2.21.5\n",
524
+ "nvidia-nvcomp-cu12 4.2.0.11\n",
525
+ "nvidia-nvjitlink-cu12 12.4.127\n",
526
+ "nvidia-nvtx-cu12 12.4.127\n",
527
+ "nvtx 0.2.11\n",
528
+ "nx-cugraph-cu12 25.2.0\n",
529
+ "oauth2client 4.1.3\n",
530
+ "oauthlib 3.2.2\n",
531
+ "openai 1.70.0\n",
532
+ "opencv-contrib-python 4.11.0.86\n",
533
+ "opencv-python 4.11.0.86\n",
534
+ "opencv-python-headless 4.11.0.86\n",
535
+ "openpyxl 3.1.5\n",
536
+ "opentelemetry-api 1.31.1\n",
537
+ "opentelemetry-sdk 1.31.1\n",
538
+ "opentelemetry-semantic-conventions 0.52b1\n",
539
+ "opt_einsum 3.4.0\n",
540
+ "optax 0.2.4\n",
541
+ "optimum 1.24.0\n",
542
+ "optimum-executorch 0.0.0.dev0\n",
543
+ "optree 0.14.1\n",
544
+ "orbax-checkpoint 0.11.10\n",
545
+ "orjson 3.10.16\n",
546
+ "osqp 1.0.3\n",
547
+ "packaging 24.2\n",
548
+ "pandas 2.2.2\n",
549
+ "pandas-datareader 0.10.0\n",
550
+ "pandas-gbq 0.28.0\n",
551
+ "pandas-stubs 2.2.2.240909\n",
552
+ "pandocfilters 1.5.1\n",
553
+ "panel 1.6.2\n",
554
+ "param 2.2.0\n",
555
+ "parameterized 0.9.0\n",
556
+ "parso 0.8.4\n",
557
+ "parsy 2.1\n",
558
+ "partd 1.4.2\n",
559
+ "pathlib 1.0.1\n",
560
+ "patsy 1.0.1\n",
561
+ "peewee 3.17.9\n",
562
+ "peft 0.14.0\n",
563
+ "pexpect 4.9.0\n",
564
+ "pickleshare 0.7.5\n",
565
+ "pillow 11.1.0\n",
566
+ "pip 24.1.2\n",
567
+ "platformdirs 4.3.7\n",
568
+ "plotly 5.24.1\n",
569
+ "plotnine 0.14.5\n",
570
+ "pluggy 1.5.0\n",
571
+ "ply 3.11\n",
572
+ "polars 1.21.0\n",
573
+ "pooch 1.8.2\n",
574
+ "portpicker 1.5.2\n",
575
+ "preshed 3.0.9\n",
576
+ "prettytable 3.16.0\n",
577
+ "proglog 0.1.11\n",
578
+ "progressbar2 4.5.0\n",
579
+ "prometheus_client 0.21.1\n",
580
+ "promise 2.3\n",
581
+ "prompt_toolkit 3.0.50\n",
582
+ "propcache 0.3.1\n",
583
+ "prophet 1.1.6\n",
584
+ "proto-plus 1.26.1\n",
585
+ "protobuf 5.29.4\n",
586
+ "psutil 5.9.5\n",
587
+ "psycopg2 2.9.10\n",
588
+ "ptyprocess 0.7.0\n",
589
+ "py-cpuinfo 9.0.0\n",
590
+ "py4j 0.10.9.7\n",
591
+ "pyarrow 18.1.0\n",
592
+ "pyasn1 0.6.1\n",
593
+ "pyasn1_modules 0.4.2\n",
594
+ "pycairo 1.27.0\n",
595
+ "pycocotools 2.0.8\n",
596
+ "pycparser 2.22\n",
597
+ "pydantic 2.11.2\n",
598
+ "pydantic_core 2.33.1\n",
599
+ "pydata-google-auth 1.9.1\n",
600
+ "pydot 3.0.4\n",
601
+ "pydotplus 2.0.2\n",
602
+ "PyDrive 1.3.1\n",
603
+ "PyDrive2 1.21.3\n",
604
+ "pyerfa 2.0.1.5\n",
605
+ "pygame 2.6.1\n",
606
+ "pygit2 1.17.0\n",
607
+ "Pygments 2.18.0\n",
608
+ "PyGObject 3.42.0\n",
609
+ "PyJWT 2.10.1\n",
610
+ "pylibcudf-cu12 25.2.1\n",
611
+ "pylibcugraph-cu12 25.2.0\n",
612
+ "pylibraft-cu12 25.2.0\n",
613
+ "pymc 5.21.2\n",
614
+ "pymystem3 0.2.0\n",
615
+ "pynndescent 0.5.13\n",
616
+ "pynvjitlink-cu12 0.5.2\n",
617
+ "pynvml 12.0.0\n",
618
+ "pyogrio 0.10.0\n",
619
+ "Pyomo 6.8.2\n",
620
+ "PyOpenGL 3.1.9\n",
621
+ "pyOpenSSL 24.2.1\n",
622
+ "pyparsing 3.2.3\n",
623
+ "pyperclip 1.9.0\n",
624
+ "pyproj 3.7.1\n",
625
+ "pyshp 2.3.1\n",
626
+ "PySocks 1.7.1\n",
627
+ "pyspark 3.5.5\n",
628
+ "pytensor 2.30.2\n",
629
+ "pytest 8.3.5\n",
630
+ "pytest-rerunfailures 15.0\n",
631
+ "pytest-xdist 3.6.1\n",
632
+ "python-apt 0.0.0\n",
633
+ "python-box 7.3.2\n",
634
+ "python-dateutil 2.8.2\n",
635
+ "python-louvain 0.16\n",
636
+ "python-slugify 8.0.4\n",
637
+ "python-snappy 0.7.3\n",
638
+ "python-utils 3.9.1\n",
639
+ "pytz 2025.2\n",
640
+ "pyviz_comms 3.0.4\n",
641
+ "PyYAML 6.0.2\n",
642
+ "pyzmq 24.0.1\n",
643
+ "raft-dask-cu12 25.2.0\n",
644
+ "rapids-dask-dependency 25.2.0\n",
645
+ "ratelim 0.1.6\n",
646
+ "referencing 0.36.2\n",
647
+ "regex 2024.11.6\n",
648
+ "requests 2.32.3\n",
649
+ "requests-oauthlib 2.0.0\n",
650
+ "requests-toolbelt 1.0.0\n",
651
+ "requirements-parser 0.9.0\n",
652
+ "rich 13.9.4\n",
653
+ "rmm-cu12 25.2.0\n",
654
+ "roman-numerals-py 3.1.0\n",
655
+ "rpds-py 0.24.0\n",
656
+ "rpy2 3.5.17\n",
657
+ "rsa 4.9\n",
658
+ "ruamel.yaml 0.18.10\n",
659
+ "ruamel.yaml.clib 0.2.12\n",
660
+ "safetensors 0.5.3\n",
661
+ "scikit-image 0.25.2\n",
662
+ "scikit-learn 1.6.1\n",
663
+ "scipy 1.13.1\n",
664
+ "scooby 0.10.0\n",
665
+ "scs 3.2.7.post2\n",
666
+ "seaborn 0.13.2\n",
667
+ "SecretStorage 3.3.1\n",
668
+ "Send2Trash 1.8.3\n",
669
+ "sentence-transformers 3.4.1\n",
670
+ "sentencepiece 0.2.0\n",
671
+ "sentry-sdk 2.25.1\n",
672
+ "setproctitle 1.3.5\n",
673
+ "setuptools 75.2.0\n",
674
+ "shap 0.47.1\n",
675
+ "shapely 2.1.0\n",
676
+ "shellingham 1.5.4\n",
677
+ "simple-parsing 0.1.7\n",
678
+ "simplejson 3.20.1\n",
679
+ "simsimd 6.2.1\n",
680
+ "six 1.17.0\n",
681
+ "sklearn-compat 0.1.3\n",
682
+ "sklearn-pandas 2.2.0\n",
683
+ "slicer 0.0.8\n",
684
+ "smart-open 7.1.0\n",
685
+ "smmap 5.0.2\n",
686
+ "sniffio 1.3.1\n",
687
+ "snowballstemmer 2.2.0\n",
688
+ "sortedcontainers 2.4.0\n",
689
+ "soundfile 0.13.1\n",
690
+ "soupsieve 2.6\n",
691
+ "soxr 0.5.0.post1\n",
692
+ "spacy 3.8.5\n",
693
+ "spacy-legacy 3.0.12\n",
694
+ "spacy-loggers 1.0.5\n",
695
+ "spanner-graph-notebook 1.1.6\n",
696
+ "Sphinx 8.2.3\n",
697
+ "sphinxcontrib-applehelp 2.0.0\n",
698
+ "sphinxcontrib-devhelp 2.0.0\n",
699
+ "sphinxcontrib-htmlhelp 2.1.0\n",
700
+ "sphinxcontrib-jsmath 1.0.1\n",
701
+ "sphinxcontrib-qthelp 2.0.0\n",
702
+ "sphinxcontrib-serializinghtml 2.0.0\n",
703
+ "SQLAlchemy 2.0.40\n",
704
+ "sqlglot 25.20.2\n",
705
+ "sqlparse 0.5.3\n",
706
+ "srsly 2.5.1\n",
707
+ "stanio 0.5.1\n",
708
+ "statsmodels 0.14.4\n",
709
+ "stringzilla 3.12.3\n",
710
+ "sympy 1.13.3\n",
711
+ "tables 3.10.2\n",
712
+ "tabulate 0.9.0\n",
713
+ "tbb 2022.1.0\n",
714
+ "tblib 3.1.0\n",
715
+ "tcmlib 1.3.0\n",
716
+ "tenacity 9.1.2\n",
717
+ "tensorboard 2.18.0\n",
718
+ "tensorboard-data-server 0.7.2\n",
719
+ "tensorflow 2.18.0\n",
720
+ "tensorflow-datasets 4.9.8\n",
721
+ "tensorflow_decision_forests 1.11.0\n",
722
+ "tensorflow-hub 0.16.1\n",
723
+ "tensorflow-io-gcs-filesystem 0.37.1\n",
724
+ "tensorflow-metadata 1.17.0\n",
725
+ "tensorflow-probability 0.25.0\n",
726
+ "tensorflow-text 2.18.1\n",
727
+ "tensorstore 0.1.73\n",
728
+ "termcolor 3.0.1\n",
729
+ "terminado 0.18.1\n",
730
+ "text-unidecode 1.3\n",
731
+ "textblob 0.19.0\n",
732
+ "tf_keras 2.18.0\n",
733
+ "tf-slim 1.1.0\n",
734
+ "thinc 8.3.6\n",
735
+ "threadpoolctl 3.6.0\n",
736
+ "tifffile 2025.3.30\n",
737
+ "timm 1.0.15\n",
738
+ "tinycss2 1.4.0\n",
739
+ "tokenizers 0.21.1\n",
740
+ "toml 0.10.2\n",
741
+ "toolz 0.12.1\n",
742
+ "torch 2.7.0+cpu\n",
743
+ "torchao 0.10.0+cpu\n",
744
+ "torchaudio 2.5.0\n",
745
+ "torchsummary 1.5.1\n",
746
+ "torchvision 0.22.0+cpu\n",
747
+ "tornado 6.4.2\n",
748
+ "tqdm 4.67.1\n",
749
+ "traitlets 5.7.1\n",
750
+ "traittypes 0.2.1\n",
751
+ "transformers 4.51.0\n",
752
+ "treelite 4.4.1\n",
753
+ "treescope 0.1.9\n",
754
+ "triton 3.2.0\n",
755
+ "tweepy 4.15.0\n",
756
+ "typeguard 4.4.2\n",
757
+ "typer 0.15.2\n",
758
+ "types-pytz 2025.2.0.20250326\n",
759
+ "types-setuptools 78.1.0.20250329\n",
760
+ "typing_extensions 4.13.1\n",
761
+ "typing-inspection 0.4.0\n",
762
+ "tzdata 2025.2\n",
763
+ "tzlocal 5.3.1\n",
764
+ "uc-micro-py 1.0.3\n",
765
+ "ucx-py-cu12 0.42.0\n",
766
+ "ucxx-cu12 0.42.0\n",
767
+ "umap-learn 0.5.7\n",
768
+ "umf 0.10.0\n",
769
+ "uritemplate 4.1.1\n",
770
+ "urllib3 2.3.0\n",
771
+ "vega-datasets 0.9.0\n",
772
+ "wadllib 1.3.6\n",
773
+ "wandb 0.19.9\n",
774
+ "wasabi 1.1.3\n",
775
+ "wcwidth 0.2.13\n",
776
+ "weasel 0.4.1\n",
777
+ "webcolors 24.11.1\n",
778
+ "webencodings 0.5.1\n",
779
+ "websocket-client 1.8.0\n",
780
+ "websockets 15.0.1\n",
781
+ "Werkzeug 3.1.3\n",
782
+ "wheel 0.45.1\n",
783
+ "widgetsnbextension 3.6.10\n",
784
+ "wordcloud 1.9.4\n",
785
+ "wrapt 1.17.2\n",
786
+ "wurlitzer 3.1.1\n",
787
+ "xarray 2025.1.2\n",
788
+ "xarray-einstats 0.8.0\n",
789
+ "xgboost 2.1.4\n",
790
+ "xlrd 2.0.1\n",
791
+ "xxhash 3.5.0\n",
792
+ "xyzservices 2025.1.0\n",
793
+ "yarl 1.18.3\n",
794
+ "ydf 0.11.0\n",
795
+ "yellowbrick 1.5\n",
796
+ "yfinance 0.2.55\n",
797
+ "zict 3.0.0\n",
798
+ "zipp 3.21.0\n",
799
+ "zstandard 0.23.0\n"
800
+ ]
801
+ }
802
+ ]
803
+ },
804
+ {
805
+ "cell_type": "markdown",
806
+ "source": [
807
+ "## Step 2: Export to ExecuTorch"
808
+ ],
809
+ "metadata": {
810
+ "id": "fC9CGHJraXYo"
811
+ }
812
+ },
813
+ {
814
+ "cell_type": "code",
815
+ "source": [
816
+ "! cd /content/optimum-executorch; optimum-cli export executorch \\\n",
817
+ " --model \"HuggingFaceTB/SmolLM2-135M\" \\\n",
818
+ " --task \"text-generation\" \\\n",
819
+ " --recipe \"xnnpack\" \\\n",
820
+ " --output_dir=\"./smollmv2_135m_custom_sdpa\" \\\n",
821
+ " --use_custom_sdpa\n",
822
+ "\n",
823
+ "! cd /content/optimum-executorch; ls -all ./smollmv2_135m_custom_sdpa"
824
+ ],
825
+ "metadata": {
826
+ "colab": {
827
+ "base_uri": "https://localhost:8080/"
828
+ },
829
+ "id": "gCVEovBPbk1p",
830
+ "outputId": "c0c5416c-8dfa-4763-d407-4ab9c9f6dd70"
831
+ },
832
+ "execution_count": 3,
833
+ "outputs": [
834
+ {
835
+ "output_type": "stream",
836
+ "name": "stdout",
837
+ "text": [
838
+ "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",
839
+ "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
840
+ "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",
841
+ "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",
842
+ "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",
843
+ "To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n",
844
+ "config.json: 100% 704/704 [00:00<00:00, 3.09MB/s]\n",
845
+ "model.safetensors: 100% 269M/269M [00:01<00:00, 173MB/s]\n",
846
+ "/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",
847
+ " warnings.warn(\n",
848
+ "total 640584\n",
849
+ "drwxr-xr-x 2 root root 4096 Apr 11 21:24 .\n",
850
+ "drwxr-xr-x 10 root root 4096 Apr 11 21:20 ..\n",
851
+ "-rw-r--r-- 1 root root 655943040 Apr 11 21:24 model.pte\n"
852
+ ]
853
+ }
854
+ ]
855
+ },
856
+ {
857
+ "cell_type": "code",
858
+ "source": [
859
+ "from optimum.executorch import ExecuTorchModelForCausalLM\n",
860
+ "from transformers import AutoTokenizer\n",
861
+ "\n",
862
+ "# Load the exported model\n",
863
+ "model = ExecuTorchModelForCausalLM.from_pretrained(\"/content/optimum-executorch/smollmv2_135m_custom_sdpa\")\n",
864
+ "\n",
865
+ "# Initialize tokenizer and generate text\n",
866
+ "generated_text = model.text_generation(\n",
867
+ " tokenizer=AutoTokenizer.from_pretrained(\"HuggingFaceTB/SmolLM2-135M\"),\n",
868
+ " prompt=\"Simply put, the theory of relativity states that\",\n",
869
+ " max_seq_len=32\n",
870
+ ")\n",
871
+ "print(generated_text)"
872
+ ],
873
+ "metadata": {
874
+ "colab": {
875
+ "base_uri": "https://localhost:8080/"
876
+ },
877
+ "id": "jCJvCG5RviKF",
878
+ "outputId": "d2321adc-5e6e-4d74-8764-26bec82ae84a"
879
+ },
880
+ "execution_count": 6,
881
+ "outputs": [
882
+ {
883
+ "output_type": "stream",
884
+ "name": "stderr",
885
+ "text": [
886
+ "[program.cpp:135] InternalConsistency verification requested but not available\n"
887
+ ]
888
+ },
889
+ {
890
+ "output_type": "stream",
891
+ "name": "stdout",
892
+ "text": [
893
+ "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",
894
+ "\tPrompt Tokens: 9 Generated Tokens: 23\n",
895
+ "\tModel Load Time:\t\t0.000000 (seconds)\n",
896
+ "\tTotal inference time:\t\t9.277000 (seconds)\t\t Rate: \t2.479250 (tokens/second)\n",
897
+ "\t\tPrompt evaluation:\t3.913000 (seconds)\t\t Rate: \t2.300026 (tokens/second)\n",
898
+ "\t\tGenerated 23 tokens:\t5.364000 (seconds)\t\t Rate: \t4.287845 (tokens/second)\n",
899
+ "\tTime to first generated token:\t4.149000 (seconds)\n",
900
+ "\tSampling time over 32 tokens:\t9.271000 (seconds)\n",
901
+ "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"
902
+ ]
903
+ }
904
+ ]
905
+ }
906
+ ]
907
+ }