ThiloteE commited on
Commit
8132901
1 Parent(s): ba1cf18

Add Space in chat template. Not sure, if correct.

Browse files

Hello, I tried this model with Nomics GPT4All-Chat version 3.5.1 that features a jinja template and encountered syntax issues. I am not sure, if GPT4All is wrong or if the chat template in this repo contains a typo. Please advise, if the space should be added or not.

See https://github.com/nomic-ai/gpt4all/issues/3263.

Files changed (1) hide show
  1. tokenizer_config.json +1 -1
tokenizer_config.json CHANGED
@@ -28,7 +28,7 @@
28
  },
29
  "additional_special_tokens": ["<|im_start|>", "<|im_end|>"],
30
  "bos_token": null,
31
- "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
32
  "clean_up_tokenization_spaces": false,
33
  "eos_token": "<|im_end|>",
34
  "errors": "replace",
 
28
  },
29
  "additional_special_tokens": ["<|im_start|>", "<|im_end|>"],
30
  "bos_token": null,
31
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
32
  "clean_up_tokenization_spaces": false,
33
  "eos_token": "<|im_end|>",
34
  "errors": "replace",