print suppressed newline tokens as string "\n"

printing too much actual newlines is suppressed to avoid flooding the console.
This commit is contained in:
xaedes 2023-05-21 21:17:46 +02:00
parent 93eb8f7752
commit 37c69435f0
No known key found for this signature in database
GPG key ID: 30030EDD817EA2B1

View file

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