Spaces:
Sleeping
Sleeping
Update app.py
Browse filesupdate top k and top p parameters
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.
|
61 |
-
top_k: int =
|
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.
|
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.
|
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",
|