From fbb999f592289a50e67f4b614a0123800ea72d2f Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Mon, 30 Oct 2023 11:13:44 +0200 Subject: [PATCH] passkey : better prints --- examples/passkey/passkey.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/passkey/passkey.cpp b/examples/passkey/passkey.cpp index e6e5fc4b6..f3b83d509 100644 --- a/examples/passkey/passkey.cpp +++ b/examples/passkey/passkey.cpp @@ -32,6 +32,7 @@ int main(int argc, char ** argv) { } const std::string prompt_prefix = "There is an important info hidden inside a lot of irrelevant text. Find it and memorize them. I will quiz you about the important information there."; + const std::string prompt_suffix = " What is the pass key? The pass key is"; if (seed == -1) { seed = time(NULL); @@ -53,7 +54,7 @@ int main(int argc, char ** argv) { params.prompt += " The grass is green. The sky is blue. The sun is yellow. Here we go. There and back again."; } - params.prompt += " What is the pass key? The pass key is"; + params.prompt += prompt_suffix; // init LLM @@ -182,6 +183,8 @@ int main(int argc, char ** argv) { } } + LOG_TEE("\n"); + LOG_TEE("%s: passkey = %d, inserted at position %d / %d\n", __func__, passkey, n_insert, n_junk); LOG_TEE("\n"); // main loop @@ -189,6 +192,9 @@ int main(int argc, char ** argv) { int n_cur = tokens_list.size(); int n_decode = 0; + LOG_TEE("%s", prompt_suffix.c_str()); + fflush(stdout); + const auto t_main_start = ggml_time_us(); while (n_cur <= n_len) { @@ -238,9 +244,6 @@ int main(int argc, char ** argv) { } } - LOG_TEE("\n"); - LOG_TEE("%s: passkey = %d, inserted at position %d / %d\n", __func__, passkey, n_insert, n_junk); - LOG_TEE("\n"); const auto t_main_end = ggml_time_us();