Update llama.cpp

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
This commit is contained in:
Johannes Gäßler 2024-02-08 09:45:58 +01:00 committed by GitHub
parent 2f8e6078b0
commit 7b996502e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8371,12 +8371,12 @@ void llama_sample_top_k(struct llama_context * ctx, llama_token_data_array * can
// return; // return;
// } // }
const int64_t t_start_sample_us = ggml_time_us();
if (k <= 0) { if (k <= 0) {
k = candidates->size; k = candidates->size;
} }
const int64_t t_start_sample_us = ggml_time_us();
k = std::max(k, (int) min_keep); k = std::max(k, (int) min_keep);
k = std::min(k, (int) candidates->size); k = std::min(k, (int) candidates->size);