Text Generation
Transformers
Safetensors
English
olmo3
conversational
owao commited on
Commit
121468c
·
verified ·
1 Parent(s): fa4d9b4

chat template: strip out `assistant\n`?

Browse files

Hey guys, I don't know if what I did is right, but I needed to get rid of the `assistant\n` prefix for each responses.
Despite being a minimal change, just adding `.lstrip("assistant\n")`, I have no idea if this is a good solution. Adapting those jinja templates drive me mad every single time, so the less I deal with them the better I feel lol.

In all case, thanks for offering the fruit of your work to the community! The fully open model gap has finally been filled 🙏 And I'm thrilled to try it out now :)

Files changed (1) hide show
  1. chat_template.jinja +1 -1
chat_template.jinja CHANGED
@@ -13,4 +13,4 @@ You are a helpful AI assistant.<|im_end|>
13
  ' }}{% else %}{{ eos_token }}{% endif %}{% elif message['role'] == 'environment' %}{{ '<|im_start|>environment
14
  ' + message['content'] + '<|im_end|>
15
  ' }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|im_start|>assistant
16
- <think>' }}{% endif %}{% endfor %}
 
13
  ' }}{% else %}{{ eos_token }}{% endif %}{% elif message['role'] == 'environment' %}{{ '<|im_start|>environment
14
  ' + message['content'] + '<|im_end|>
15
  ' }}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|im_start|>assistant
16
+ <think>' }.lstrip("assistant\n")}{% endif %}{% endfor %}