sampling : fix top_p empty condition

This commit is contained in:
Georgi Gerganov 2025-12-01 18:02:34 +02:00
parent 04f2822a86
commit 88cca45bb8
No known key found for this signature in database
GPG Key ID: 449E073F9DC10735
1 changed files with 1 additions and 1 deletions

View File

@ -1287,7 +1287,7 @@ static struct llama_sampler_i llama_sampler_top_p_i = {
};
struct llama_sampler * llama_sampler_init_top_p(float p, size_t min_keep) {
const bool is_empty = (p <= 0.0f);
const bool is_empty = p >= 1.0f;
if (is_empty) {
return llama_sampler_init_empty("top-p?");