diff --git a/src/llmtuner/extras/template.py b/src/llmtuner/extras/template.py index 5d5a03fb..c4cdb70a 100644 --- a/src/llmtuner/extras/template.py +++ b/src/llmtuner/extras/template.py @@ -472,9 +472,30 @@ register_template( r""" Supports: https://huggingface.co/baichuan-inc/Baichuan-13B-Chat +Used for training. """ register_template( name="baichuan", + prefix=[ + "{{system}}" + ], + prompt=[ + {"token": ""}, # user token + "{{query}}", + {"token": ""} # assistant token + ], + system="", + sep=[], + stop_words=[] +) + + +r""" +Supports: https://huggingface.co/baichuan-inc/Baichuan-13B-Chat +Used for inference of the original model. +""" +register_template( + name="baichuan_eval", prefix=[ "{{system}}", {"token": ""} # user token