VictorSanh Rocketknight1 HF staff commited on
Commit
ad0dd13
1 Parent(s): b56a945

Add chat template to processor_config.json (#2)

Browse files

- Add chat template to processor_config.json (75dc900c93303f650befe564da6177c833abc8d4)


Co-authored-by: Matthew Carrigan <Rocketknight1@users.noreply.huggingface.co>

Files changed (1) hide show
  1. processor_config.json +1 -0
processor_config.json CHANGED
@@ -1,4 +1,5 @@
1
  {
 
2
  "image_seq_len": 64,
3
  "processor_class": "Idefics2Processor"
4
  }
 
1
  {
2
+ "chat_template": "{% for message in messages %}{{message['role'].capitalize()}}{% if message['content'][0]['type'] == 'image' %}{{':'}}{% else %}{{': '}}{% endif %}{% for line in message['content'] %}{% if line['type'] == 'text' %}{{line['text']}}{% elif line['type'] == 'image' %}{{ '<image>' }}{% endif %}{% endfor %}<end_of_utterance>\n{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}",
3
  "image_seq_len": 64,
4
  "processor_class": "Idefics2Processor"
5
  }