Skip to content

fix: align echoed token log probabilities for prompts without a BOS token - #2420

Open
remote-controlled-man wants to merge 1 commit into
abetlen:mainfrom
remote-controlled-man:codex/prflow-06bed9288b0e
Open

remote-controlled-man wants to merge 1 commit into
abetlen:mainfrom
remote-controlled-man:codex/prflow-06bed9288b0e

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Without a leading BOS token, echo=True pairs prompt tokens with the wrong prediction rows and can omit the final generated token from logprobs.

Align each token with the preceding model position while retaining the first echoed token's null probability. Add real-model regression tests for prompts with and without BOS, single-token prompts, and non-echo and streaming controls.

Related to #1983.

Validation on macOS arm64, Python 3.12, CPU-only GGML:

  • make test
  • make lint

Copilot AI balanced review requested due to automatic review settings November 18, 2026 02:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants