From a1ac19998014fa499271d382cb58b3316ec64f46 Mon Sep 17 00:00:00 2001 From: "Ma, Guokai" Date: Mon, 16 Oct 2023 01:52:21 +0800 Subject: [PATCH] Fix repeat greeting (#808) * fix repeated greeting * remove seperator between role and message --- llama_cpp/llama_chat_format.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama_cpp/llama_chat_format.py b/llama_cpp/llama_chat_format.py index 9a09a28..518acc5 100644 --- a/llama_cpp/llama_chat_format.py +++ b/llama_cpp/llama_chat_format.py @@ -32,7 +32,7 @@ def _format_llama2( ret = system_message + sep for role, message in messages: if message: - ret += message + " " + ret += role + message + " " else: ret += role + " " return ret