Skip to content

Commit

Permalink
removed unused temp parameter in llama_sample_entropy
Browse files Browse the repository at this point in the history
  • Loading branch information
l3utterfly committed Jan 18, 2024
1 parent 011a745 commit e1f91ae
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/sampling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion llama.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e1f91ae

Please sign in to comment.