feat: add chat template for internlm2-chat (#802)

This commit is contained in:
Yineng Zhang
2024-07-30 05:18:03 +10:00
committed by GitHub
parent 7d352b4fdd
commit 3d1cb0af83

View File

@@ -436,3 +436,14 @@ register_conv_template(
sep2="</s>",
)
)
# Reference: https://github.com/InternLM/lmdeploy/blob/387bf54b4f124e72aab30ae9755f562e435d3d01/lmdeploy/model.py#L425-L442
register_conv_template(
Conversation(
name="internlm2-chat",
system_template="<|im_start|>system\n{system_message}",
roles=("<|im_start|>user", "<|im_start|>assistant"),
sep="\n",
stop_str=["<|im_end|>", "<|action_end|>"],
)
)