mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2026-01-13 09:30:34 +08:00
[model] support Youtu-LLM-2B (#9707)
This commit is contained in:
@@ -2278,6 +2278,21 @@ register_template(
|
||||
)
|
||||
|
||||
|
||||
register_template(
|
||||
name="youtu",
|
||||
format_user=StringFormatter(slots=["<|User|>{{content}}<|Assistant|>"]),
|
||||
format_assistant=StringFormatter(slots=["{{content}}<|end_of_text|>"]),
|
||||
format_system=StringFormatter(slots=["{{content}}"]),
|
||||
format_function=FunctionFormatter(slots=["{{content}}"], tool_format="default"),
|
||||
format_observation=StringFormatter(slots=["<tool_response>\n{{content}}\n</tool_response><|Assistant|>"]),
|
||||
format_tools=ToolFormatter(tool_format="default"),
|
||||
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
|
||||
stop_words=["<|end_of_text|>"],
|
||||
replace_eos=True,
|
||||
template_class=ReasoningTemplate,
|
||||
)
|
||||
|
||||
|
||||
register_template(
|
||||
name="yuan",
|
||||
format_user=StringFormatter(slots=["{{content}}", {"token": "<sep>"}]),
|
||||
|
||||
@@ -3846,6 +3846,21 @@ register_model_group(
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Youtu-LLM-2B-Instruct": {
|
||||
DownloadSource.DEFAULT: "tencent/Youtu-LLM-2B",
|
||||
DownloadSource.MODELSCOPE: "Tencent-YouTu-Research/Youtu-LLM-2B",
|
||||
},
|
||||
"Youtu-LLM-2B-Base": {
|
||||
DownloadSource.DEFAULT: "tencent/Youtu-LLM-2B-Base",
|
||||
DownloadSource.MODELSCOPE: "Tencent-YouTu-Research/Youtu-LLM-2B-Base",
|
||||
},
|
||||
},
|
||||
template="youtu",
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Yuan2-2B-Chat": {
|
||||
|
||||
Reference in New Issue
Block a user