When llama-server returns logprob: 0.0 alongside empty top_logprobs arrays while speculative decoding is enabled, do not treat those fields as evidence of model certainty. An issue opened on August 29, 2026 reports that behavior in one development-build setup; it does not establish that every current build is affected. Compare the same request with speculative decoding off before relying on these values for scoring or evaluation.
What the reported logprob values mean
A log probability of 0.0 corresponds to a probability of 1.0. That is an unusually strong claim about a generated token, not a neutral or missing-value marker. If the same response also has empty top_logprobs arrays despite a request for alternatives, the fields are suspicious: the alternatives the caller requested are absent, and the zero should not be read as genuine certainty.
As an Amazon Associate I earn from qualifying purchases.
Issue #27972 in the llama.cpp tracker reports this signature for llama-server with speculative decoding enabled. The report is a single issue author’s example, not an independent reproduction or a benchmark across releases.
What issue #27972 observed
Opened by jvdneste on August 29, 2026, the report describes a llama.cpp development build using a Gemma 4 target, an MTP drafter, and --spec-type draft-mtp. The request asked for log probabilities and three top alternatives.
#1 Best Overall
| Issue author’s example | Speculative decoding enabled | Drafter flags removed |
|---|---|---|
| Generated tokens reported | 24 | 24 |
Tokens with logprob: 0.0 |
23 of 24 | 0 of 24 |
| Top alternatives | Empty for the affected tokens | Three alternatives in displayed samples |
| Speculative acceptance | draft_n_accepted=14 out of draft_n=24 |
Not stated in the report |
These counts describe that author’s reported setup only. They do not predict what another model, speculative implementation, commit, or release will return.
Why the issue author suspects a placeholder probability
The issue author attributes the discrepancy to a speculative “main model sample and accept” path. In the author’s code analysis, that path sets result.prob = 1.0f but does not populate result.probs before the response is serialized. Since the logarithm of 1 is 0, the placeholder can surface as logprob: 0.0 while leaving the requested top alternatives empty. The issue quotes the code comment // TODO: set result.probs.
Rank #2
This is the reporter’s explanation of the path, not an independently verified diagnosis for every build. The report characterizes the issue as being in a generic accept path and says the particular model pairing is incidental; that claim has not been established here across all speculative modes or versions.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesWhat llama-server documents these fields to do
The llama-server README describes n_probs as returning the top-N token probabilities for each generated token. It also documents post_sampling_probs as returning probabilities after the sampling chain. With that option, response fields use prob and top_probs rather than logprob and top_logprobs.
Rank #3
Those documented semantics explain what the options are intended to provide; they do not guarantee correct output from every code path in every build. In particular, the issue’s reported zero-plus-empty-alternatives combination should not be accepted as trustworthy merely because the response is syntactically valid.
How to check whether your build shows the same signature
- Record the setup. Note the llama.cpp version and commit, target model, speculative implementation and drafter options, sampling parameters, requested
n_probsvalue, and whetherpost_sampling_probsis enabled. - Make a controlled pair of requests. Use the same server build, target model, prompt, sampling settings, and requested top-N count. Change only whether speculative decoding is enabled. The issue author’s example uses this enabled/disabled comparison.
- Inspect per-token fields. Check whether log probabilities vary, whether the requested alternatives are populated, and whether speculative acceptance is reported. If using post-sampling probabilities, inspect
probandtop_probsinstead of assuming the logprob field names apply. - Decide whether the values are usable. If the speculative request returns repeated
0.0logprobs with empty top alternatives, do not feed those values into perplexity calculations, confidence gates, model rankings, or other likelihood-based evaluation until you have verified the implementation for that exact build.
Does this affect every llama.cpp build?
The available evidence does not establish that. The issue page was observed as open, with no assignee or linked branch or pull request at that time; that page status does not rule out a later fix or unreleased changes. No build-by-build reproduction or fix verification is established by the cited sources. Check the exact commit you deploy and run the controlled comparison above before deciding whether its probability output is reliable.
Rank #4
Why the distinction matters for evaluation
Generated text can look plausible even when its accompanying probability fields are not useful. If a downstream evaluator treats a placeholder zero logprob as a genuine probability of 1.0, it can silently distort likelihood-based scores or confidence decisions. Keep text-generation quality and probability-field integrity as separate checks: a sensible token stream does not validate the reported token probabilities.
Free tools Windows power users keep installed
One-click scans. No signup required.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




