Skip to content

Commit be44b1c

Browse files
committed
passkey : better prints
1 parent 792f200 commit be44b1c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/passkey/passkey.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ int main(int argc, char ** argv) {
3232
}
3333

3434
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.";
35+
const std::string prompt_suffix = " What is the pass key? The pass key is";
3536

3637
if (seed == -1) {
3738
seed = time(NULL);
@@ -53,7 +54,7 @@ int main(int argc, char ** argv) {
5354
params.prompt += " The grass is green. The sky is blue. The sun is yellow. Here we go. There and back again.";
5455
}
5556

56-
params.prompt += " What is the pass key? The pass key is";
57+
params.prompt += prompt_suffix;
5758

5859
// init LLM
5960

@@ -182,13 +183,18 @@ int main(int argc, char ** argv) {
182183
}
183184
}
184185

186+
LOG_TEE("\n");
187+
LOG_TEE("%s: passkey = %d, inserted at position %d / %d\n", __func__, passkey, n_insert, n_junk);
185188
LOG_TEE("\n");
186189

187190
// main loop
188191

189192
int n_cur = tokens_list.size();
190193
int n_decode = 0;
191194

195+
LOG_TEE("%s", prompt_suffix.c_str());
196+
fflush(stdout);
197+
192198
const auto t_main_start = ggml_time_us();
193199

194200
while (n_cur <= n_len) {
@@ -238,9 +244,6 @@ int main(int argc, char ** argv) {
238244
}
239245
}
240246

241-
LOG_TEE("\n");
242-
LOG_TEE("%s: passkey = %d, inserted at position %d / %d\n", __func__, passkey, n_insert, n_junk);
243-
244247
LOG_TEE("\n");
245248

246249
const auto t_main_end = ggml_time_us();

0 commit comments

Comments
 (0)