Update llama.cpp

Co-authored-by: compilade <git@compilade.net>
This commit is contained in:
Justine Tunney 2024-05-21 16:19:53 -07:00 committed by GitHub
parent ac6bed1e4d
commit 5224b6534e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -17319,7 +17319,7 @@ float * llama_get_logits_ith(struct llama_context * ctx, int32_t i) {
if (i < 0) {
j = ctx->n_outputs + i;
if (j < 0) {
return llama_get_logits_ith_fail(i, format("negative index out of range [0, %d)", ctx->n_outputs));
return llama_get_logits_ith_fail(i, format("negative index out of range [%d, 0)", -ctx->n_outputs));
}
} else if ((size_t) i >= ctx->output_ids.size()) {
return llama_get_logits_ith_fail(i, format("out of range [0, %lu)", ctx->output_ids.size()));