Skip to content

Commit

Permalink
ignoring the system prompt in some cases for refact1.6b model
Browse files Browse the repository at this point in the history
  • Loading branch information
JegernOUTT committed Sep 1, 2023
1 parent 9fbd8c2 commit d917766
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion refact_scratchpads/scratchpad_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,15 @@ def __init__(self, *args, **kwargs):
self._esc = "<empty_output>"

def _prompt(self) -> str:
text = self._esc + "SYSTEM You are a programming assistant. If you don't understand the question, just say: I don't understand the question.\n"
if len(self._messages) <= 2:
# We are ignoring the `system prompt` here 'cause the model
# haven't seen more than two messages with a `system prompt` while training
# Going to fix this later with the next iteration
text = self._esc + ("SYSTEM You are a programming assistant. "
"If you don't understand the question, just say: "
"I don't understand the question.\n")
else:
text = ""
for message in self._messages:
if message["content"] == "":
continue
Expand Down

0 comments on commit d917766

Please sign in to comment.