summaryrefslogtreecommitdiff
path: root/src/llama.cpp
diff options
context:
space:
mode:
authorKawrakow <iwankawrakow@gmail.com>2025-06-03 17:35:09 +0300
committerGitHub <noreply@github.com>2025-06-03 17:35:09 +0300
commitf6d5fbdc5780b6dca770c896b8463de3239c7f8b (patch)
tree5174cb76b596d23383a4434ab2179d8b5213512f /src/llama.cpp
parentccb265c01676aad9ae5860ba50e74e61dfcd1cf8 (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 'src/llama.cpp')
-rw-r--r--src/llama.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/llama.cpp b/src/llama.cpp
index 90e342e1..be404500 100644
--- a/src/llama.cpp
+++ b/src/llama.cpp
@@ -23270,6 +23270,10 @@ void llama_sample_xtc(struct llama_context * ctx, llama_token_data_array * candi
llama_sample_xtc_impl(ctx ? &ctx->sampling : nullptr, candidates_p, probability, threshold, min_keep);
}
+void llama_sample_top_n_sigma(struct llama_context * ctx, llama_token_data_array * candidates_p, float top_n_sigma) {
+ llama_sample_top_n_sigma_impl(ctx ? &ctx->sampling : nullptr, candidates_p, top_n_sigma);
+}
+
void llama_sample_repetition_penalties(
struct llama_context * ctx,
llama_token_data_array * candidates,