mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2026-04-10 12:33:42 +00:00
use default value for temperature
This commit is contained in:
@@ -1852,7 +1852,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def generate(model, idx, max_new_tokens, context_size, temperature, top_k=None, eos_id=None):\n",
|
||||
"def generate(model, idx, max_new_tokens, context_size, temperature=1.0, top_k=None, eos_id=None):\n",
|
||||
"\n",
|
||||
" # For-loop is the same as before: Get logits, and only focus on last time step\n",
|
||||
" for _ in range(max_new_tokens):\n",
|
||||
|
||||
Reference in New Issue
Block a user