Update app.py
Browse files
app.py
CHANGED
@@ -118,6 +118,7 @@ def hermes_generate_response(msg_prompt: str) -> dict:
|
|
118 |
Returns:
|
119 |
dict: A dictionary containing the user's message prompt and the model's response.
|
120 |
"""
|
|
|
121 |
pipe = pipeline("text-generation",model=model, tokenizer=tokenizer, **generation_params)
|
122 |
try:
|
123 |
prompt_template=f'''<|im_start|>system
|
|
|
118 |
Returns:
|
119 |
dict: A dictionary containing the user's message prompt and the model's response.
|
120 |
"""
|
121 |
+
generation_params = {"do_sample": True,"temperature": 0.7,"top_p": 0.95,"top_k": 40,"max_new_tokens": 512,"repetition_penalty": 1.1}
|
122 |
pipe = pipeline("text-generation",model=model, tokenizer=tokenizer, **generation_params)
|
123 |
try:
|
124 |
prompt_template=f'''<|im_start|>system
|