From 833637b703c3719ff5d1ef94db5c82b38941193e Mon Sep 17 00:00:00 2001 From: kalomaze <66376113+kalomaze@users.noreply.github.com> Date: Sat, 28 Oct 2023 22:05:05 -0500 Subject: [PATCH] erring on the side of caution; disable by default --- common/sampling.h | 2 +- llama.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/sampling.h b/common/sampling.h index 7c9b8dcf2..bbb9ffa07 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -14,7 +14,7 @@ typedef struct llama_sampling_params { int32_t n_probs = 0; // if greater than 0, output the probabilities of top n_probs tokens. int32_t top_k = 40; // <= 0 to use vocab size float top_p = 0.95f; // 1.0 = disabled - float min_p = 0.05f; // 0.0 = disabled + float min_p = 1.0f; // 1.0 (or 0.0) = disabled float tfs_z = 1.00f; // 1.0 = disabled float typical_p = 1.00f; // 1.0 = disabled float temp = 0.80f; // 1.0 = disabled diff --git a/llama.h b/llama.h index 0ec28eb14..62addffdf 100644 --- a/llama.h +++ b/llama.h @@ -600,7 +600,7 @@ extern "C" { float p, size_t min_keep); - /// @details Minimum P sampling by Kalomaze + /// @details Minimum P sampling as described in https://github.com/ggerganov/llama.cpp/pull/3841#issue-1966758357 LLAMA_API void llama_sample_min_p( struct llama_context * ctx, llama_token_data_array * candidates,