Spaces:
Build error
Build error
Add page title and generation slider info
Browse files
main.py
CHANGED
@@ -269,7 +269,10 @@ def tokenize_and_train(
|
|
269 |
return result
|
270 |
|
271 |
|
272 |
-
with gr.Blocks(
|
|
|
|
|
|
|
273 |
with gr.Tab("Finetuning"):
|
274 |
|
275 |
with gr.Column():
|
@@ -379,31 +382,31 @@ with gr.Blocks(css="#refresh-button { max-width: 32px }") as demo:
|
|
379 |
temperature = gr.Slider(
|
380 |
minimum=0, maximum=1.99, value=0.7, step=0.01,
|
381 |
label="Temperature",
|
382 |
-
info=""
|
383 |
)
|
384 |
|
385 |
top_p = gr.Slider(
|
386 |
minimum=0, maximum=1, value=0.2, step=0.01,
|
387 |
label="Top P",
|
388 |
-
info=""
|
389 |
)
|
390 |
|
391 |
top_k = gr.Slider(
|
392 |
minimum=0, maximum=200, value=50, step=1,
|
393 |
label="Top K",
|
394 |
-
info=""
|
395 |
)
|
396 |
|
397 |
repeat_penalty = gr.Slider(
|
398 |
minimum=0, maximum=1.5, value=0.8, step=0.01,
|
399 |
label="Repeat Penalty",
|
400 |
-
info=""
|
401 |
)
|
402 |
|
403 |
max_new_tokens = gr.Slider(
|
404 |
minimum=0, maximum=4096, value=50, step=1,
|
405 |
label="Max New Tokens",
|
406 |
-
info=""
|
407 |
)
|
408 |
with gr.Column():
|
409 |
with gr.Row():
|
|
|
269 |
return result
|
270 |
|
271 |
|
272 |
+
with gr.Blocks(
|
273 |
+
css="#refresh-button { max-width: 32px }",
|
274 |
+
title="Simple LLaMA Finetuner") as demo:
|
275 |
+
|
276 |
with gr.Tab("Finetuning"):
|
277 |
|
278 |
with gr.Column():
|
|
|
382 |
temperature = gr.Slider(
|
383 |
minimum=0, maximum=1.99, value=0.7, step=0.01,
|
384 |
label="Temperature",
|
385 |
+
info="Controls the 'temperature' of the softmax distribution during sampling. Higher values (e.g., 1.0) make the model generate more diverse and random outputs, while lower values (e.g., 0.1) make it more deterministic and focused on the highest probability tokens."
|
386 |
)
|
387 |
|
388 |
top_p = gr.Slider(
|
389 |
minimum=0, maximum=1, value=0.2, step=0.01,
|
390 |
label="Top P",
|
391 |
+
info="Sets the nucleus sampling threshold. In nucleus sampling, only the tokens whose cumulative probability exceeds 'top_p' are considered for sampling. This technique helps to reduce the number of low probability tokens considered during sampling, which can lead to more diverse and coherent outputs."
|
392 |
)
|
393 |
|
394 |
top_k = gr.Slider(
|
395 |
minimum=0, maximum=200, value=50, step=1,
|
396 |
label="Top K",
|
397 |
+
info="Sets the number of top tokens to consider during sampling. In top-k sampling, only the 'top_k' tokens with the highest probabilities are considered for sampling. This method can lead to more focused and coherent outputs by reducing the impact of low probability tokens."
|
398 |
)
|
399 |
|
400 |
repeat_penalty = gr.Slider(
|
401 |
minimum=0, maximum=1.5, value=0.8, step=0.01,
|
402 |
label="Repeat Penalty",
|
403 |
+
info="Applies a penalty to the probability of tokens that have already been generated, discouraging the model from repeating the same words or phrases. The penalty is applied by dividing the token probability by a factor based on the number of times the token has appeared in the generated text."
|
404 |
)
|
405 |
|
406 |
max_new_tokens = gr.Slider(
|
407 |
minimum=0, maximum=4096, value=50, step=1,
|
408 |
label="Max New Tokens",
|
409 |
+
info="Limits the maximum number of tokens generated in a single iteration."
|
410 |
)
|
411 |
with gr.Column():
|
412 |
with gr.Row():
|