mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-02 19:52:50 +08:00
[model] add MIMO_VL (#8249)
This commit is contained in:
parent
fba9c9d9b9
commit
65aa86ed39
@ -1071,6 +1071,7 @@ register_template(
|
|||||||
stop_words=["<|im_end|>"],
|
stop_words=["<|im_end|>"],
|
||||||
thought_words=("◁think▷", "◁/think▷"),
|
thought_words=("◁think▷", "◁/think▷"),
|
||||||
mm_plugin=get_mm_plugin("kimi_vl", image_token="<|media_pad|>"),
|
mm_plugin=get_mm_plugin("kimi_vl", image_token="<|media_pad|>"),
|
||||||
|
template_class=ReasoningTemplate,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -1354,6 +1355,24 @@ register_template(
|
|||||||
template_class=ReasoningTemplate,
|
template_class=ReasoningTemplate,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# copied from qwen2vl
|
||||||
|
register_template(
|
||||||
|
name="mimo_vl",
|
||||||
|
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
|
||||||
|
format_assistant=StringFormatter(slots=["{{content}}<|im_end|>\n"]),
|
||||||
|
format_system=StringFormatter(slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]),
|
||||||
|
format_function=FunctionFormatter(slots=["{{content}}<|im_end|>\n"], tool_format="qwen"),
|
||||||
|
format_observation=StringFormatter(
|
||||||
|
slots=["<|im_start|>user\n<tool_response>\n{{content}}\n</tool_response><|im_end|>\n<|im_start|>assistant\n"]
|
||||||
|
),
|
||||||
|
format_tools=ToolFormatter(tool_format="qwen"),
|
||||||
|
default_system="You are MiMo, an AI assistant developed by Xiaomi.",
|
||||||
|
stop_words=["<|im_end|>"],
|
||||||
|
replace_eos=True,
|
||||||
|
mm_plugin=get_mm_plugin(name="qwen2_vl", image_token="<|image_pad|>", video_token="<|video_pad|>"),
|
||||||
|
template_class=ReasoningTemplate,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# copied from chatml template
|
# copied from chatml template
|
||||||
register_template(
|
register_template(
|
||||||
@ -1695,15 +1714,9 @@ register_template(
|
|||||||
|
|
||||||
register_template(
|
register_template(
|
||||||
name="smollm2",
|
name="smollm2",
|
||||||
format_system=StringFormatter(
|
format_system=StringFormatter(slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]),
|
||||||
slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]
|
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
|
||||||
),
|
format_assistant=StringFormatter(slots=["{{content}}<|im_end|>\n"]),
|
||||||
format_user=StringFormatter(
|
|
||||||
slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]
|
|
||||||
),
|
|
||||||
format_assistant=StringFormatter(
|
|
||||||
slots=["{{content}}<|im_end|>\n"]
|
|
||||||
),
|
|
||||||
stop_words=["<|im_end|>"],
|
stop_words=["<|im_end|>"],
|
||||||
default_system="You are a helpful AI assistant named SmolLM, trained by Hugging Face.",
|
default_system="You are a helpful AI assistant named SmolLM, trained by Hugging Face.",
|
||||||
)
|
)
|
||||||
|
@ -1460,6 +1460,22 @@ register_model_group(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_model_group(
|
||||||
|
models={
|
||||||
|
"MiMo-7B-VL-Instruct": {
|
||||||
|
DownloadSource.DEFAULT: "XiaomiMiMo/MiMo-VL-7B-SFT",
|
||||||
|
DownloadSource.MODELSCOPE: "XiaomiMiMo/MiMo-VL-7B-SFT",
|
||||||
|
},
|
||||||
|
"MiMo-7B-VL-RL": {
|
||||||
|
DownloadSource.DEFAULT: "XiaomiMiMo/MiMo-VL-7B-RL",
|
||||||
|
DownloadSource.MODELSCOPE: "XiaomiMiMo/MiMo-VL-7B-RL",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
template="mimo_vl",
|
||||||
|
multimodal=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
register_model_group(
|
register_model_group(
|
||||||
models={
|
models={
|
||||||
"MiniCPM-2B-SFT-Chat": {
|
"MiniCPM-2B-SFT-Chat": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user