From a7feab45d5d881ac80145efded82d5ce5061ddfd Mon Sep 17 00:00:00 2001 From: menibrief <66391712+menibrief@users.noreply.github.com> Date: Wed, 18 Sep 2024 23:52:30 +0300 Subject: [PATCH] fix phi-small template Former-commit-id: 48fb6bae6245dc6d5f72ebfc1c2bd9ffacd51b86 --- src/llamafactory/data/template.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index 54da4757..9490b6af 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -821,6 +821,15 @@ _register_template( replace_eos=True, ) +_register_template( + name="phi-small", + format_user=StringFormatter(slots=["<|user|>\n{{content}}<|end|>\n<|assistant|>\n"]), + format_system=StringFormatter(slots=["<|system|>\n{{content}}<|end|>\n"]), + format_separator=EmptyFormatter(slots=["\n"]), + format_prefix=EmptyFormatter(slots=[{"<|endoftext|>"}]), + stop_words=["<|end|>"], + replace_eos=True, +) _register_template( name="qwen",