mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-08-21 23:45:43 +08:00
[webui] add seed controls for reproducibility (#10629)
Co-authored-by: Karunanidhi Mishra <11963379+kmishra1204@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
a61cfa692a
commit
5987a8dd68
@@ -203,6 +203,7 @@ class WebChatModel(ChatModel):
|
||||
max_new_tokens: int,
|
||||
top_p: float,
|
||||
temperature: float,
|
||||
seed: float | int,
|
||||
skip_special_tokens: bool,
|
||||
escape_html: bool,
|
||||
enable_thinking: bool,
|
||||
@@ -225,6 +226,7 @@ class WebChatModel(ChatModel):
|
||||
max_new_tokens=max_new_tokens,
|
||||
top_p=top_p,
|
||||
temperature=temperature,
|
||||
seed=None if seed is None or int(seed) < 0 else int(seed),
|
||||
skip_special_tokens=skip_special_tokens,
|
||||
):
|
||||
response += new_text
|
||||
|
||||
Reference in New Issue
Block a user