From 299cd03785cee6e9c2f3a13e5acdc6d9e4137431 Mon Sep 17 00:00:00 2001 From: rabbit <2503106553@QQ.com> Date: Mon, 3 Mar 2025 15:33:22 +0800 Subject: [PATCH] [data] bailing template (#7117) * add bailing template * add bailing template * add bailing template --------- Co-authored-by: chengshiwen.csw@antgroup.com Former-commit-id: 049ddf48afaa9f12d3e46d7ec63858607329e853 --- src/llamafactory/data/template.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/llamafactory/data/template.py b/src/llamafactory/data/template.py index cd3358f0..58393563 100644 --- a/src/llamafactory/data/template.py +++ b/src/llamafactory/data/template.py @@ -612,6 +612,16 @@ register_template( ) +register_template( + name="bailing", + format_user=StringFormatter(slots=["HUMAN{{content}}ASSISTANT"]), + format_system=StringFormatter(slots=["SYSTEM{{content}}"]), + format_observation=StringFormatter(slots=["OBSERVATION{{content}}ASSISTANT"]), + stop_words=["<|endoftext|>"], + efficient_eos=True, +) + + register_template( name="belle", format_user=StringFormatter(slots=["Human: {{content}}\n\nBelle: "]),