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:
@@ -317,7 +317,7 @@ Read technical notes:
|
||||
| [PaliGemma/PaliGemma2](https://huggingface.co/google) | 3B/10B/28B | paligemma |
|
||||
| [Phi-3/Phi-3.5](https://huggingface.co/microsoft) | 4B/14B | phi |
|
||||
| [Phi-3-small](https://huggingface.co/microsoft) | 7B | phi_small |
|
||||
| [Phi-4](https://huggingface.co/microsoft) | 14B | phi4 |
|
||||
| [Phi-4-mini/Phi-4](https://huggingface.co/microsoft) | 3.8B/14B | phi4_mini/phi4 |
|
||||
| [Pixtral](https://huggingface.co/mistralai) | 12B | pixtral |
|
||||
| [Qwen (1-2.5) (Code/Math/MoE/QwQ)](https://huggingface.co/Qwen) | 0.5B/1.5B/3B/7B/14B/32B/72B/110B | qwen |
|
||||
| [Qwen3 (MoE/Instruct/Thinking/Next)](https://huggingface.co/Qwen) | 0.6B/1.7B/4B/8B/14B/32B/80B/235B | qwen3/qwen3_nothink |
|
||||
|
||||
@@ -319,7 +319,7 @@ https://github.com/user-attachments/assets/43b700c6-a178-41db-b1f8-8190a5d3fcfc
|
||||
| [PaliGemma/PaliGemma2](https://huggingface.co/google) | 3B/10B/28B | paligemma |
|
||||
| [Phi-3/Phi-3.5](https://huggingface.co/microsoft) | 4B/14B | phi |
|
||||
| [Phi-3-small](https://huggingface.co/microsoft) | 7B | phi_small |
|
||||
| [Phi-4](https://huggingface.co/microsoft) | 14B | phi4 |
|
||||
| [Phi-4-mini/Phi-4](https://huggingface.co/microsoft) | 3.8B/14B | phi4_mini/phi4 |
|
||||
| [Pixtral](https://huggingface.co/mistralai) | 12B | pixtral |
|
||||
| [Qwen (1-2.5) (Code/Math/MoE/QwQ)](https://huggingface.co/Qwen) | 0.5B/1.5B/3B/7B/14B/32B/72B/110B | qwen |
|
||||
| [Qwen3 (MoE/Instruct/Thinking/Next)](https://huggingface.co/Qwen) | 0.6B/1.7B/4B/8B/14B/32B/80B/235B | qwen3/qwen3_nothink |
|
||||
|
||||
@@ -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