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>
This commit is contained in:
Henry Shi 2025-04-13 11:06:57 -07:00 committed by GitHub
parent 48e98abc8e
commit 88250d953d

View File

@ -268,7 +268,7 @@
"source": [ "source": [
"There are multiple ways to force deterministic behavior with the `generate` function:\n", "There are multiple ways to force deterministic behavior with the `generate` function:\n",
"\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`." "2. Setting `top_k=1`."
] ]
}, },
@ -1008,7 +1008,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.10.6" "version": "3.10.16"
} }
}, },
"nbformat": 4, "nbformat": 4,