From 68e0a5dd08ffb0f7e4046c2ef1c81af17c067cce Mon Sep 17 00:00:00 2001 From: jstzwj <1103870790@qq.com> Date: Mon, 29 Apr 2024 17:38:23 +0800 Subject: [PATCH] aquila bug fix --- chatproto/conversation/models/aquila.py | 3 --- chatproto/conversation/models/gemma.py | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 chatproto/conversation/models/gemma.py diff --git a/chatproto/conversation/models/aquila.py b/chatproto/conversation/models/aquila.py index c653431..c076c8b 100644 --- a/chatproto/conversation/models/aquila.py +++ b/chatproto/conversation/models/aquila.py @@ -20,7 +20,6 @@ system_message="A chat between a curious human and an artificial intelligence assistant. " "The assistant gives helpful, detailed, and polite answers to the human's questions.\n\n", roles=("### Human: ", "### Assistant: "), - offset=0, sep_style=SeparatorStyle.NO_COLON_TWO, sep="\n", sep2="", @@ -34,7 +33,6 @@ system_message="A chat between a curious human and an artificial intelligence assistant. " "The assistant gives helpful, detailed, and polite answers to the human's questions.", roles=("Human", "Assistant"), - offset=0, sep_style=SeparatorStyle.ADD_COLON_TWO, sep="###", sep2="", @@ -47,7 +45,6 @@ aquila_v1 = ConversationSettings( name="aquila-v1", roles=("<|startofpiece|>", "<|endofpiece|>"), - offset=0, sep_style=SeparatorStyle.NO_COLON_TWO, sep="", sep2="", diff --git a/chatproto/conversation/models/gemma.py b/chatproto/conversation/models/gemma.py new file mode 100644 index 0000000..ddbfc8c --- /dev/null +++ b/chatproto/conversation/models/gemma.py @@ -0,0 +1,14 @@ +from ..settings import ConversationSettings, SeparatorStyle + +# Gemma +# reference: https://huggingface.co/google/gemma-7b-it?text=%3Cstart_of_turn%3Euser%0AHow+does+the+brain+work%3F%3Cend_of_turn%3E%0A%3Cstart_of_turn%3Emodel +gemma = ConversationSettings( + name="gemma", + roles=("user", "model"), + system_template="{system_message}", + sep_style=SeparatorStyle.ADD_NEW_LINE_SINGLE, + sep="\n", + stop_str="", +) + +# FIXME: