From 4779d994fc3d9d66014c99d159fa6385726c3044 Mon Sep 17 00:00:00 2001 From: kalomaze <66376113+kalomaze@users.noreply.github.com> Date: Mon, 22 Jan 2024 03:58:59 -0600 Subject: [PATCH] tiny min p return check tweak Number of sampleable candidates can never be zero in the first place --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index fb8e7b6a3..59ab8f868 100644 --- a/llama.cpp +++ b/llama.cpp @@ -8030,7 +8030,7 @@ void llama_sample_top_p(struct llama_context * ctx, llama_token_data_array * can } void llama_sample_min_p(struct llama_context * ctx, llama_token_data_array * candidates, float p, size_t min_keep) { - if (p <= 0.0f || !candidates->size) { + if (p <= 0.0f) { return; }