support phi-3

This commit is contained in:
hiyouga
2024-04-24 00:28:53 +08:00
parent 2efd9b6ba0
commit 1a13f05555
4 changed files with 29 additions and 4 deletions

View File

@@ -718,6 +718,15 @@ _register_template(
)
_register_template(
name="phi",
format_user=StringFormatter(slots=["<|user|>\n{{content}}<|end|>\n<|assistant|>\n"]),
format_system=StringFormatter(slots=[{"bos_token"}, "<|system|>\n{{content}}<|end|>\n"]),
format_separator=EmptyFormatter(slots=["<|end|>\n"]),
default_system="You are a helpful AI assistant.",
)
_register_template(
name="qwen",
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),