support llama3

Former-commit-id: c1eabb751a5fd73b710714451b146732e0ed4558
This commit is contained in:
hoshi-hiyouga
2024-04-19 01:13:50 +08:00
parent 9e1bd6420d
commit 8397808d1d
4 changed files with 45 additions and 6 deletions

View File

@@ -649,6 +649,20 @@ _register_template(
)
_register_template(
name="llama3",
format_user=StringFormatter(
slots=[
"<|start_header_id|>user<|end_header_id|>\n\n{{content}}<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
]
),
format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]),
format_separator=EmptyFormatter(slots=["<|eot_id|>"]),
efficient_eos=True,
force_system=True,
)
_register_template(
name="llama2_zh",
format_user=StringFormatter(slots=[{"bos_token"}, "[INST] {{content}} [/INST]"]),

View File

@@ -513,6 +513,25 @@ register_model_group(
)
register_model_group(
models={
"LLaMA3-8B": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B",
},
"LLaMA3-70B": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B",
},
"LLaMA3-8B-Chat": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B-Instruct",
},
"LLaMA3-70B-Chat": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B-Instruct",
},
},
template="llama3",
)
register_model_group(
models={
"Mistral-7B-v0.1": {