add baichuan template

Former-commit-id: 22273b3f7ce3b4c13e9e3f3677181d1a6a0f9c84
This commit is contained in:
hiyouga
2023-07-11 18:57:50 +08:00
parent 1aa0997391
commit cc290a41e6
2 changed files with 12 additions and 1 deletions

View File

@@ -125,6 +125,17 @@ class Template:
use_history=True
)
elif self.name == "baichuan":
r"""
Supports: https://huggingface.co/baichuan-inc/Baichuan-13B-Chat
"""
self._register_template(
prefix="",
prompt="<reserved_102>{query}<reserved_103>",
sep="",
use_history=True
)
else:
raise ValueError("Template {} does not exist.".format(self.name))