From f6d5fbdc5780b6dca770c896b8463de3239c7f8b Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Tue, 3 Jun 2025 17:35:09 +0300 Subject: 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 --- src/llama.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/llama.cpp') 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, -- cgit v1.2.3