Add chat template

#2
by lewtun HF staff - opened
Files changed (2) hide show
  1. special_tokens_map.json +1 -1
  2. tokenizer_config.json +1 -0
special_tokens_map.json CHANGED
@@ -5,7 +5,7 @@
5
  "</s>"
6
  ],
7
  "bos_token": "<s>",
8
- "eos_token": "<unk>",
9
  "pad_token": "</s>",
10
  "unk_token": "<unk>"
11
  }
 
5
  "</s>"
6
  ],
7
  "bos_token": "<s>",
8
+ "eos_token": "</s>",
9
  "pad_token": "</s>",
10
  "unk_token": "<unk>"
11
  }
tokenizer_config.json CHANGED
@@ -31,6 +31,7 @@
31
  "</s>"
32
  ],
33
  "bos_token": "<s>",
 
34
  "clean_up_tokenization_spaces": false,
35
  "eos_token": "</s>",
36
  "legacy": true,
 
31
  "</s>"
32
  ],
33
  "bos_token": "<s>",
34
+ "chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
35
  "clean_up_tokenization_spaces": false,
36
  "eos_token": "</s>",
37
  "legacy": true,