Merge pull request #6313 from ge-xing/main
support telechat2 model Former-commit-id: 282d0619b1047ba48f9bc3ac837d2ed40b7df307
This commit is contained in:
@@ -1149,8 +1149,17 @@ _register_template(
|
||||
name="telechat",
|
||||
format_user=StringFormatter(slots=["<_user>{{content}}<_bot>"]),
|
||||
format_system=StringFormatter(slots=["<_system>{{content}}<_end>"]),
|
||||
stop_words=["<_end>"],
|
||||
replace_eos=True,
|
||||
)
|
||||
|
||||
|
||||
_register_template(
|
||||
name="telechat2",
|
||||
format_user=StringFormatter(slots=["<_user>{{content}}<_bot>"]),
|
||||
format_system=StringFormatter(slots=["<_system>{{content}}"]),
|
||||
default_system=(
|
||||
"你是中国电信星辰语义大模型,英文名是TeleChat,你是由中电信人工智能科技有限公司和中国电信人工智能研究院(TeleAI)研发的人工智能助手。"
|
||||
),
|
||||
replace_jinja_template=False,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1961,13 +1961,36 @@ register_model_group(
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat-12B",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat-12B",
|
||||
DownloadSource.OPENMIND: "TeleAI/TeleChat-12B-pt",
|
||||
}
|
||||
},
|
||||
template="telechat",
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"TeleChat2-3B-Chat": {
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat2-3B",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat2-3B",
|
||||
},
|
||||
"TeleChat-12B-v2-Chat": {
|
||||
"TeleChat2-7B-Chat": {
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat2-7B",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat2-7B",
|
||||
},
|
||||
"TeleChat2-12B-Chat": {
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat-12B-v2",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat-12B-v2",
|
||||
},
|
||||
"TeleChat2-35B-Chat": {
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat2-35B",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat2-35B",
|
||||
},
|
||||
"TeleChat2-115B-Chat": {
|
||||
DownloadSource.DEFAULT: "Tele-AI/TeleChat2-115B",
|
||||
DownloadSource.MODELSCOPE: "TeleAI/TeleChat2-115B",
|
||||
},
|
||||
},
|
||||
template="telechat",
|
||||
template="telechat2",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user