You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't done it myself but it should be possible to compute it using the low-level APIs llm.eval() and llm.logits.
tokens=llm.tokenize(sentence)
all_logits= []
fortokenintokens:
llm.eval([token])
all_logits.append(list(llm.logits))
# `all_logits` can be used to compute the log probabilities of tokens.
Activity
NeonBohdan commentedon Jul 5, 2023
Here is the PR that adds perplexity test over input prompt
ggml-org/ggml#184
NeonBohdan commentedon Jul 10, 2023
And here one more example
ggml-org/llama.cpp#270
marella commentedon Jul 16, 2023
I haven't done it myself but it should be possible to compute it using the low-level APIs
llm.eval()andllm.logits.