|
|
@@ -584,7 +584,7 @@
|
|
|
"text": [
|
|
|
"File already exists and is up-to-date: gpt2/124M/checkpoint\n",
|
|
|
"File already exists and is up-to-date: gpt2/124M/encoder.json\n",
|
|
|
- "File already exists and is up-to-date: gpt2/124M/hparams.json\n",
|
|
|
+ "File already exists and is up-to-date: gpt2/124M/settings.json\n",
|
|
|
"File already exists and is up-to-date: gpt2/124M/model.ckpt.data-00000-of-00001\n",
|
|
|
"File already exists and is up-to-date: gpt2/124M/model.ckpt.index\n",
|
|
|
"File already exists and is up-to-date: gpt2/124M/model.ckpt.meta\n",
|
|
|
@@ -595,7 +595,7 @@
|
|
|
"source": [
|
|
|
"from gpt_download import download_and_load_gpt2\n",
|
|
|
"\n",
|
|
|
- "hparams, params = download_and_load_gpt2(model_size=\"124M\", models_dir=\"gpt2\")"
|
|
|
+ "settings, params = download_and_load_gpt2(model_size=\"124M\", models_dir=\"gpt2\")"
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
@@ -737,7 +737,7 @@
|
|
|
"text": [
|
|
|
"File already exists and is up-to-date: gpt2/1558M/checkpoint\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/encoder.json\n",
|
|
|
- "File already exists and is up-to-date: gpt2/1558M/hparams.json\n",
|
|
|
+ "File already exists and is up-to-date: gpt2/1558M/settings.json\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.data-00000-of-00001\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.index\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.meta\n",
|
|
|
@@ -748,7 +748,7 @@
|
|
|
}
|
|
|
],
|
|
|
"source": [
|
|
|
- "hparams, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
+ "settings, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
"\n",
|
|
|
"model_name = \"gpt2-xl (1558M)\"\n",
|
|
|
"NEW_CONFIG = GPT_CONFIG_124M.copy()\n",
|
|
|
@@ -785,7 +785,7 @@
|
|
|
"In the main chapter, we experimented with the smallest GPT-2 model, which has only 124M parameters. The reason was to keep the resource requirements as low as possible. However, you can easily experiment with larger models with minimal code changes. For example, instead of loading the 1558M instead of 124M model in chapter 5, the only 2 lines of code that we have to change are\n",
|
|
|
"\n",
|
|
|
"```\n",
|
|
|
- "hparams, params = download_and_load_gpt2(model_size=\"124M\", models_dir=\"gpt2\")\n",
|
|
|
+ "settings, params = download_and_load_gpt2(model_size=\"124M\", models_dir=\"gpt2\")\n",
|
|
|
"model_name = \"gpt2-small (124M)\"\n",
|
|
|
"```\n",
|
|
|
"\n",
|
|
|
@@ -793,7 +793,7 @@
|
|
|
"\n",
|
|
|
"\n",
|
|
|
"```\n",
|
|
|
- "hparams, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
+ "settings, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
"model_name = \"gpt2-xl (1558M)\"\n",
|
|
|
"```"
|
|
|
]
|
|
|
@@ -836,7 +836,7 @@
|
|
|
"text": [
|
|
|
"File already exists and is up-to-date: gpt2/1558M/checkpoint\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/encoder.json\n",
|
|
|
- "File already exists and is up-to-date: gpt2/1558M/hparams.json\n",
|
|
|
+ "File already exists and is up-to-date: gpt2/1558M/settings.json\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.data-00000-of-00001\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.index\n",
|
|
|
"File already exists and is up-to-date: gpt2/1558M/model.ckpt.meta\n",
|
|
|
@@ -864,7 +864,7 @@
|
|
|
"gpt = GPTModel(NEW_CONFIG)\n",
|
|
|
"gpt.eval()\n",
|
|
|
"\n",
|
|
|
- "hparams, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
+ "settings, params = download_and_load_gpt2(model_size=\"1558M\", models_dir=\"gpt2\")\n",
|
|
|
"load_weights_into_gpt(gpt, params)"
|
|
|
]
|
|
|
},
|
|
|
@@ -926,7 +926,7 @@
|
|
|
"name": "python",
|
|
|
"nbconvert_exporter": "python",
|
|
|
"pygments_lexer": "ipython3",
|
|
|
- "version": "3.10.6"
|
|
|
+ "version": "3.10.12"
|
|
|
}
|
|
|
},
|
|
|
"nbformat": 4,
|