Skip to content

What's logits_all meaning in perplexity? #9037

Closed Answered by ngxson
Septa2112 asked this question in Q&A
Discussion options

You must be logged in to vote

To measure the perplexity, you need to know the logits of all tokens. Without logits_all, you can only receive the logits of last token in sequence (which is useful in generation mode).

The reason why params.logits_all does not have any effect in llama-perplexity is because the logits it set in batch:

batch.logits [idx] = batch.pos[idx] >= first ? 1 : 0;

params.logits_all maybe used in another example so it's being kept, but marked as deprecated in common.h

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Septa2112
Comment options

Answer selected by Septa2112
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants