Skip to content

Fix adaptive p sampler bug with string ban#1287

Merged
ikawrakow merged 9 commits intoikawrakow:mainfrom
dungquixote42:adaptive_p-decouple_update
Feb 20, 2026
Merged

Fix adaptive p sampler bug with string ban#1287
ikawrakow merged 9 commits intoikawrakow:mainfrom
dungquixote42:adaptive_p-decouple_update

Conversation

@dungquixote42
Copy link
Contributor

This PR updates the adaptive p sampler internal state only when selected tokens are not rewinded by string bans.

@dungquixote42 dungquixote42 marked this pull request as draft February 19, 2026 02:01
@dungquixote42 dungquixote42 marked this pull request as ready for review February 19, 2026 07:07
@ikawrakow
Copy link
Owner

As far as I can tell, this rewinds just the last sampled token?

Aren't string bans supposed to remove whole sequences of tokens?

@dungquixote42
Copy link
Contributor Author

As far as I can tell, this rewinds just the last sampled token?

Aren't string bans supposed to remove whole sequences of tokens?

You are right. It should handle multi-token rewinds correctly now.

@ikawrakow ikawrakow merged commit 0f411b0 into ikawrakow:main Feb 20, 2026
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