Former-commit-id: f315f8e8ec916b82bac94a159e55839ff155c6b5
This commit is contained in:
hiyouga 2024-04-19 22:40:01 +08:00
parent 9225c15c88
commit b3b5b530d1

View File

@ -661,13 +661,18 @@ _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"
(
"<|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_system=StringFormatter(
slots=[{"bos_token"}, "<|start_header_id|>system<|end_header_id|>\n\n{{content}}<|eot_id|>"]
),
default_system="You are a helpful assistant.",
stop_words=["<|eot_id|>"],
replace_eos=True,
force_system=True,
)