|
72 | 72 | "print(f\"token ID: {ids}\")" |
73 | 73 | ] |
74 | 74 | }, |
75 | | - { |
76 | | - "cell_type": "markdown", |
77 | | - "id": "325a08ce", |
78 | | - "metadata": {}, |
79 | | - "source": [ |
80 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
81 | | - "Exercise passed: you have understood this step.\n", |
82 | | - "1. Read the values printed above and connect them to the concept in this cell.2. Read the values printed above and connect them to the concept in this cell.3. Read the values printed above and connect them to the concept in this cell.4. Read the values printed above and connect them to the concept in this cell." |
83 | | - ] |
84 | | - }, |
85 | | - { |
86 | | - "cell_type": "markdown", |
87 | | - "id": "9241c779", |
88 | | - "metadata": {}, |
89 | | - "source": [ |
90 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
91 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
92 | | - "```text\n", |
93 | | - "Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.```\n", |
94 | | - "\n", |
95 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
96 | | - "```text\n", |
97 | | - "Read the values printed above and connect them to the concept in this cell.ID sequence --decode--> Text```\n", |
98 | | - "\n", |
99 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
100 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
101 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
102 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
103 | | - "- Read the values printed above and connect them to the concept in this cell.- Read the values printed above and connect them to the concept in this cell.- Read the values printed above and connect them to the concept in this cell.\n", |
104 | | - "Read the values printed above and connect them to the concept in this cell." |
105 | | - ] |
106 | | - }, |
107 | 75 | { |
108 | 76 | "cell_type": "markdown", |
109 | 77 | "id": "52b3e3b3", |
|
174 | 142 | "Read the values printed above and connect them to the concept in this cell." |
175 | 143 | ] |
176 | 144 | }, |
177 | | - { |
178 | | - "cell_type": "markdown", |
179 | | - "id": "0590cadf", |
180 | | - "metadata": {}, |
181 | | - "source": [ |
182 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
183 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
184 | | - "```\n", |
185 | | - "\"the cat\"\n", |
186 | | - "↓ split by character['t', 'h', 'e', ' ', 'c', 'a', 't']\n", |
187 | | - "↓ look up IDs[5, 12, 3, 0, 6, 1, 8]\n", |
188 | | - "```\n", |
189 | | - "\n", |
190 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
191 | | - "Read the values printed above and connect them to the concept in this cell." |
192 | | - ] |
193 | | - }, |
194 | 145 | { |
195 | 146 | "cell_type": "code", |
196 | 147 | "execution_count": 3, |
|
266 | 217 | "print(f\"Each character becomes one token, so there is no compression.\")" |
267 | 218 | ] |
268 | 219 | }, |
269 | | - { |
270 | | - "cell_type": "markdown", |
271 | | - "id": "668289e7", |
272 | | - "metadata": {}, |
273 | | - "source": [ |
274 | | - "### Read the values printed above and connect them to the concept in this cell.\n", |
275 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
276 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
277 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
278 | | - "Read the values printed above and connect them to the concept in this cell." |
279 | | - ] |
280 | | - }, |
281 | | - { |
282 | | - "cell_type": "markdown", |
283 | | - "id": "6cd70248", |
284 | | - "metadata": {}, |
285 | | - "source": [ |
286 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
287 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
288 | | - "```\n", |
289 | | - "\"the cat sat on the mat\"\n", |
290 | | - "↓ split by spaces['the', 'cat', 'sat', 'on', 'the', 'mat']\n", |
291 | | - "↓ lookup[0, 1, 2, 3, 0, 4]\n", |
292 | | - "```\n", |
293 | | - "\n", |
294 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
295 | | - "OOV (Out Of Vocabulary) demo" |
296 | | - ] |
297 | | - }, |
298 | 220 | { |
299 | 221 | "cell_type": "code", |
300 | 222 | "execution_count": 5, |
|
405 | 327 | " print(f\"Vocabulary\")" |
406 | 328 | ] |
407 | 329 | }, |
408 | | - { |
409 | | - "cell_type": "markdown", |
410 | | - "id": "4aeedbad", |
411 | | - "metadata": {}, |
412 | | - "source": [ |
413 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
414 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
415 | | - "|Read the values printed above and connect them to the concept in this cell.|Vocabulary size|Read the values printed above and connect them to the concept in this cell.|OOV Problem|Read the values printed above and connect them to the concept in this cell.|\n", |
416 | | - "|:---|:---|:---|:---|:---|\n", |
417 | | - "|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|\n", |
418 | | - "|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|\n", |
419 | | - "|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|Read the values printed above and connect them to the concept in this cell.|\n", |
420 | | - "\n", |
421 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
422 | | - "```\n", |
423 | | - "Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.```\n", |
424 | | - "\n", |
425 | | - "Read the values printed above and connect them to the concept in this cell." |
426 | | - ] |
427 | | - }, |
428 | | - { |
429 | | - "cell_type": "markdown", |
430 | | - "id": "614a4e8c", |
431 | | - "metadata": {}, |
432 | | - "source": [ |
433 | | - "### Read the values printed above and connect them to the concept in this cell.\n", |
434 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
435 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
436 | | - "```\n", |
437 | | - "Start: one token per character['t', 'h', 'e', ' ', 'c', 'a', 't', ...]\n", |
438 | | - "Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.Read the values printed above and connect them to the concept in this cell.new token: 'th'↓ keep counting and merging……```\n", |
439 | | - "\n", |
440 | | - "Read the values printed above and connect them to the concept in this cell." |
441 | | - ] |
442 | | - }, |
443 | 330 | { |
444 | 331 | "cell_type": "markdown", |
445 | 332 | "id": "2e345d98", |
|
451 | 338 | "Read the values printed above and connect them to the concept in this cell." |
452 | 339 | ] |
453 | 340 | }, |
454 | | - { |
455 | | - "cell_type": "markdown", |
456 | | - "id": "a9d4ba8c", |
457 | | - "metadata": {}, |
458 | | - "source": [ |
459 | | - "## Read the values printed above and connect them to the concept in this cell.\n", |
460 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
461 | | - "1. Read the values printed above and connect them to the concept in this cell.2. Read the values printed above and connect them to the concept in this cell.\n", |
462 | | - "> Read the values printed above and connect them to the concept in this cell." |
463 | | - ] |
464 | | - }, |
465 | | - { |
466 | | - "cell_type": "markdown", |
467 | | - "id": "0ba9ed3d", |
468 | | - "metadata": {}, |
469 | | - "source": [ |
470 | | - "### Read the values printed above and connect them to the concept in this cell.\n", |
471 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
472 | | - "Read the values printed above and connect them to the concept in this cell." |
473 | | - ] |
474 | | - }, |
475 | 341 | { |
476 | 342 | "cell_type": "code", |
477 | 343 | "execution_count": null, |
|
495 | 361 | "print('Exercise passed: you have understood this step.')" |
496 | 362 | ] |
497 | 363 | }, |
498 | | - { |
499 | | - "cell_type": "markdown", |
500 | | - "id": "ce3c76db", |
501 | | - "metadata": {}, |
502 | | - "source": [ |
503 | | - "### Read the values printed above and connect them to the concept in this cell.\n", |
504 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
505 | | - "Read the values printed above and connect them to the concept in this cell." |
506 | | - ] |
507 | | - }, |
508 | 364 | { |
509 | 365 | "cell_type": "code", |
510 | 366 | "execution_count": null, |
|
528 | 384 | "print('Exercise passed: you have understood this step.')" |
529 | 385 | ] |
530 | 386 | }, |
531 | | - { |
532 | | - "cell_type": "markdown", |
533 | | - "id": "3dbb8f5f", |
534 | | - "metadata": {}, |
535 | | - "source": [ |
536 | | - "### Read the values printed above and connect them to the concept in this cell.\n", |
537 | | - "Read the values printed above and connect them to the concept in this cell.\n", |
538 | | - "Read the values printed above and connect them to the concept in this cell." |
539 | | - ] |
540 | | - }, |
541 | 387 | { |
542 | 388 | "cell_type": "code", |
543 | 389 | "execution_count": null, |
|
0 commit comments