dwb2023 commited on
Commit
f369df4
1 Parent(s): 408dc88

Update app.py

Browse files

update top k and top p parameters

Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -57,8 +57,8 @@ def generate(
57
  chat_history: list[tuple[str, str]],
58
  max_new_tokens: int = 1024,
59
  temperature: float = 0.1,
60
- top_p: float = 0.9,
61
- top_k: int = 50,
62
  repetition_penalty: float = 1.4,
63
  ) -> Iterator[str]:
64
 
@@ -111,7 +111,7 @@ chat_interface = gr.ChatInterface(
111
  ),
112
  gr.Slider(
113
  label="Temperature",
114
- minimum=0.1,
115
  maximum=4.0,
116
  step=0.1,
117
  value=0.1,
@@ -121,7 +121,7 @@ chat_interface = gr.ChatInterface(
121
  minimum=0.05,
122
  maximum=1.0,
123
  step=0.05,
124
- value=0.9,
125
  ),
126
  gr.Slider(
127
  label="Top-k",
 
57
  chat_history: list[tuple[str, str]],
58
  max_new_tokens: int = 1024,
59
  temperature: float = 0.1,
60
+ top_p: float = 0.5,
61
+ top_k: int = 3,
62
  repetition_penalty: float = 1.4,
63
  ) -> Iterator[str]:
64
 
 
111
  ),
112
  gr.Slider(
113
  label="Temperature",
114
+ minimum=0.0,
115
  maximum=4.0,
116
  step=0.1,
117
  value=0.1,
 
121
  minimum=0.05,
122
  maximum=1.0,
123
  step=0.05,
124
+ value=0.5,
125
  ),
126
  gr.Slider(
127
  label="Top-k",