support telechat2 model
Former-commit-id: 15a069d85c07842cd28d65845af93c3cf70ef1f4
This commit is contained in:
@@ -1131,8 +1131,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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1957,13 +1957,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