Repository navigation
Score prompt logprobs in llm-server --replay - #382
Merged
Merged
Conversation
Lewis300
approved these changes
Oct 30, 2026
A replay line can carry a `completion` body (a `/v1/completions` request) in place of a chat `request`, so scoring runs from a JSONL file the same way chat does. - `ReplayRequest.body` is `.chat` or `.completion`; each line has exactly one of `request` or `completion`. - `ReplayResult.choices` takes the shape of the matching response, so a completion line returns `token_logprobs`, `top_logprobs`, `tokens` and `text_offset`. - `runLoglikelihood` scores the prompts for both `/v1/completions` and `--replay`. - Completion lines run under the scoring access, one at a time; the scorer batches the prompts within a line. On an engine without logits the line reports the same error as the endpoint's 501.
stikves
force-pushed
the
sukru/replay-loglikelihood
branch
from
October 30, 2026 18:27
f499aa4 to
e4b4cbf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A
--replayline can now carry a/v1/completionsbody undercompletion, so log-likelihood scoring, such as rolling-window perplexity, runs from a file without HTTP:Its result carries
choicesin the/v1/completionsshape. Both paths score throughrunLoglikelihood; put many prompts in one line, since the scorer batches within a line.