|
229 | 229 | },
|
230 | 230 | {
|
231 | 231 | "cell_type": "code",
|
232 |
| - "execution_count": 10, |
| 232 | + "execution_count": null, |
233 | 233 | "id": "90825af1",
|
234 | 234 | "metadata": {},
|
235 |
| - "outputs": [ |
236 |
| - { |
237 |
| - "name": "stdout", |
238 |
| - "output_type": "stream", |
239 |
| - "text": [ |
240 |
| - " % Total % Received % Xferd Average Speed Time Time Time Current\n", |
241 |
| - " Dload Upload Total Spent Left Speed\n", |
242 |
| - " 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0" |
243 |
| - ] |
244 |
| - }, |
245 |
| - { |
246 |
| - "name": "stdout", |
247 |
| - "output_type": "stream", |
248 |
| - "text": [ |
249 |
| - "100 458 100 326 100 132 171 69 0:00:01 0:00:01 --:--:-- 241\n", |
250 |
| - "\u001b[1;39m{\n", |
251 |
| - " \u001b[0m\u001b[34;1m\"id\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"cmpl-e42772faf58cd46c18a955f1\"\u001b[0m\u001b[1;39m,\n", |
252 |
| - " \u001b[0m\u001b[34;1m\"object\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"text_completion\"\u001b[0m\u001b[1;39m,\n", |
253 |
| - " \u001b[0m\u001b[34;1m\"created\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39m1689485483\u001b[0m\u001b[1;39m,\n", |
254 |
| - " \u001b[0m\u001b[34;1m\"model\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"falcon-7b-instruct\"\u001b[0m\u001b[1;39m,\n", |
255 |
| - " \u001b[0m\u001b[34;1m\"choices\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m[\n", |
256 |
| - " \u001b[1;39m{\n", |
257 |
| - " \u001b[0m\u001b[34;1m\"text\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"\\nGeorge Washington was the first president of the United States.\"\u001b[0m\u001b[1;39m,\n", |
258 |
| - " \u001b[0m\u001b[34;1m\"index\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39m0\u001b[0m\u001b[1;39m,\n", |
259 |
| - " \u001b[0m\u001b[34;1m\"logprobs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;30mnull\u001b[0m\u001b[1;39m,\n", |
260 |
| - " \u001b[0m\u001b[34;1m\"finish_reason\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"length\"\u001b[0m\u001b[1;39m\n", |
261 |
| - " \u001b[1;39m}\u001b[0m\u001b[1;39m\n", |
262 |
| - " \u001b[1;39m]\u001b[0m\u001b[1;39m,\n", |
263 |
| - " \u001b[0m\u001b[34;1m\"usage\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n", |
264 |
| - " \u001b[0m\u001b[34;1m\"prompt_tokens\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39m11\u001b[0m\u001b[1;39m,\n", |
265 |
| - " \u001b[0m\u001b[34;1m\"completion_tokens\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39m12\u001b[0m\u001b[1;39m,\n", |
266 |
| - " \u001b[0m\u001b[34;1m\"total_tokens\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39m23\u001b[0m\u001b[1;39m\n", |
267 |
| - " \u001b[1;39m}\u001b[0m\u001b[1;39m\n", |
268 |
| - "\u001b[1;39m}\u001b[0m\n" |
269 |
| - ] |
270 |
| - } |
271 |
| - ], |
| 235 | + "outputs": [], |
272 | 236 | "source": [
|
273 | 237 | "! curl http://localhost:8080/v1/completions \\\n",
|
274 | 238 | " -H \"Content-Type: application/json\" \\\n",
|
275 | 239 | " -d '{ \\\n",
|
276 | 240 | " \"model\": \"falcon-7b-instruct\", \\\n",
|
277 | 241 | " \"prompt\": \"Who was the first president of the United States? \", \\\n",
|
278 |
| - " \"max_tokens\": 12\\\n", |
279 |
| - " }' | jq" |
| 242 | + " \"max_tokens\": 10\\\n", |
| 243 | + " }' " |
| 244 | + ] |
| 245 | + }, |
| 246 | + { |
| 247 | + "cell_type": "markdown", |
| 248 | + "id": "59cdbd6c", |
| 249 | + "metadata": {}, |
| 250 | + "source": [ |
| 251 | + "```json\n", |
| 252 | + "{\n", |
| 253 | + " \"id\": \"cmpl-e42772faf58cd46c18a955f1\",\n", |
| 254 | + " \"object\": \"text_completion\",\n", |
| 255 | + " \"created\": 1689485483,\n", |
| 256 | + " \"model\": \"falcon-7b-instruct\",\n", |
| 257 | + " \"choices\": [\n", |
| 258 | + " {\n", |
| 259 | + " \"text\": \"\\nGeorge Washington was the first president of the United States.\",\n", |
| 260 | + " \"index\": 0,\n", |
| 261 | + " \"logprobs\": null,\n", |
| 262 | + " \"finish_reason\": \"length\"\n", |
| 263 | + " }\n", |
| 264 | + " ],\n", |
| 265 | + " \"usage\": {\n", |
| 266 | + " \"prompt_tokens\": 11,\n", |
| 267 | + " \"completion_tokens\": 12,\n", |
| 268 | + " \"total_tokens\": 23\n", |
| 269 | + " }\n", |
| 270 | + "}\n", |
| 271 | + "```" |
280 | 272 | ]
|
281 | 273 | },
|
282 | 274 | {
|
|
285 | 277 | "id": "95a9966d-5679-4208-9b28-0323aa80cd79",
|
286 | 278 | "metadata": {},
|
287 | 279 | "source": [
|
288 |
| - "If you are interested in continuing your journey through Substratus, take a look at the [Guided Walkthrough](./category/walkthrough) or\n", |
289 |
| - "follow the [tutorial to finetune falcon-7b-instruct](./tutorials/deploying-finetuning-falcon-7b-instruct.md) with a custom dataset." |
| 280 | + "If you are interested in continuing your journey through Substratus, take a look at the [Guided Walkthrough](./category/walkthrough) to learn how to finetune models with your own dataset and much more!" |
290 | 281 | ]
|
291 | 282 | },
|
292 | 283 | {
|
|
0 commit comments