Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix prompt format mismatch with huggingface
1. System prompt: remove <s> => token [1] is generated by default. 2. End of System prompt: Before: -> After \n\n \n\n""" """ => Origin code implies three \n. 3. Fix append_user_prompt & append_bot_prompt to match behavior of `tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)` Correct Format for LLama2: ``` <s>[INST] <<SYS>> {{ system_prompt }} <</SYS>> {{ user_msg_1 }} [/INST] {{ model_answer_1 }} </s><s>[INST] {{ user_msg_2 }} [/INST] ``` Signed-off-by: Bruce Lai <bruce.lai@sifive.com>
- Loading branch information