[model] support for microsoft's Phi-4-mini (#9734)

This commit is contained in:
Jackey
2026-01-09 12:24:45 +08:00
committed by GitHub
parent 03a70ba8dd
commit 5fb5d7ebd3
4 changed files with 22 additions and 2 deletions

View File

@@ -1910,6 +1910,17 @@ register_template(
)
register_template(
name="phi4_mini",
format_user=StringFormatter(slots=["<|user|>{{content}}<|end|><|assistant|>"]),
format_assistant=StringFormatter(slots=["{{content}}<|end|>"]),
format_system=StringFormatter(slots=["<|system|>{{content}}<|end|>"]),
format_tools=StringFormatter(slots=["<|tool|>{{content}}<|/tool|>"]),
stop_words=["<|end|>"],
replace_eos=True,
)
# copied from ministral template
register_template(
name="pixtral",