From 122213a7a7e114b0c390158cac0ae9faeceb2efc Mon Sep 17 00:00:00 2001 From: hoshi-hiyouga Date: Mon, 27 May 2024 20:51:26 +0800 Subject: [PATCH] Update template.py --- src/llamafactory/data/template.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index eba23271..3d719e5b 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -761,16 +761,15 @@ _register_template( format_user=StringFormatter( slots=[ ( - "<|start_header_id|>GPT4 Correct User<|end_header_id|>\n\n{{content}}<|eot_id|>" + "<|start_header_id|>GPT4 Correct User<|end_header_id|>\n\n{{content}}<|eot_id|>", "<|start_header_id|>GPT4 Correct Assistant<|end_header_id|>\n\n" ) ] ), - format_system=StringFormatter( - slots=[{"bos_token"}, "<|start_header_id|>System<|end_header_id|>\n\n{{content}}<|eot_id|>"] - ), + format_system=StringFormatter(slots=[{"bos_token"}, "{{content}}"]), stop_words=["<|eot_id|>"], replace_eos=True, + force_system=True, )