Adaptive P sampler: update review logic, delete old code comments, put prep stage after logit bias#1386
Merged
ikawrakow merged 22 commits intoikawrakow:mainfrom Mar 14, 2026
Merged
Conversation
Contributor
Author
|
Converting to draft until #1243 is merged. |
This reverts commit 1434878.
Contributor
Author
|
Tokens belonging to banned strings often have high logits, and |
Owner
|
I see you keep changing things around. When you get to a version that does not need multiple follow up PRs, let me know. |
Contributor
Author
Yeah. I just keep finding these cases I did not account for. It is over now, at least from my end. |
Contributor
Author
|
@ikawrakow This PR is ready for review. |
ikawrakow
approved these changes
Mar 14, 2026
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.
This PR deletes old code comments left in #1359 .
The review logic now tracks
slot.token_buffer.size(), instead ofn_rewind. Looking at the end result of bans/rewinds should be more reliable than recreating the math. As a side effect, this corerctly handles a case wheresend_token_results(2)does not actually send all tokens.This removes all
llama_review_adaptive_p_impl()related variables frombuffer_and_check_string_ban(). Hopefully, this helps with the supposed bug regarding #1243 .