support InternLM

Former-commit-id: a454ef7d57d9c06302d51464cfe39f6d0c48c5a8
This commit is contained in:
hiyouga
2023-07-07 11:02:28 +08:00
parent 601b1747d1
commit 113cdaf1cb
3 changed files with 15 additions and 2 deletions

View File

@@ -114,6 +114,17 @@ class Template:
use_history=True
)
elif self.name == "intern":
r"""
Supports: https://huggingface.co/internlm/internlm-chat-7b
"""
self._register_template(
prefix="",
prompt="<|User|>:{query}<eoh>\n<|Bot|>:",
sep="<eoa>\n",
use_history=True
)
else:
raise ValueError("Template {} does not exist.".format(self.name))