fix baichuan template for training #597 #616

Former-commit-id: 6530c1d972301eac9ef058b3235618bb09833f15
This commit is contained in:
hiyouga 2023-08-21 17:41:51 +08:00
parent 8eec1d50e1
commit 516df9ecce

View File

@ -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": "<reserved_102>"}, # user token
"{{query}}",
{"token": "<reserved_103>"} # 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": "<reserved_102>"} # user token