peder
commited on
Commit
·
7f12b65
1
Parent(s):
4ce9c48
top k removed
Browse files
app.py
CHANGED
@@ -200,17 +200,17 @@ def main():
|
|
200 |
help="The maximum length of the sequence to be generated.",
|
201 |
min_value=1,
|
202 |
max_value=MAX_LENGTH,
|
203 |
-
value=int(query_params.get("max_length", [
|
204 |
-
step=1
|
205 |
-
)
|
206 |
-
top_k = st.sidebar.slider(
|
207 |
-
label='Top-k',
|
208 |
-
help="The number of highest probability vocabulary tokens to keep for top-k-filtering",
|
209 |
-
min_value=40,
|
210 |
-
max_value=80,
|
211 |
-
value=int(query_params.get("top_k", [50])[0]),
|
212 |
step=1
|
213 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
top_p = st.sidebar.slider(
|
215 |
label='Top-p',
|
216 |
help="Only the most probable tokens with probabilities that add up to `top_p` or higher are kept for "
|
@@ -237,7 +237,7 @@ def main():
|
|
237 |
)
|
238 |
generation_kwargs = {
|
239 |
"max_length": max_length,
|
240 |
-
"top_k": top_k,
|
241 |
"top_p": top_p,
|
242 |
"temperature": temperature,
|
243 |
"do_sample": do_sample,
|
|
|
200 |
help="The maximum length of the sequence to be generated.",
|
201 |
min_value=1,
|
202 |
max_value=MAX_LENGTH,
|
203 |
+
value=int(query_params.get("max_length", [256])[0]),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
step=1
|
205 |
)
|
206 |
+
# top_k = st.sidebar.slider(
|
207 |
+
# label='Top-k',
|
208 |
+
# help="The number of highest probability vocabulary tokens to keep for top-k-filtering",
|
209 |
+
# min_value=40,
|
210 |
+
# max_value=80,
|
211 |
+
# value=int(query_params.get("top_k", [50])[0]),
|
212 |
+
# step=1
|
213 |
+
# )
|
214 |
top_p = st.sidebar.slider(
|
215 |
label='Top-p',
|
216 |
help="Only the most probable tokens with probabilities that add up to `top_p` or higher are kept for "
|
|
|
237 |
)
|
238 |
generation_kwargs = {
|
239 |
"max_length": max_length,
|
240 |
+
# "top_k": top_k,
|
241 |
"top_p": top_p,
|
242 |
"temperature": temperature,
|
243 |
"do_sample": do_sample,
|