From 6b178988f5a410a9b830dbb33a32e25d95b40334 Mon Sep 17 00:00:00 2001 From: Justine Tunney Date: Tue, 21 May 2024 16:20:25 -0700 Subject: [PATCH] Update examples/perplexity/perplexity.cpp Co-authored-by: compilade --- examples/perplexity/perplexity.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/perplexity/perplexity.cpp b/examples/perplexity/perplexity.cpp index d5a8d59fc..d196af6e6 100644 --- a/examples/perplexity/perplexity.cpp +++ b/examples/perplexity/perplexity.cpp @@ -639,7 +639,7 @@ static results_perplexity perplexity(llama_context * ctx, const gpt_params & par for (int seq = 0; seq < n_seq_batch; seq++) { const float * all_logits = num_batches > 1 ? logits.data() : llama_get_logits_ith(ctx, seq*n_ctx + first); if (!all_logits) { - return 1; + return {std::move(tokens), -1, {}, {}}; } llama_token * tokens_data = tokens.data() + start + seq*n_ctx + first;