support granite3 models
Former-commit-id: 8cff612e55eb7df116e51c4dd21e7a42543e7a1f
This commit is contained in:
@@ -691,6 +691,18 @@ _register_template(
|
||||
)
|
||||
|
||||
|
||||
_register_template(
|
||||
name="granite3",
|
||||
format_user=StringFormatter(slots=["<|start_of_role|>user<|end_of_role|>{{content}}<|end_of_text|>\n<|start_of_role|>assistant<|end_of_role|>"]),
|
||||
format_system=StringFormatter(slots=["<|start_of_role|>system<|end_of_role|>{{content}}<|end_of_text|>\n"]),
|
||||
format_assistant=StringFormatter(slots=["{{content}}<|end_of_text|>\n"]),
|
||||
format_separator=EmptyFormatter(slots=["\n"]),
|
||||
stop_words=["<|end_of_text|>"],
|
||||
replace_eos=True,
|
||||
replace_jinja_template=True,
|
||||
)
|
||||
|
||||
|
||||
_register_template(
|
||||
name="index",
|
||||
format_user=StringFormatter(slots=["reserved_0{{content}}reserved_1"]),
|
||||
|
||||
@@ -596,6 +596,45 @@ register_model_group(
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Granite-3.0-8B-Instruct": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-8b-instruct",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-8b-instruct",
|
||||
},
|
||||
"Granite-3.0-8B-Base": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-8b-base",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-8b-base",
|
||||
},
|
||||
"Granite-3.0-2B-Instruct": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-2b-instruct",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-2b-instruct",
|
||||
},
|
||||
"Granite-3.0-2B-Base": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-2b-base",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-2b-base",
|
||||
},
|
||||
"Granite-3.0-3B-A800M-Instruct": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-3b-a800m-instruct",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-3b-a800m-instruct",
|
||||
},
|
||||
"Granite-3.0-3B-A800M-Base": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-3b-a800m-base",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-3b-a800m-base",
|
||||
},
|
||||
"Granite-3.0-1B-A400M-Instruct": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-1b-a400m-instruct",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-1b-a400m-instruct",
|
||||
},
|
||||
"Granite-3.0-1B-A400M-Base": {
|
||||
DownloadSource.DEFAULT: "ibm-granite/granite-3.0-1b-a400m-base",
|
||||
DownloadSource.MODELSCOPE: "AI-ModelScope/granite-3.0-1b-a400m-base",
|
||||
},
|
||||
},
|
||||
template="granite3",
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Index-1.9B-Chat": {
|
||||
|
||||
Reference in New Issue
Block a user