support chatglm3

Former-commit-id: 1c0ab9a908
This commit is contained in:
hiyouga
2023-10-27 19:16:28 +08:00
parent fcfcac4858
commit 8a76b1e499
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
"""