Xenova HF staff commited on
Commit
1772afc
1 Parent(s): 6251a47

Add default chat template to tokenizer_config.json

Browse files

[Automated] This PR adds the default chat template to the tokenizer config, allowing the model to be used with the new conversational widget (see [PR](https://github.com/huggingface/huggingface.js/pull/457)).

If the default is not appropriate for your model, please set `tokenizer.chat_template` to an appropriate template. See https://huggingface.co/docs/transformers/main/chat_templating for more information.

Files changed (1) hide show
  1. tokenizer_config.json +12 -1
tokenizer_config.json CHANGED
@@ -1 +1,12 @@
1
- {"max_len": 1024, "bos_token": "<bos>", "eos_token": "<eos>", "unk_token": "<|endoftext|>", "pad_token": "<pad>", "additional_special_tokens": ["<speaker1>", "<speaker2>"]}
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "max_len": 1024,
3
+ "bos_token": "<bos>",
4
+ "eos_token": "<eos>",
5
+ "unk_token": "<|endoftext|>",
6
+ "pad_token": "<pad>",
7
+ "additional_special_tokens": [
8
+ "<speaker1>",
9
+ "<speaker2>"
10
+ ],
11
+ "chat_template": "{% for message in messages %}{{ message.content }}{{ eos_token }}{% endfor %}"
12
+ }