diff --git a/templates/internlm2.jinja b/templates/internlm2.jinja index 40607ed..997ae5b 100644 --- a/templates/internlm2.jinja +++ b/templates/internlm2.jinja @@ -8,13 +8,13 @@ {%- set loop_messages = messages -%} {%- set system_message = 'You are an AI assistant whose name is InternLM (书生·浦语).\n- InternLM (书生·浦语) is a conversational language model that is developed by Shanghai AI Laboratory (上海人工智能实验室). It is designed to be helpful, honest, and harmless.\n- InternLM (书生·浦语) can understand and communicate fluently in the language chosen by the user such as English and 中文.' -%} {%- endif -%} -{{ '' + '[UNUSED_TOKEN_146]' + 'system' + '\n' + system_message + '[UNUSED_TOKEN_145]' + '\n' }} +{{ '' + '<|im_start|>' + 'system' + '\n' + system_message + '<|im_end|>' + '\n' }} {%- for message in loop_messages -%} - {{ '[UNUSED_TOKEN_146]' + message['role'] + '\n' + message['content']}} + {{ '<|im_start|>' + message['role'] + '\n' + message['content']}} {%- if (loop.last and add_generation_prompt) or not loop.last -%} - {{ '[UNUSED_TOKEN_145]' + '\n' }} + {{ '<|im_end|>' + '\n' }} {%- endif -%} {%- endfor -%} {%- if add_generation_prompt and messages[-1]['role'] != 'assistant' -%} - {{ '[UNUSED_TOKEN_146]' + 'assistant' + '\n' }} + {{ '<|im_start|>' + 'assistant' + '\n' }} {%- endif -%}