Spaces:
Sleeping
Sleeping
Commit
•
68e82ed
1
Parent(s):
9ec27a3
Linking to the blog
Browse files
notebooks/jais_tgi_inference_endpoints.ipynb
CHANGED
@@ -38,8 +38,8 @@
|
|
38 |
"output_type": "stream",
|
39 |
"text": [
|
40 |
"\n",
|
41 |
-
"\
|
42 |
-
"\
|
43 |
"Note: you may need to restart the kernel to use updated packages.\n"
|
44 |
]
|
45 |
}
|
@@ -58,21 +58,12 @@
|
|
58 |
},
|
59 |
{
|
60 |
"cell_type": "code",
|
61 |
-
"execution_count":
|
62 |
"id": "99f60998-0490-46c6-a8e6-04845ddda7be",
|
63 |
"metadata": {
|
64 |
"tags": []
|
65 |
},
|
66 |
-
"outputs": [
|
67 |
-
{
|
68 |
-
"name": "stderr",
|
69 |
-
"output_type": "stream",
|
70 |
-
"text": [
|
71 |
-
"/Users/derekthomas/projects/spaces/jais-tgi-benchmark/venv/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020\n",
|
72 |
-
" warnings.warn(\n"
|
73 |
-
]
|
74 |
-
}
|
75 |
-
],
|
76 |
"source": [
|
77 |
"from huggingface_hub import login, whoami, create_inference_endpoint\n",
|
78 |
"from getpass import getpass"
|
@@ -101,27 +92,12 @@
|
|
101 |
},
|
102 |
{
|
103 |
"cell_type": "code",
|
104 |
-
"execution_count":
|
105 |
"id": "0ca1140c-3fcc-4b99-9210-6da1505a27b7",
|
106 |
"metadata": {
|
107 |
"tags": []
|
108 |
},
|
109 |
-
"outputs": [
|
110 |
-
{
|
111 |
-
"data": {
|
112 |
-
"application/vnd.jupyter.widget-view+json": {
|
113 |
-
"model_id": "3c7ff285544d4ea9a1cc985cf981993c",
|
114 |
-
"version_major": 2,
|
115 |
-
"version_minor": 0
|
116 |
-
},
|
117 |
-
"text/plain": [
|
118 |
-
"VBox(children=(HTML(value='<center> <img\\nsrc=https://huggingface.co/front/assets/huggingface_logo-noborder.sv…"
|
119 |
-
]
|
120 |
-
},
|
121 |
-
"metadata": {},
|
122 |
-
"output_type": "display_data"
|
123 |
-
}
|
124 |
-
],
|
125 |
"source": [
|
126 |
"login()"
|
127 |
]
|
@@ -275,31 +251,12 @@
|
|
275 |
},
|
276 |
{
|
277 |
"cell_type": "code",
|
278 |
-
"execution_count":
|
279 |
"id": "5f3a8bd2-753c-49a8-9452-899578beddc5",
|
280 |
"metadata": {
|
281 |
"tags": []
|
282 |
},
|
283 |
-
"outputs": [
|
284 |
-
{
|
285 |
-
"name": "stdout",
|
286 |
-
"output_type": "stream",
|
287 |
-
"text": [
|
288 |
-
"CPU times: user 188 ms, sys: 101 ms, total: 289 ms\n",
|
289 |
-
"Wall time: 2min 56s\n"
|
290 |
-
]
|
291 |
-
},
|
292 |
-
{
|
293 |
-
"data": {
|
294 |
-
"text/plain": [
|
295 |
-
"InferenceEndpoint(name='jais13b-demo', namespace='HF-test-lab', repository='derek-thomas/jais-13b-chat-hf', status='running', url='https://kgcd24dil090jo6n.us-east-1.aws.endpoints.huggingface.cloud')"
|
296 |
-
]
|
297 |
-
},
|
298 |
-
"execution_count": 9,
|
299 |
-
"metadata": {},
|
300 |
-
"output_type": "execute_result"
|
301 |
-
}
|
302 |
-
],
|
303 |
"source": [
|
304 |
"%%time\n",
|
305 |
"endpoint.wait()"
|
@@ -385,20 +342,12 @@
|
|
385 |
},
|
386 |
{
|
387 |
"cell_type": "code",
|
388 |
-
"execution_count":
|
389 |
"id": "16815445-3079-43da-b14e-b54176a07a62",
|
390 |
"metadata": {
|
391 |
"tags": []
|
392 |
},
|
393 |
-
"outputs": [
|
394 |
-
{
|
395 |
-
"name": "stdout",
|
396 |
-
"output_type": "stream",
|
397 |
-
"text": [
|
398 |
-
"https://ui.endpoints.huggingface.co/HF-test-lab/endpoints/jais13b-demo/analytics\n"
|
399 |
-
]
|
400 |
-
}
|
401 |
-
],
|
402 |
"source": [
|
403 |
"dashboard_url = f'https://ui.endpoints.huggingface.co/{namespace}/endpoints/{ENDPOINT_NAME}/analytics'\n",
|
404 |
"print(dashboard_url)"
|
|
|
38 |
"output_type": "stream",
|
39 |
"text": [
|
40 |
"\n",
|
41 |
+
"\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m A new release of pip is available: \u001B[0m\u001B[31;49m23.2.1\u001B[0m\u001B[39;49m -> \u001B[0m\u001B[32;49m23.3.2\u001B[0m\n",
|
42 |
+
"\u001B[1m[\u001B[0m\u001B[34;49mnotice\u001B[0m\u001B[1;39;49m]\u001B[0m\u001B[39;49m To update, run: \u001B[0m\u001B[32;49mpip install --upgrade pip\u001B[0m\n",
|
43 |
"Note: you may need to restart the kernel to use updated packages.\n"
|
44 |
]
|
45 |
}
|
|
|
58 |
},
|
59 |
{
|
60 |
"cell_type": "code",
|
61 |
+
"execution_count": null,
|
62 |
"id": "99f60998-0490-46c6-a8e6-04845ddda7be",
|
63 |
"metadata": {
|
64 |
"tags": []
|
65 |
},
|
66 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
"source": [
|
68 |
"from huggingface_hub import login, whoami, create_inference_endpoint\n",
|
69 |
"from getpass import getpass"
|
|
|
92 |
},
|
93 |
{
|
94 |
"cell_type": "code",
|
95 |
+
"execution_count": null,
|
96 |
"id": "0ca1140c-3fcc-4b99-9210-6da1505a27b7",
|
97 |
"metadata": {
|
98 |
"tags": []
|
99 |
},
|
100 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
"source": [
|
102 |
"login()"
|
103 |
]
|
|
|
251 |
},
|
252 |
{
|
253 |
"cell_type": "code",
|
254 |
+
"execution_count": null,
|
255 |
"id": "5f3a8bd2-753c-49a8-9452-899578beddc5",
|
256 |
"metadata": {
|
257 |
"tags": []
|
258 |
},
|
259 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
260 |
"source": [
|
261 |
"%%time\n",
|
262 |
"endpoint.wait()"
|
|
|
342 |
},
|
343 |
{
|
344 |
"cell_type": "code",
|
345 |
+
"execution_count": null,
|
346 |
"id": "16815445-3079-43da-b14e-b54176a07a62",
|
347 |
"metadata": {
|
348 |
"tags": []
|
349 |
},
|
350 |
+
"outputs": [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
351 |
"source": [
|
352 |
"dashboard_url = f'https://ui.endpoints.huggingface.co/{namespace}/endpoints/{ENDPOINT_NAME}/analytics'\n",
|
353 |
"print(dashboard_url)"
|