Spaces:
Running
on
Zero
Running
on
Zero
Daemontatox
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -145,9 +145,9 @@ def chat_response(
|
|
145 |
chat_display: str,
|
146 |
system_prompt: str,
|
147 |
temperature: float = 0.2,
|
148 |
-
max_new_tokens: int =
|
149 |
-
top_p: float =
|
150 |
-
top_k: int =
|
151 |
penalty: float = 1.2,
|
152 |
):
|
153 |
"""Generate chat responses, keeping tags visible in the output"""
|
@@ -249,28 +249,28 @@ def main():
|
|
249 |
minimum=0,
|
250 |
maximum=1,
|
251 |
step=0.1,
|
252 |
-
value=
|
253 |
label="Temperature",
|
254 |
)
|
255 |
max_tokens = gr.Slider(
|
256 |
minimum=128,
|
257 |
maximum=32000,
|
258 |
step=128,
|
259 |
-
value=
|
260 |
label="Max Tokens",
|
261 |
)
|
262 |
top_p = gr.Slider(
|
263 |
minimum=0.1,
|
264 |
maximum=1.0,
|
265 |
step=0.1,
|
266 |
-
value=
|
267 |
label="Top-p",
|
268 |
)
|
269 |
top_k = gr.Slider(
|
270 |
minimum=1,
|
271 |
maximum=100,
|
272 |
step=1,
|
273 |
-
value=
|
274 |
label="Top-k",
|
275 |
)
|
276 |
penalty = gr.Slider(
|
|
|
145 |
chat_display: str,
|
146 |
system_prompt: str,
|
147 |
temperature: float = 0.2,
|
148 |
+
max_new_tokens: int = 4000,
|
149 |
+
top_p: float = 0.8,
|
150 |
+
top_k: int = 40,
|
151 |
penalty: float = 1.2,
|
152 |
):
|
153 |
"""Generate chat responses, keeping tags visible in the output"""
|
|
|
249 |
minimum=0,
|
250 |
maximum=1,
|
251 |
step=0.1,
|
252 |
+
value=0.2,
|
253 |
label="Temperature",
|
254 |
)
|
255 |
max_tokens = gr.Slider(
|
256 |
minimum=128,
|
257 |
maximum=32000,
|
258 |
step=128,
|
259 |
+
value=4000,
|
260 |
label="Max Tokens",
|
261 |
)
|
262 |
top_p = gr.Slider(
|
263 |
minimum=0.1,
|
264 |
maximum=1.0,
|
265 |
step=0.1,
|
266 |
+
value=0.8,
|
267 |
label="Top-p",
|
268 |
)
|
269 |
top_k = gr.Slider(
|
270 |
minimum=1,
|
271 |
maximum=100,
|
272 |
step=1,
|
273 |
+
value=40,
|
274 |
label="Top-k",
|
275 |
)
|
276 |
penalty = gr.Slider(
|