增加了对minicpm3.0的适配'
This commit is contained in:
parent
c5e1736470
commit
d7ba97be48
|
@ -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",
|
||||
|
|
|
@ -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={
|
||||
|
|
Loading…
Reference in New Issue