mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-06 05:32:50 +08:00
fix llama3 template
Former-commit-id: 14a605a2da16367ff64219b9f301c352b4812c4c
This commit is contained in:
parent
15d17a1e86
commit
ac7ec7ed10
@ -649,6 +649,14 @@ _register_template(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
_register_template(
|
||||||
|
name="llama2_zh",
|
||||||
|
format_user=StringFormatter(slots=[{"bos_token"}, "[INST] {{content}} [/INST]"]),
|
||||||
|
format_system=StringFormatter(slots=["<<SYS>>\n{{content}}\n<</SYS>>\n\n"]),
|
||||||
|
default_system="You are a helpful assistant. 你是一个乐于助人的助手。",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
_register_template(
|
_register_template(
|
||||||
name="llama3",
|
name="llama3",
|
||||||
format_user=StringFormatter(
|
format_user=StringFormatter(
|
||||||
@ -657,20 +665,12 @@ _register_template(
|
|||||||
]
|
]
|
||||||
),
|
),
|
||||||
format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]),
|
format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]),
|
||||||
format_separator=EmptyFormatter(slots=["<|eot_id|>"]),
|
stop_words=["<|eot_id|>"],
|
||||||
efficient_eos=True,
|
replace_eos=True,
|
||||||
force_system=True,
|
force_system=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_register_template(
|
|
||||||
name="llama2_zh",
|
|
||||||
format_user=StringFormatter(slots=[{"bos_token"}, "[INST] {{content}} [/INST]"]),
|
|
||||||
format_system=StringFormatter(slots=["<<SYS>>\n{{content}}\n<</SYS>>\n\n"]),
|
|
||||||
default_system="You are a helpful assistant. 你是一个乐于助人的助手。",
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_register_template(
|
_register_template(
|
||||||
name="mistral",
|
name="mistral",
|
||||||
format_user=StringFormatter(slots=[" [INST] {{content}} [/INST]"]),
|
format_user=StringFormatter(slots=[" [INST] {{content}} [/INST]"]),
|
||||||
|
@ -517,15 +517,19 @@ register_model_group(
|
|||||||
models={
|
models={
|
||||||
"LLaMA3-8B": {
|
"LLaMA3-8B": {
|
||||||
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B",
|
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B",
|
||||||
|
DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-8B",
|
||||||
},
|
},
|
||||||
"LLaMA3-70B": {
|
"LLaMA3-70B": {
|
||||||
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B",
|
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B",
|
||||||
|
DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-70B",
|
||||||
},
|
},
|
||||||
"LLaMA3-8B-Chat": {
|
"LLaMA3-8B-Chat": {
|
||||||
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B-Instruct",
|
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B-Instruct",
|
||||||
|
DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-8B-Instruct",
|
||||||
},
|
},
|
||||||
"LLaMA3-70B-Chat": {
|
"LLaMA3-70B-Chat": {
|
||||||
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B-Instruct",
|
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B-Instruct",
|
||||||
|
DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-70B-Instruct",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
template="llama3",
|
template="llama3",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user