diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-06-03 17:35:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 17:35:09 +0300 |
commit | f6d5fbdc5780b6dca770c896b8463de3239c7f8b (patch) | |
tree | 5174cb76b596d23383a4434ab2179d8b5213512f /common/sampling.h | |
parent | ccb265c01676aad9ae5860ba50e74e61dfcd1cf8 (diff) |
Adding top-n-sigma sampler (#489)
* Adding top-n-sigma sampler
* Fix typos in XTC PR
* Update README.md for main and server
* More README
* More README
---------
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'common/sampling.h')
-rw-r--r-- | common/sampling.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/common/sampling.h b/common/sampling.h index 163cdfca..99fb07ac 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -16,6 +16,7 @@ enum class llama_sampler_type : char { MIN_P = 'm', TFS_Z = 'f', XTC = 'x', + TOP_N_SIGMA = 'n', TYPICAL_P = 'y', TEMPERATURE = 't' }; @@ -41,7 +42,8 @@ typedef struct llama_sampling_params { float mirostat_tau = 5.00f; // target entropy float mirostat_eta = 0.10f; // learning rate float xtc_probability = 0.0f; // xtc probability - float xtc_threshold = 1.0f; // xtc threashold, disabled if > 0.5 + float xtc_threshold = 1.0f; // xtc threshold, disabled if > 0.5 + float top_n_sigma = 0.0f; // top-n-sigma bool penalize_nl = false; // consider newlines as a repeatable token uint32_t seed = LLAMA_DEFAULT_SEED; // the seed used to initialize llama_sampling_context |