support gemma
Former-commit-id: b9674aa2f6f1b6b09b2a37375313d8d5abfcd453
This commit is contained in:
@@ -433,6 +433,16 @@ _register_template(
|
||||
)
|
||||
|
||||
|
||||
_register_template(
|
||||
name="gemma",
|
||||
format_user=StringFormatter(slots=["<start_of_turn>user\n{{content}}<end_of_turn>\n<start_of_turn>model\n"]),
|
||||
format_system=StringFormatter(slots=["{{content}}"]),
|
||||
format_separator=EmptyFormatter(slots=["\n"]),
|
||||
stop_words=["<end_of_turn>"],
|
||||
replace_eos=True,
|
||||
)
|
||||
|
||||
|
||||
_register_template(
|
||||
name="intern",
|
||||
format_user=StringFormatter(slots=["<|User|>:{{content}}", {"token": "<eoh>"}, "\n<|Bot|>:"]),
|
||||
|
||||
@@ -324,6 +324,25 @@ register_model_group(
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"Gemma-2B": {
|
||||
DownloadSource.DEFAULT: "google/gemma-2b",
|
||||
},
|
||||
"Gemma-7B": {
|
||||
DownloadSource.DEFAULT: "google/gemma-7b",
|
||||
},
|
||||
"Gemma-2B-Chat": {
|
||||
DownloadSource.DEFAULT: "google/gemma-2b-it",
|
||||
},
|
||||
"Gemma-7B-Chat": {
|
||||
DownloadSource.DEFAULT: "google/gemma-7b-it",
|
||||
},
|
||||
},
|
||||
template="gemma",
|
||||
)
|
||||
|
||||
|
||||
register_model_group(
|
||||
models={
|
||||
"InternLM-7B": {
|
||||
|
||||
Reference in New Issue
Block a user