mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-02 19:52:50 +08:00
[model] add smollm2 support (#8220)
This commit is contained in:
parent
762c2d776f
commit
21829b5eaf
@ -1693,6 +1693,22 @@ register_template(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_template(
|
||||||
|
name="smollm2",
|
||||||
|
format_system=StringFormatter(
|
||||||
|
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"]
|
||||||
|
),
|
||||||
|
stop_words=["<|im_end|>"],
|
||||||
|
default_system="You are a helpful AI assistant named SmolLM, trained by Hugging Face.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
register_template(
|
register_template(
|
||||||
name="solar",
|
name="solar",
|
||||||
format_user=StringFormatter(slots=["### User:\n{{content}}\n\n### Assistant:\n"]),
|
format_user=StringFormatter(slots=["### User:\n{{content}}\n\n### Assistant:\n"]),
|
||||||
|
@ -2765,6 +2765,13 @@ register_model_group(
|
|||||||
DownloadSource.DEFAULT: "HuggingFaceTB/SmolLM-1.7B-Instruct",
|
DownloadSource.DEFAULT: "HuggingFaceTB/SmolLM-1.7B-Instruct",
|
||||||
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM-1.7B-Instruct",
|
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM-1.7B-Instruct",
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
template="smollm",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
register_model_group(
|
||||||
|
models={
|
||||||
"SmolLM2-135M": {
|
"SmolLM2-135M": {
|
||||||
DownloadSource.DEFAULT: "HuggingFaceTB/SmolLM2-135M",
|
DownloadSource.DEFAULT: "HuggingFaceTB/SmolLM2-135M",
|
||||||
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM2-135M",
|
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM2-135M",
|
||||||
@ -2790,7 +2797,7 @@ register_model_group(
|
|||||||
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM2-1.7B-Instruct",
|
DownloadSource.MODELSCOPE: "HuggingFaceTB/SmolLM2-1.7B-Instruct",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
template="smollm",
|
template="smollm2",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user