The chat template has been corrected.
#86
by
SalmanFaroz
- opened
This revision results in an correct chat template for users. Previously, there were extraneous quotes, but these have now been rectified in the current version.
Looks weird to me. Is it natural to have multiple end-of-sentence token?
print(tokenizer.apply_chat_template([{'role':'user','content':'inst1'},{'role':'assistant','content':'aswer1'}, {'role':'user','content':'inst2'},{'role':'assistant','content':'answ2'}],tokenize=False,add_generation_prompt=False))
<s>[INST] inst1 [/INST]aswer1</s> [INST] inst2 [/INST]answ2</s>
Regards
@habanoz In the example, the content was intended to be assigned to a variable named "text" in its whole, for demonstrating the chat template of Mistral , but several quotes were mistakenly added.