Skip to content

Commit 6b17898

Browse files
jartcompilade
andauthored
Update examples/perplexity/perplexity.cpp
Co-authored-by: compilade <git@compilade.net>
1 parent cc363da commit 6b17898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/perplexity/perplexity.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ static results_perplexity perplexity(llama_context * ctx, const gpt_params & par
639639
for (int seq = 0; seq < n_seq_batch; seq++) {
640640
const float * all_logits = num_batches > 1 ? logits.data() : llama_get_logits_ith(ctx, seq*n_ctx + first);
641641
if (!all_logits) {
642-
return 1;
642+
return {std::move(tokens), -1, {}, {}};
643643
}
644644

645645
llama_token * tokens_data = tokens.data() + start + seq*n_ctx + first;

0 commit comments

Comments
 (0)