Text Generation
Transformers
PyTorch
Safetensors
English
hf_olmo
conversational
custom_code
hamishivi commited on
Commit
f09de2d
1 Parent(s): b0d8450

Add chat template

Browse files
Files changed (1) hide show
  1. tokenizer_config.json +2 -1
tokenizer_config.json CHANGED
@@ -238,5 +238,6 @@
238
  "tokenization_olmo_fast.OLMoTokenizerFast",
239
  "tokenization_olmo_fast.OLMoTokenizerFast"
240
  ]
241
- }
 
242
  }
 
238
  "tokenization_olmo_fast.OLMoTokenizerFast",
239
  "tokenization_olmo_fast.OLMoTokenizerFast"
240
  ]
241
+ },
242
+ "chat_template": "{{ eos_token }}{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] }}\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 %}"
243
  }