Liu Song’s Projects


~/Projects/ChatGLM3

git clone https://code.lsong.org/ChatGLM3

Commit

Commit
f807d1a21a295966b47a366c91335a71b9f293a6
Author
xusenlin <[email protected]>
Date
2023-11-01 17:22:38 +0800 +0800
Diffstat
 utils.py | 2 +-

fix typo


diff --git a/utils.py b/utils.py
index bde33b6d412c25b26f9868e850f493b94cf8212a..ab2c01d8634d395ee9d70a142acc19911e80d8a5 100644
--- a/utils.py
+++ b/utils.py
@@ -123,7 +123,7 @@     temperature = float(params.get("temperature", 1.0))
     repetition_penalty = float(params.get("repetition_penalty", 1.0))
     top_p = float(params.get("top_p", 1.0))
     max_new_tokens = int(params.get("max_tokens", 256))
-    max_length = params.get("max_tokens", None)
+    max_length = params.get("max_length", None)
     echo = params.get("echo", True)
 
     query, role = messages[-1].content, messages[-1].role