diff --git a/models/turbine_models/custom_models/llm_runner.py b/models/turbine_models/custom_models/llm_runner.py index d16e2250..0188e702 100644 --- a/models/turbine_models/custom_models/llm_runner.py +++ b/models/turbine_models/custom_models/llm_runner.py @@ -61,27 +61,25 @@ parser.add_argument( "--chat_sys_prompt", type=str, - default="""[INST] <> -Be concise. You are a helpful, respectful and honest assistant. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n <>\n\n -""", + default="""[INST] <> +Be concise. You are a helpful, respectful and honest assistant. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n<>\n\n""", help="System prompt used for interactive chat mode.", ) B_INST, E_INST = "[INST]", "[/INST]" B_SYS, E_SYS = "", "" -DEFAULT_CHAT_SYS_PROMPT = """[INST] <> -Be concise. You are a helpful, respectful and honest assistant. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n <>\n\n -""" +DEFAULT_CHAT_SYS_PROMPT = """[INST] <> +Be concise. You are a helpful, respectful and honest assistant. If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.\n<>\n\n""" def append_user_prompt(history, input_prompt): - user_prompt = f"{B_INST} {input_prompt} {E_INST}" + user_prompt = f"{input_prompt} {E_INST}" history += user_prompt return history def append_bot_prompt(history, input_prompt): - user_prompt = f"{B_SYS} {input_prompt}{E_SYS} {E_SYS}" + user_prompt = f"{input_prompt} {E_SYS}{B_SYS}{B_INST}" history += user_prompt return history