Skip to content

Commit 46e772f

Browse files
authored
Update MFTCoder chat template
1 parent 929c11b commit 46e772f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mftcoder_accelerate/src/tokenizer/chat_template.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@
4242
"{% set content = '' %}"
4343
"{% endif %}"
4444
"{% if message['role'] == 'user' or message['role'] == 'human' %}"
45-
"{{ content + '<s>user\n' + message['content'] + '\n' }}"
45+
"{{ content + '<s>human\n' + message['content'] + '\n' }}"
4646
"{% elif message['role'] == 'assistant' or message['role'] == 'bot' %}"
47-
"{{ '<s>assistant\n' + message['content'] + '\n' + eos_token + '\n'}}"
47+
"{{ '<s>bot\n' + message['content'] + '\n' + eos_token + '\n'}}"
4848
"{% else %}"
4949
"{{ raise_exception('Only user/human and assistant/bot roles are supported!') }}"
5050
"{% endif %}"
5151
"{% endfor %}"
5252
"{% if add_generation_prompt %}"
53-
"{{ '<s>assistant\n' }}"
53+
"{{ '<s>bot\n' }}"
5454
"{% endif %}"
5555
)
5656

0 commit comments

Comments
 (0)