Merge branch 'master' into concedo_experimental

# Conflicts:
#	CMakeLists.txt
#	README.md
#	tests/test-sampling.cpp
This commit is contained in:
Concedo 2024-02-08 17:33:03 +08:00
commit f374dba49c
4 changed files with 7 additions and 3 deletions

View file

@ -132,7 +132,7 @@ static void sampler_queue(
const float temp = params.temp;
const float dynatemp_range = params.dynatemp_range;
const float dynatemp_exponent = params.dynatemp_exponent;
const int32_t top_k = params.top_k <= 0 ? n_vocab : params.top_k;
const int32_t top_k = params.top_k;
const float top_p = params.top_p;
const float min_p = params.min_p;
const float tfs_z = params.tfs_z;

View file

@ -21,7 +21,7 @@ After building, run: `./llava-cli` to see the usage. For example:
## Model conversion
- Clone `llava-v15-7b`` and `clip-vit-large-patch14-336`` locally:
- Clone `llava-v15-7b` and `clip-vit-large-patch14-336` locally:
```sh
git clone https://huggingface.co/liuhaotian/llava-v1.5-7b

View file

@ -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);

2
tests/.gitignore vendored
View file

@ -1,3 +1,3 @@
*
!*.*
test-c.o
*.o