diff options
Diffstat (limited to 'common/sampling.h')
-rw-r--r-- | common/sampling.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/sampling.h b/common/sampling.h index 95d87539..48b2459d 100644 --- a/common/sampling.h +++ b/common/sampling.h @@ -131,6 +131,13 @@ llama_token llama_sampling_sample( struct llama_context * ctx_cfg, int idx = 0); +// returns the probability that token of given id will be sampled +llama_token_data_array llama_sampling_probability_distribution( + struct llama_sampling_context * ctx_sampling, + struct llama_context * ctx_main, + struct llama_context * ctx_cfg, + int idx = 0); + void llama_sampling_accept( struct llama_sampling_context * ctx_sampling, struct llama_context * ctx_main, |