passkey : better prints

This commit is contained in:
Georgi Gerganov 2023-10-30 11:13:44 +02:00
parent 21196da114
commit fbb999f592
No known key found for this signature in database
GPG key ID: 449E073F9DC10735

View file

@ -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();