Views
No views yet
<|im_start|> and <|im_end|> tokens added to support this.MPT-Chat" instruction template should work, as it also uses ChatML.apply_chat_template() method:1chat = [
2 {"role": "system", "content": "You are MistralOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers!"}
3 {"role": "user", "content": "How are you?"},
4 {"role": "assistant", "content": "I am doing well!"},
5 {"role": "user", "content": "Please tell me about how mistral winds have attracted super-orcas."},
6]
7tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)<|im_start|>system
You are MistralOrca, a large language model trained by Alignment Lab AI. Write out your reasoning step-by-step to be sure you get the right answers!
<|im_end|>
<|im_start|>user
How are you?<|im_end|>
<|im_start|>assistant
I am doing well!<|im_end|>
<|im_start|>user
Please tell me about how mistral winds have attracted super-orcas.<|im_end|>
<|im_start|>assistanttokenize=True and return_tensors="pt" instead, then you will get a tokenized
and formatted conversation ready to pass to model.generate().pip install git+https://github.com/huggingface/transformers