Merge pull request #2531 from Rayrtfr/main

Support Atom Model
This commit is contained in:
hoshi-hiyouga 2024-02-26 16:36:45 +08:00 committed by GitHub
commit 4f18a310e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 20 additions and 0 deletions

View File

@ -644,3 +644,9 @@ _register_template(
format_user=StringFormatter(slots=[{"token": "<human>"}, ":{{content}}\n", {"token": "<bot>"}, ":"]),
format_separator=EmptyFormatter(slots=["\n"]),
)
_register_template(
name="atom",
format_user=StringFormatter(slots=[{"bos_token"}, "Human: {{content}}\n", {"eos_token"}, {"bos_token"}, "Assistant:"]),
format_assistant=StringFormatter(slots=["{{content}}\n", {"eos_token"}]),
)

View File

@ -883,3 +883,17 @@ register_model_group(
},
template="zephyr",
)
register_model_group(
models={
"Atom-7B": {
DownloadSource.DEFAULT: "FlagAlpha/Atom-7B",
DownloadSource.MODELSCOPE: "FlagAlpha/Atom-7B",
},
"Atom-7B-Chat": {
DownloadSource.DEFAULT: "FlagAlpha/Atom-7B-Chat",
DownloadSource.MODELSCOPE: "FlagAlpha/Atom-7B-Chat",
},
},
template="atom",
)