mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
Merge branch 'master' into concedo_experimental
# Conflicts: # CMakeLists.txt # README.md # tests/test-sampling.cpp
This commit is contained in:
commit
f374dba49c
4 changed files with 7 additions and 3 deletions
|
@ -8890,6 +8890,10 @@ void llama_sample_top_k(struct llama_context * ctx, llama_token_data_array * can
|
|||
// }
|
||||
|
||||
const int64_t t_start_sample_us = ggml_time_us();
|
||||
|
||||
if (k <= 0) {
|
||||
k = candidates->size;
|
||||
}
|
||||
|
||||
k = std::max(k, (int) min_keep);
|
||||
k = std::min(k, (int) candidates->size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue