KvrParaskevi commited on
Commit
6d0fb48
·
verified ·
1 Parent(s): 212f7f3

Add generation arguments

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -30,6 +30,15 @@ llm = HuggingFaceEndpoint(
30
 
31
  client = InferenceClient(endpoint_url, token=token)
32
 
 
 
 
 
 
 
 
 
 
33
  def chat_template_prompt():
34
  template = """
35
  Do not repeat questions and do not generate answer for user/human.Do not repeat yourself and do not create/generate dialogues.
 
30
 
31
  client = InferenceClient(endpoint_url, token=token)
32
 
33
+ gen_kwargs = dict(
34
+ max_new_tokens=128,
35
+ top_k=30,
36
+ top_p=0.95,
37
+ temperature=0.01,
38
+ repetition_penalty=1.02,
39
+ stop_sequences=["\nUser:", "<|endoftext|>", "</s>", "\nHuman:"],
40
+ )
41
+
42
  def chat_template_prompt():
43
  template = """
44
  Do not repeat questions and do not generate answer for user/human.Do not repeat yourself and do not create/generate dialogues.