From e84b80216142a5d0401bcda69abce5f69dda022e Mon Sep 17 00:00:00 2001 From: Randall Fitzgerald Date: Sat, 27 May 2023 17:07:45 -0700 Subject: [PATCH] Change top_k type. Is my lack of knowledge of the code base showing? Yes it is. --- examples/server/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index bd1bc07ae..8942552a5 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -162,7 +162,7 @@ struct llama_server_context 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 float top_k = params.top_k; + const int32_t top_k = params.top_k <= 0 ? llama_n_vocab(ctx) : params.top_k; 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;