Update llama.cpp

This commit is contained in:
John 2024-01-23 16:39:16 +01:00 committed by GitHub
parent 73fbbd1526
commit c0cfcaf66c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8001,7 +8001,7 @@ void llama_sample_top_k(struct llama_context * ctx, llama_token_data_array * can
auto comp = [](const llama_token_data & a, const llama_token_data & b) {
return a.logit > b.logit;
};
if (k == (int) candidates->size) {
if (k >= (int) (3*candidates->size /4)) {
std::sort(candidates->data, candidates->data + candidates->size, comp);
} else {
if (k > 3000) {