diff options
author | Robey Holderith <robey@flaminglunchbox.net> | 2024-02-18 11:11:16 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 21:11:16 +0200 |
commit | 5ee99c32f5e47c8d32634eff9a47fb32a24c276b (patch) | |
tree | b96e45b36fe325a926025f94655a885428c84f47 /common/sampling.h | |
parent | c145f8a132b2fe1d1e65987faddbd9a40bef7a12 (diff) |
common, server : surface min_keep as its own parameter (#5567)
* Feature - surface min_keep as its own parameter
* Updated README with min_keep param
Diffstat (limited to 'common/sampling.h')
-rw-r--r-- | common/sampling.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/sampling.h b/common/sampling.h index e1279a89..95d87539 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -22,6 +22,7 @@ enum class llama_sampler_type : char { typedef struct llama_sampling_params { int32_t n_prev = 64; // number of previous tokens to remember int32_t n_probs = 0; // if greater than 0, output the probabilities of top n_probs tokens. + int32_t min_keep = 0; // 0 = disabled, otherwise samplers should return at least min_keep 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 |