From 1f40a789e61ca052a71748a42c38f0d0ab9f7ead Mon Sep 17 00:00:00 2001 From: Randall Fitzgerald Date: Sat, 27 May 2023 17:10:09 -0700 Subject: [PATCH] Didn't see the already defined top_k var. lol. Embarrassing. Don't edit code in the github web viewer, kids. --- examples/server/server.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 8942552a5..356ec1b7b 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -160,9 +160,8 @@ struct llama_server_context { // out of user input, sample next token const float temp = params.temp; - // const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k; - const float top_p = params.top_p; const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k; + const float top_p = params.top_p; const float tfs_z = params.tfs_z; const float typical_p = params.typical_p; const int32_t repeat_last_n = params.repeat_last_n < 0 ? params.n_ctx : params.repeat_last_n;