From 7d2d32037311a2c3938951df86aaa3539f1746f7 Mon Sep 17 00:00:00 2001 From: Matthias Amberg Date: Fri, 5 May 2023 16:10:41 +0200 Subject: [PATCH] Added missing temperature parameter to call to function sample_next(). --- chapter12_part01_text-generation.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chapter12_part01_text-generation.ipynb b/chapter12_part01_text-generation.ipynb index f683c1d73..b84f43c69 100644 --- a/chapter12_part01_text-generation.ipynb +++ b/chapter12_part01_text-generation.ipynb @@ -407,6 +407,7 @@ " predictions = self.model(tokenized_sentence)\n", " next_token = sample_next(\n", " predictions[0, self.prompt_length - 1 + i, :]\n", + " temperature " )\n", " sampled_token = tokens_index[next_token]\n", " sentence += \" \" + sampled_token\n", @@ -478,4 +479,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +}