Add and link bonus material (#84)

This commit is contained in:
Sebastian Raschka
2024-03-23 07:27:43 -05:00
committed by GitHub
parent 35c6e12730
commit cf39abac04
12 changed files with 110 additions and 13 deletions

View File

@@ -29,12 +29,23 @@
"# pip install -r requirements-extra.txt"
]
},
{
"cell_type": "markdown",
"id": "737c59bb-5922-46fc-a787-1369d70925b4",
"metadata": {},
"source": [
"# Comparing Various Byte Pair Encoding (BPE) Implementations"
]
},
{
"cell_type": "markdown",
"id": "a9adc3bf-353c-411e-a471-0e92786e7103",
"metadata": {},
"source": [
"# Using BytePair encodding from `tiktoken`"
"<br>\n",
"&nbsp;\n",
"\n",
"## Using BPE from `tiktoken`"
]
},
{
@@ -134,7 +145,10 @@
"id": "6a0b5d4f-2af9-40de-828c-063c4243e771",
"metadata": {},
"source": [
"# Using the original Byte-pair encoding implementation used in GPT-2"
"<br>\n",
"&nbsp;\n",
"\n",
"## Using the original BPE implementation used in GPT-2"
]
},
{
@@ -221,7 +235,10 @@
"id": "4f63e8c6-707c-4d66-bcf8-dd790647cc86",
"metadata": {},
"source": [
"# Using the BytePair Tokenizer in Hugging Face transformers"
"<br>\n",
"&nbsp;\n",
"\n",
"## Using the BPE via Hugging Face transformers"
]
},
{
@@ -356,7 +373,10 @@
"id": "907a1ade-3401-4f2e-9017-7f58a60cbd98",
"metadata": {},
"source": [
"# A quick performance benchmark"
"<br>\n",
"&nbsp;\n",
"\n",
"## A quick performance benchmark"
]
},
{
@@ -466,7 +486,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.12"
}
},
"nbformat": 4,

View File

@@ -5,7 +5,7 @@
"id": "063850ab-22b0-4838-b53a-9bb11757d9d0",
"metadata": {},
"source": [
"# Embedding Layers and Linear Layers"
"# Understanding the Difference Between Embedding Layers and Linear Layers"
]
},
{
@@ -42,6 +42,9 @@
"id": "a7895a66-7f69-4f62-9361-5c9da2eb76ef",
"metadata": {},
"source": [
"<br>\n",
"&nbsp;\n",
"\n",
"## Using nn.Embedding"
]
},
@@ -260,6 +263,9 @@
"id": "f0fe863b-d6a3-48f3-ace5-09ecd0eb7b59",
"metadata": {},
"source": [
"<br>\n",
"&nbsp;\n",
"\n",
"## Using nn.Linear"
]
},
@@ -471,7 +477,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.10.12"
}
},
"nbformat": 4,