-
|
Reading int main(int argc, char ** argv) {
...
params.n_ctx = 512;
params.logits_all = true;
...
}But I can’t understand The option
Perhaps someone can help answer my question? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
To measure the perplexity, you need to know the logits of all tokens. Without The reason why
|
Beta Was this translation helpful? Give feedback.
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_alldoes not have any effect inllama-perplexityis because the logits it set in batch:https://github.com/ggerganov/llama.cpp/blob/cfac111e2b3953cdb6b0126e67a2487687646971/examples/perplexity/perplexity.cpp#L604
params.logits_allmaybe used in another example so it's being kept, but marked as deprecated incommon.h