Skip to content

Commit

Permalink
Fixed mismatch type errors
Browse files Browse the repository at this point in the history
* cited in macOS CI tests
* Missed in original updates based on PR feedback in #6519
  • Loading branch information
TheFlipbook committed Apr 7, 2024
1 parent 95bf5f7 commit 420cf62
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15536,9 +15536,9 @@ float * llama_get_logits_ith(struct llama_context * ctx, int32_t i) {
if (j < 0) {
throw std::runtime_error(format("batch.logits[%d] != true", i));
}
if ((size_t) j >= ctx->n_outputs) {
if (j >= ctx->n_outputs) {
// This should not happen
throw std::runtime_error(format("corrupt output buffer (j=%d, n_outputs=%lu)", j, ctx->n_outputs));
throw std::runtime_error(format("corrupt output buffer (j=%d, n_outputs=%d)", j, ctx->n_outputs));
}

return ctx->logits + j*ctx->model.hparams.n_vocab;
Expand Down Expand Up @@ -15581,9 +15581,9 @@ float * llama_get_embeddings_ith(struct llama_context * ctx, int32_t i) {
if (j < 0) {
throw std::runtime_error(format("batch.logits[%d] != true", i));
}
if ((size_t) j >= ctx->n_outputs) {
if (j >= ctx->n_outputs) {
// This should not happen
throw std::runtime_error(format("corrupt output buffer (j=%d, n_outputs=%lu)", j, ctx->n_outputs));
throw std::runtime_error(format("corrupt output buffer (j=%d, n_outputs=%d)", j, ctx->n_outputs));
}

return ctx->embd + j*ctx->model.hparams.n_embd;
Expand Down

0 comments on commit 420cf62

Please sign in to comment.