diff options
author | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-10 23:46:39 +0200 |
---|---|---|
committer | Georgi Gerganov <ggerganov@gmail.com> | 2023-03-10 23:46:57 +0200 |
commit | 70bc0b8b15b98dca23b28f0c8f5e34b27e424cda (patch) | |
tree | b5d02edef24e8218d28a57c7ee4a6e2208759f15 /utils.h | |
parent | 18ebda34d67c05f4f5584a9209e7efb949f5fd56 (diff) |
Fix a bug in the rope calculation
Diffstat (limited to 'utils.h')
-rw-r--r-- | utils.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -18,7 +18,7 @@ struct gpt_params { int32_t n_predict = 128; // new tokens to predict // sampling parameters - int32_t top_k = 40; + int32_t top_k = 40; // unused float top_p = 0.95f; float temp = 0.80f; @@ -86,6 +86,13 @@ gpt_vocab::id gpt_sample_top_k_top_p( double temp, std::mt19937 & rng); +gpt_vocab::id llama_sample_top_p( + const gpt_vocab & vocab, + const float * logits, + double top_p, + double temp, + std::mt19937 & rng); + // // Quantization // |