Update app.py
Browse files
app.py
CHANGED
@@ -24,6 +24,8 @@ def run(message, chat_history, system_prompt, max_new_tokens=1024, temperature=0
|
|
24 |
top_p=top_p, # Nucleus sampling: higher values allow more diversity.
|
25 |
top_k=top_k, # Top-k sampling: limits the number of top tokens considered.
|
26 |
pad_token_id=tokenizer.eos_token_id
|
|
|
|
|
27 |
)
|
28 |
|
29 |
# Decode the response
|
|
|
24 |
top_p=top_p, # Nucleus sampling: higher values allow more diversity.
|
25 |
top_k=top_k, # Top-k sampling: limits the number of top tokens considered.
|
26 |
pad_token_id=tokenizer.eos_token_id
|
27 |
+
do_sample=True # Enable sampling-based generation
|
28 |
+
|
29 |
)
|
30 |
|
31 |
# Decode the response
|