diff options
author | Kawrakow <iwankawrakow@gmail.com> | 2025-06-03 11:32:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 11:32:03 +0300 |
commit | ccb265c01676aad9ae5860ba50e74e61dfcd1cf8 (patch) | |
tree | 8e2d9303bd091c4d0015fce8402162346d998cca /common/sampling.h | |
parent | 4f8b05a0d76e6c5e47fe1f6c7bd079e0fe95dbba (diff) |
Adding the XTC sampler (#486)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'common/sampling.h')
-rw-r--r-- | common/sampling.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/sampling.h b/common/sampling.h index eeaa53b8..163cdfca 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -15,6 +15,7 @@ enum class llama_sampler_type : char { TOP_P = 'p', MIN_P = 'm', TFS_Z = 'f', + XTC = 'x', TYPICAL_P = 'y', TEMPERATURE = 't' }; @@ -39,6 +40,8 @@ typedef struct llama_sampling_params { int32_t mirostat = 0; // 0 = disabled, 1 = mirostat, 2 = mirostat 2.0 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 bool penalize_nl = false; // consider newlines as a repeatable token uint32_t seed = LLAMA_DEFAULT_SEED; // the seed used to initialize llama_sampling_context |