mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
add assertion about data set length
This commit is contained in:
@@ -837,7 +837,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"execution_count": 1,
|
||||
"id": "2992d779-f9fb-4812-a117-553eb790a5a9",
|
||||
"metadata": {
|
||||
"id": "2992d779-f9fb-4812-a117-553eb790a5a9"
|
||||
@@ -861,7 +861,13 @@
|
||||
" \"gpt2-xl (1558M)\": {\"emb_dim\": 1600, \"n_layers\": 48, \"n_heads\": 25},\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"BASE_CONFIG.update(model_configs[CHOOSE_MODEL])"
|
||||
"BASE_CONFIG.update(model_configs[CHOOSE_MODEL])\n",
|
||||
"\n",
|
||||
"assert train_dataset.max_length <= BASE_CONFIG[\"context_length\"], (\n",
|
||||
" f\"Dataset length {train_dataset.max_length} exceeds model's context \"\n",
|
||||
" f\"length {BASE_CONFIG['context_length']}. Reinitialize data sets with \"\n",
|
||||
" f\"`max_length={BASE_CONFIG['context_length']}`\"\n",
|
||||
")"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user