Spaces:
Running
on
Zero
Running
on
Zero
Locutusque
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -26,8 +26,8 @@ def generate(
|
|
26 |
else:
|
27 |
prompt = f"<|im_start|>user\n{user_input}<|im_end|>\n<|im_start|>assistant\n"
|
28 |
streamer = TextIteratorStreamer(pipe.tokenizer, timeout=240.0, skip_prompt=True, skip_special_tokens=True)
|
29 |
-
generation_kwargs = dict(text_inputs=prompt, streamer=streamer, max_new_tokens=max_new_tokens, do_sample=
|
30 |
-
temperature=temperature, num_beams=1, repetition_penalty=1.
|
31 |
t = Thread(target=pipe.__call__, kwargs=generation_kwargs)
|
32 |
t.start()
|
33 |
outputs = []
|
|
|
26 |
else:
|
27 |
prompt = f"<|im_start|>user\n{user_input}<|im_end|>\n<|im_start|>assistant\n"
|
28 |
streamer = TextIteratorStreamer(pipe.tokenizer, timeout=240.0, skip_prompt=True, skip_special_tokens=True)
|
29 |
+
generation_kwargs = dict(text_inputs=prompt, streamer=streamer, max_new_tokens=max_new_tokens, do_sample=True, top_p=top_p, min_p=min_p, top_k=top_k,
|
30 |
+
temperature=temperature, num_beams=1, repetition_penalty=1.1)
|
31 |
t = Thread(target=pipe.__call__, kwargs=generation_kwargs)
|
32 |
t.start()
|
33 |
outputs = []
|