From e1f91ae24a04ad2338c8956be973ca50ecccbb5d Mon Sep 17 00:00:00 2001 From: l3utterfly Date: Thu, 18 Jan 2024 09:02:10 +0900 Subject: [PATCH] removed unused temp parameter in llama_sample_entropy --- common/sampling.cpp | 2 +- llama.cpp | 2 +- llama.h | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/common/sampling.cpp b/common/sampling.cpp index b94aeca35d555..6c4528dd79c79 100644 --- a/common/sampling.cpp +++ b/common/sampling.cpp @@ -154,7 +154,7 @@ static void sampler_queue( dynatemp_min = dynatemp_min<0?0:dynatemp_min; dynatemp_max = dynatemp_max<0?0:dynatemp_max; - llama_sample_entropy(ctx_main, &cur_p, temp, dynatemp_min, dynatemp_max); + llama_sample_entropy(ctx_main, &cur_p, dynatemp_min, dynatemp_max); } else { diff --git a/llama.cpp b/llama.cpp index 7847e3b4f51ff..4e70fbd6dd828 100644 --- a/llama.cpp +++ b/llama.cpp @@ -7783,7 +7783,7 @@ void llama_sample_typical(struct llama_context * ctx, llama_token_data_array * c } } -void llama_sample_entropy(struct llama_context * ctx, llama_token_data_array * candidates_p, float temp, float min_temp = 0, float max_temp = 2.0f) { +void llama_sample_entropy(struct llama_context * ctx, llama_token_data_array * candidates_p, float min_temp = 0, float max_temp = 2.0f) { const int64_t t_start_sample_us = ggml_time_us(); llama_sample_softmax(ctx, candidates_p); diff --git a/llama.h b/llama.h index 6719d3e3a94ce..53f2f92baa596 100644 --- a/llama.h +++ b/llama.h @@ -778,7 +778,6 @@ extern "C" { LLAMA_API void llama_sample_entropy( struct llama_context * ctx, llama_token_data_array * candidates_p, - float temp, float min_temp, float max_temp);