|
Entropic 2.3.8
Local-first agentic inference engine
|
Per-token log-probability result. More...
#include <entropic/entropic.h>
Public Attributes | |
| float * | logprobs |
| Per-token log-probabilities (N-1 values). | |
| int32_t * | tokens |
| Input tokens echoed back (N values). | |
| float | perplexity |
| exp(-mean(logprobs)) over the sequence. | |
| float | total_logprob |
| Sum of all logprob values. | |
| int | n_tokens |
| Number of input tokens. | |
| int | n_logprobs |
| Number of logprob values (n_tokens - 1). | |
Per-token log-probability result.
Contains per-token log-probabilities for a sequence evaluated against a loaded model. The logprobs array has (n_tokens - 1) entries: logprobs[i] is the log-probability of tokens[i+1] given tokens[0..i].
The struct itself is caller-owned (stack or heap). The internal logprobs and tokens arrays are engine-allocated and must be freed via entropic_free_logprob_result().
Definition at line 2077 of file entropic.h.
| float* entropic_logprob_result::logprobs |
Per-token log-probabilities (N-1 values).
Engine-allocated.
Definition at line 2078 of file entropic.h.
| int entropic_logprob_result::n_logprobs |
Number of logprob values (n_tokens - 1).
Definition at line 2083 of file entropic.h.
| int entropic_logprob_result::n_tokens |
Number of input tokens.
Definition at line 2082 of file entropic.h.
| float entropic_logprob_result::perplexity |
exp(-mean(logprobs)) over the sequence.
Definition at line 2080 of file entropic.h.
| int32_t* entropic_logprob_result::tokens |
| float entropic_logprob_result::total_logprob |
Sum of all logprob values.
Definition at line 2081 of file entropic.h.