增加了对minicpm3.0的适配'

This commit is contained in:
liudan 2024-09-04 23:10:05 +08:00
parent c5e1736470
commit d7ba97be48
2 changed files with 16 additions and 1 deletions

View File

@ -558,7 +558,13 @@ _register_template(
format_user=StringFormatter(slots=["<用户>{{content}}<AI>"]),
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
)
_register_template(
name="cpm3",
format_user=StringFormatter(slots=["<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n"]),
format_prefix=EmptyFormatter(slots=[{"bos_token"}]),
format_system=StringFormatter(slots=["<|im_start|>system\n{{content}}<|im_end|>\n"]),
stop_words=["<|im_end|>"],
)
_register_template(
name="dbrx",

View File

@ -806,6 +806,15 @@ register_model_group(
template="cpm",
)
register_model_group(
models={
"MiniCPM3-4B": {
DownloadSource.DEFAULT: "openbmb/MiniCPM3-4B",
DownloadSource.MODELSCOPE: "OpenBMB/MiniCPM3-4B",
},
},
template="cpm3",
)
register_model_group(
models={