Skip to content

Commit

Permalink
Add Phi 3.5 chat template (#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricLBuehler authored Sep 1, 2024
1 parent 35b953e commit db88c11
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions chat_templates/phi3.5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' and message['content'] %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}"
}

0 comments on commit db88c11

Please sign in to comment.