add imports and version on top

This commit is contained in:
rasbt 2024-03-16 09:50:00 -05:00
parent ff8657ac92
commit 861c296312

View File

@ -8,6 +8,34 @@
"# Chapter 4: Implementing a GPT model from Scratch To Generate Text "
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "f9eac223-a125-40f7-bacc-bd0d890450c7",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"matplotlib version: 3.7.2\n",
"torch version: 2.2.1\n",
"tiktoken version: 0.5.1\n"
]
}
],
"source": [
"from importlib.metadata import version\n",
"\n",
"import matplotlib\n",
"import tiktoken\n",
"import torch\n",
"\n",
"print(\"matplotlib version:\", version(\"matplotlib\"))\n",
"print(\"torch version:\", version(\"torch\"))\n",
"print(\"tiktoken version:\", version(\"tiktoken\"))"
]
},
{
"cell_type": "markdown",
"id": "e7da97ed-e02f-4d7f-b68e-a0eba3716e02",
@ -1478,7 +1506,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
"version": "3.11.4"
}
},
"nbformat": 4,