diff --git a/gpt4all-backend/utils.cpp b/gpt4all-backend/utils.cpp index 8769315e..46827980 100644 --- a/gpt4all-backend/utils.cpp +++ b/gpt4all-backend/utils.cpp @@ -230,7 +230,7 @@ gpt_vocab::id gpt_sample_top_k_top_p( int n_logits = actualVocabSize; const auto last_n_tokens = std::vector(last_n_tokens_data, last_n_tokens_data + last_n_tokens_size); - const auto * plogits = logits.data() + logits.size() - n_logits; + const auto * plogits = logits.data(); std::vector> logits_id; logits_id.reserve(n_logits);