Locutusque commited on
Commit
d363063
·
verified ·
1 Parent(s): 255b4b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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=False, top_p=top_p, min_p=min_p, top_k=top_k,
30
- temperature=temperature, num_beams=1, repetition_penalty=1.2, dola_layers="low")
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 = []