support chatglm3

Former-commit-id: ba82e13bbeed3b262d301196b1860d73f319401d
This commit is contained in:
hiyouga
2023-10-27 19:16:28 +08:00
parent c762168ed0
commit f7635c1afc
3 changed files with 24 additions and 2 deletions

View File

@@ -558,6 +558,28 @@ register_template(
)
r"""
Supports: https://huggingface.co/THUDM/chatglm3-6b
"""
register_template(
name="chatglm3",
prefix=[
{"token": "[gMASK]"},
{"token": "sop"},
"{{system}}"
],
prompt=[
{"token": "<|user|>"},
"\n",
"{{query}}",
{"token": "<|assistant|>"}
],
system="",
sep=[],
efficient_eos=True
)
r"""
Supports: https://huggingface.co/openchat/openchat_v3.2_super
"""