A hopefully more efficient adaptive_p sampling (#1161)

* A hopefully more efficient adaptive_p sampling

* Once at it, lets fix the formatting too

* More formatting

* Correctly accumulate sampling time for adaptive_p
This commit is contained in:
Kawrakow
2026-01-19 15:01:55 +02:00
committed by GitHub
parent 6a5c180be9
commit fa58c20c42
5 changed files with 96 additions and 53 deletions

View File

@@ -1389,7 +1389,7 @@ LLAMA_API struct llama_grammar* llama_sampler_init_grammar_lazy_patterns(
const float decay,
const uint32_t seed);
void llama_prep_adaptive_p(
void llama_prep_adaptive_p(struct llama_context * ctx,
llama_token_data_array * candidates,
struct llama_sampler_adaptive_p * adapt_p_ctx);