tiny min p return check tweak

Number of sampleable candidates can never be zero in the first place
This commit is contained in:
kalomaze 2024-01-22 03:58:59 -06:00
parent 6167c263c7
commit 4779d994fc

View file

@ -8030,7 +8030,7 @@ void llama_sample_top_p(struct llama_context * ctx, llama_token_data_array * can
} }
void llama_sample_min_p(struct llama_context * ctx, llama_token_data_array * candidates, float p, size_t min_keep) { void llama_sample_min_p(struct llama_context * ctx, llama_token_data_array * candidates, float p, size_t min_keep) {
if (p <= 0.0f || !candidates->size) { if (p <= 0.0f) {
return; return;
} }