From f245964f22f5bceeed27cb4e0374f1c56c6d63d5 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Sun, 25 Aug 2024 12:31:40 -0400 Subject: [PATCH] better handling of llama-3 tool rolw (#1782) --- src/axolotl/prompters.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/axolotl/prompters.py b/src/axolotl/prompters.py index 13ff450f8..18b73e725 100644 --- a/src/axolotl/prompters.py +++ b/src/axolotl/prompters.py @@ -352,9 +352,12 @@ class ShareGPTPrompter(Prompter): # pylint: disable=too-few-public-methods "Please help us by creating an Issue to add support for this conversation type." ) - role = CONVERSATION_ROLE_FORMAT[self._conversation.name].format( - ROLE=from_role - ) + if self._conversation.name in ["llama3"]: + role = from_role + else: + role = CONVERSATION_ROLE_FORMAT[self._conversation.name].format( + ROLE=from_role + ) if len(conv.messages) > 0 and ((role == conv.messages[-1][0])): if (