Spaces:
Sleeping
Sleeping
Add missing bos/eos in the prompt format
Browse files
model.py
CHANGED
@@ -21,7 +21,7 @@ def get_prompt(message: str, chat_history: list[tuple[str, str]],
|
|
21 |
system_prompt: str) -> str:
|
22 |
texts = [f'[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
|
23 |
for user_input, response in chat_history:
|
24 |
-
texts.append(f'{user_input} [/INST] {response} [INST] ')
|
25 |
texts.append(f'{message.strip()} [/INST]')
|
26 |
return ''.join(texts)
|
27 |
|
|
|
21 |
system_prompt: str) -> str:
|
22 |
texts = [f'[INST] <<SYS>>\n{system_prompt}\n<</SYS>>\n\n']
|
23 |
for user_input, response in chat_history:
|
24 |
+
texts.append(f'{user_input} [/INST] {response} </s><s> [INST] ')
|
25 |
texts.append(f'{message.strip()} [/INST]')
|
26 |
return ''.join(texts)
|
27 |
|