mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-01-13 09:30:34 +08:00
[model] support for microsoft's Phi-4-mini (#9734)
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -2443,6 +2443,15 @@ register_model_group(
|
||||
template="phi4",
|
||||
)
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Phi-4-3.8B-instruct": {
|
||||
DownloadSource.DEFAULT: "microsoft/Phi-4-mini-instruct",
|
||||
DownloadSource.MODELSCOPE: "LLM-Research/Phi-4-mini-instruct",
|
||||
},
|
||||
},
|
||||
template="phi4_mini",
|
||||
)
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
|
||||
Reference in New Issue
Block a user