Prebuilt: move the #95 pin to the identity-guard commit - #98
Open
danielhanchen wants to merge 1 commit into
Open
Prebuilt: move the #95 pin to the identity-guard commit#98danielhanchen wants to merge 1 commit into
danielhanchen wants to merge 1 commit into
Conversation
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.
#95 gained a second commit, so the pin has to move with it.
The first version of the patch checked only that each penalized token sat at its own index in
cur_p. An array holding the same id twice then took the by-index path and penalized one of the two entries, where the original scan penalized both. It now requires the full identity layout,data[i].id == ifor everyi, which also rules out duplicates.A differential fuzz over 33600 cases found it: 209 mismatches against the first version, all on the duplicate-id layout, and 0 against this one. The same harness run against the stock library also reports 0, which is the check that the reference implementation is faithful.
Repins from
e2e842ato 3db8cb5 so the nightly builds the fixed version.Throughput with the stricter guard, both builds from
b10359, Qwen3-0.6B-Q4_K_M (151936 vocab), 400 tokens,temperature 0, median of 5:presence_penalty 1.5frequency_penalty 0.8repeat_penalty 1.15Output is unchanged: 60/60 byte identical across 4 prompts, 5 penalty combinations, greedy and two seeded sampled settings.