|
61 | 61 | parser.add_argument( |
62 | 62 | "--chat_sys_prompt", |
63 | 63 | type=str, |
64 | | - default="""<s>[INST] <<SYS>> |
65 | | -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 <</SYS>>\n\n |
66 | | -""", |
| 64 | + default="""[INST] <<SYS>> |
| 65 | +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<</SYS>>\n\n""", |
67 | 66 | help="System prompt used for interactive chat mode.", |
68 | 67 | ) |
69 | 68 |
|
70 | 69 | B_INST, E_INST = "[INST]", "[/INST]" |
71 | 70 | B_SYS, E_SYS = "<s>", "</s>" |
72 | | -DEFAULT_CHAT_SYS_PROMPT = """<s>[INST] <<SYS>> |
73 | | -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 <</SYS>>\n\n |
74 | | -""" |
| 71 | +DEFAULT_CHAT_SYS_PROMPT = """[INST] <<SYS>> |
| 72 | +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<</SYS>>\n\n""" |
75 | 73 |
|
76 | 74 |
|
77 | 75 | def append_user_prompt(history, input_prompt): |
78 | | - user_prompt = f"{B_INST} {input_prompt} {E_INST}" |
| 76 | + user_prompt = f"{input_prompt} {E_INST}" |
79 | 77 | history += user_prompt |
80 | 78 | return history |
81 | 79 |
|
82 | 80 |
|
83 | 81 | def append_bot_prompt(history, input_prompt): |
84 | | - user_prompt = f"{B_SYS} {input_prompt}{E_SYS} {E_SYS}" |
| 82 | + user_prompt = f"{input_prompt} {E_SYS}{B_SYS}{B_INST}" |
85 | 83 | history += user_prompt |
86 | 84 | return history |
87 | 85 |
|
|
0 commit comments