Skip to content

Commit 19fb639

Browse files
Disable caching during text generation
1 parent f2f7de3 commit 19fb639

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

module-16-applying-peft-on-foundation-models/exercises/solution/teach-an-llm-to-spell-with-sft-solution.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@
335335
"\n",
336336
" # Generate text from the model\n",
337337
" gen = model.generate(\n",
338-
" **inputs, max_new_tokens=max_new_tokens\n",
338+
" **inputs, max_new_tokens=max_new_tokens, use_cache=False\n",
339339
" ) # No parameters = greedy search\n",
340340
"\n",
341341
" # Decode the generated tokens to a string\n",

0 commit comments

Comments
 (0)