mrfakename commited on
Commit
34a9d5d
1 Parent(s): c18e274

Add chat template

Browse files

Will show chat UI in HF inference widget

Files changed (1) hide show
  1. tokenizer_config.json +3 -2
tokenizer_config.json CHANGED
@@ -319,5 +319,6 @@
319
  "eos_token": "<|endoftext|>",
320
  "model_max_length": 2048,
321
  "tokenizer_class": "CodeGenTokenizer",
322
- "unk_token": "<|endoftext|>"
323
- }
 
 
319
  "eos_token": "<|endoftext|>",
320
  "model_max_length": 2048,
321
  "tokenizer_class": "CodeGenTokenizer",
322
+ "unk_token": "<|endoftext|>",
323
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}"
324
+ }