Skip to content

Commit

Permalink
fix zephyr template
Browse files Browse the repository at this point in the history
  • Loading branch information
hamishivi committed Nov 19, 2023
1 parent 4a2e9dd commit 65c6f40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eval/templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def create_prompt_with_zephyr_chat_format(messages, bos="<s>", eos="</s>", add_b

for message in messages:
if message["role"] == "system":
formatted_text += "<|system|>\n" + message["content"] + "\n"
formatted_text += "<|system|>\n" + message["content"] + eos + "\n"
elif message["role"] == "user":
formatted_text += "<|user|>\n" + message["content"] + "\n"
formatted_text += "<|user|>\n" + message["content"] + eos + "\n"
elif message["role"] == "assistant":
formatted_text += "<|assistant|>\n" + message["content"] + eos + "\n"
else:
Expand Down

0 comments on commit 65c6f40

Please sign in to comment.