Browse Source

updated exercise 5.3 (#615)

* updated exercise 5.3

temperature can be set to 0 to regardless of top_k setting to force deterministic behavior

* fix notebook json

---------

Co-authored-by: Sebastian Raschka <mail@sebastianraschka.com>
Henry Shi 7 months ago
parent
commit
02779f5e35
1 changed files with 2 additions and 2 deletions
  1. 2 2
      ch05/01_main-chapter-code/exercise-solutions.ipynb

+ 2 - 2
ch05/01_main-chapter-code/exercise-solutions.ipynb

@@ -268,7 +268,7 @@
    "source": [
     "There are multiple ways to force deterministic behavior with the `generate` function:\n",
     "\n",
-    "1. Setting to `top_k=None` and applying no temperature scaling;\n",
+    "1. Setting to `temperature=0.0`;\n",
     "2. Setting `top_k=1`."
    ]
   },
@@ -1008,7 +1008,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.10.6"
+   "version": "3.10.16"
   }
  },
  "nbformat": 4,