Merge pull request #3958 from hzhaoy/add_telechat_12b_support

add TeleChat-12B/TeleChat-12B-v2 models
This commit is contained in:
hoshi-hiyouga 2024-05-29 17:20:53 +08:00 committed by GitHub
commit bcddd5b066
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 26 additions and 0 deletions

View File

@ -918,3 +918,13 @@ _register_template(
format_user=StringFormatter(slots=["<human>:{{content}}\n<bot>:"]),
format_separator=EmptyFormatter(slots=["\n"]),
)
_register_template(
name="telechat",
format_user=StringFormatter(slots=["<_user>{{content}}<_bot>"]),
format_system=StringFormatter(slots=["<_system>{{content}}<_end>"]),
default_system="",
stop_words=["<_end>"],
replace_eos=True,
)

View File

@ -1355,3 +1355,19 @@ register_model_group(
},
template="zephyr",
)
register_model_group(
models={
"TeleChat-12B-Chat": {
DownloadSource.DEFAULT: "Tele-AI/TeleChat-12B",
DownloadSource.MODELSCOPE: "TeleAI/TeleChat-12B",
},
"TeleChat-12B-v2-Chat": {
DownloadSource.DEFAULT: "Tele-AI/TeleChat-12B-v2",
DownloadSource.MODELSCOPE: "TeleAI/TeleChat-12B-v2",
},
},
module='query,key_value',
template="telechat",
)