From 37c69435f04f0e827eaccd3988d78ff385206869 Mon Sep 17 00:00:00 2001 From: xaedes Date: Sun, 21 May 2023 21:17:46 +0200 Subject: [PATCH] print suppressed newline tokens as string "\n" printing too much actual newlines is suppressed to avoid flooding the console. --- examples/baby-llama/baby-llama-text.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/baby-llama/baby-llama-text.cpp b/examples/baby-llama/baby-llama-text.cpp index cda1edece..e4df2eca5 100644 --- a/examples/baby-llama/baby-llama-text.cpp +++ b/examples/baby-llama/baby-llama-text.cpp @@ -1247,6 +1247,8 @@ void print_tokens_batch(struct llama_context* ctx, struct ggml_tensor * tokens) } if (!isnl || (num_newline < 2)) { print_token(ctx, token); + } else { + printf("\\n"); } } printf("\n--\n");