diff --git a/src/llmtuner/data/template.py b/src/llmtuner/data/template.py
index 00bdbf10..67b447f0 100644
--- a/src/llmtuner/data/template.py
+++ b/src/llmtuner/data/template.py
@@ -649,6 +649,14 @@ _register_template(
)
+_register_template(
+ name="llama2_zh",
+ format_user=StringFormatter(slots=[{"bos_token"}, "[INST] {{content}} [/INST]"]),
+ format_system=StringFormatter(slots=["<>\n{{content}}\n<>\n\n"]),
+ default_system="You are a helpful assistant. 你是一个乐于助人的助手。",
+)
+
+
_register_template(
name="llama3",
format_user=StringFormatter(
@@ -657,20 +665,12 @@ _register_template(
]
),
format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]),
- format_separator=EmptyFormatter(slots=["<|eot_id|>"]),
- efficient_eos=True,
+ stop_words=["<|eot_id|>"],
+ replace_eos=True,
force_system=True,
)
-_register_template(
- name="llama2_zh",
- format_user=StringFormatter(slots=[{"bos_token"}, "[INST] {{content}} [/INST]"]),
- format_system=StringFormatter(slots=["<>\n{{content}}\n<>\n\n"]),
- default_system="You are a helpful assistant. 你是一个乐于助人的助手。",
-)
-
-
_register_template(
name="mistral",
format_user=StringFormatter(slots=[" [INST] {{content}} [/INST]"]),
diff --git a/src/llmtuner/extras/constants.py b/src/llmtuner/extras/constants.py
index 07ccbc0d..78352a01 100644
--- a/src/llmtuner/extras/constants.py
+++ b/src/llmtuner/extras/constants.py
@@ -517,15 +517,19 @@ register_model_group(
models={
"LLaMA3-8B": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B",
+ DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-8B",
},
"LLaMA3-70B": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B",
+ DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-70B",
},
"LLaMA3-8B-Chat": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-8B-Instruct",
+ DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-8B-Instruct",
},
"LLaMA3-70B-Chat": {
DownloadSource.DEFAULT: "meta-llama/Meta-Llama-3-70B-Instruct",
+ DownloadSource.MODELSCOPE: "LLM-Research/Meta-Llama-3-70B-Instruct",
},
},
template="llama3",