This commit is contained in:
rasbt 2024-06-22 11:10:05 -05:00
parent 72f46297d9
commit c21b9937e9
No known key found for this signature in database
GPG Key ID: 3C6E5C7C075611DB

View File

@ -181,29 +181,6 @@
"tokenizer = tiktoken.get_encoding(\"gpt2\")"
]
},
{
"cell_type": "markdown",
"id": "b319df48-8a14-4beb-966c-6b49e255c6ba",
"metadata": {},
"source": [
"In addition, we have to make sure that we use the `format_input_phi` function: "
]
},
{
"cell_type": "markdown",
"id": "ed41ec0e-6a5a-44f1-bb3c-b7d0724cb4e1",
"metadata": {},
"source": [
"```python\n",
" train_losses, val_losses, tokens_seen = train_model_simple(\n",
" model, train_loader, val_loader, optimizer, device,\n",
" num_epochs=num_epochs, eval_freq=5, eval_iter=5,\n",
" start_context=format_input_phi(val_data[0]), # New: `Use format_input_phi` function\n",
" tokenizer=tokenizer\n",
" )\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "e0650926-c39f-4442-8116-cb7494416f28",