From 5224b6534ebc417ab2cb1d43ab219297e1cbcb81 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Tue, 21 May 2024 16:19:53 -0700 Subject: [PATCH] Update llama.cpp Co-authored-by: compilade --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 894281d2a..a7e800af1 100644 --- a/llama.cpp +++ b/llama.cpp @@ -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()));