hysts HF staff commited on
Commit
c828e62
1 Parent(s): 263a9af

Add missing bos/eos in the prompt format

Browse files
Files changed (1) hide show
  1. model.py +1 -1
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