From fdd8bf59031d24b325746c675231a35369ea89b7 Mon Sep 17 00:00:00 2001 From: slaren Date: Tue, 22 Aug 2023 21:18:53 +0200 Subject: [PATCH] flush stdout every token --- examples/llama2-chat/llama2-chat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llama2-chat/llama2-chat.cpp b/examples/llama2-chat/llama2-chat.cpp index a5937fa91..4b497fd2b 100644 --- a/examples/llama2-chat/llama2-chat.cpp +++ b/examples/llama2-chat/llama2-chat.cpp @@ -109,7 +109,7 @@ struct chat { } printf("%s", llama_token_to_str(ctx, id).c_str()); - + fflush(stdout); } while (true); }