Skip to content

Commit ab78275

Browse files
committed
debug
1 parent 537d249 commit ab78275

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llama_cpp/llama_chat_template.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ def raise_exception(message: str):
228228
strftime_now=self.strftime_now,
229229
)
230230

231+
print("JINJA2 PROMPT")
231232
print(prompt)
233+
print("JINJA2 PROMPT END")
232234

233235
stopping_criteria = None
234236
if self.stop_token_ids is not None:
@@ -891,6 +893,7 @@ def chat_completion_handler(
891893
}
892894

893895
# Format the prompt using the chat formatter
896+
print("FORMATTING PROMPT")
894897
result = chat_formatter(
895898
messages=messages,
896899
functions=functions,
@@ -900,6 +903,7 @@ def chat_completion_handler(
900903
)
901904

902905
# Prepare prompt and stopping criteria
906+
print("TOKENIZING PROMPT")
903907
prompt = llama.tokenize(
904908
result.prompt.encode("utf-8"),
905909
add_bos=not result.added_special,

0 commit comments

Comments
 (0)