Skip to content

Commit

Permalink
Update examples/perplexity/perplexity.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: compilade <[email protected]>
  • Loading branch information
jart and compilade authored May 21, 2024
1 parent cc363da commit 6b17898
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/perplexity/perplexity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6b17898

Please sign in to comment.