Prebuilt: pin the penalties sampler fix (#95) - #96
Merged
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.
Pins c26185b from #95 into the nightly prebuild set.
#95 stops
llama_sampler_penalties_applyfrom probing the frequency map once per candidate. It now walkstoken_count(at mostpenalty_last_nentries) and indexescur_pdirectly, with a guard that falls back to the old scan when an earlier sampler has reordered or dropped candidates.This matters for the prebuilds because our own Studio presets enable it: the
qwen3.5andqwen3.6family profiles setpresence_penalty: 1.5, and on a 248320 token vocab the old scan cost about 11% of generation throughput.Qwen3.6-27B-UD-Q4_K_XL, 400 tokens,
temperature 0, median of 4, throughput from llama.cpp's own/metrics:Output is unchanged: 16 stock vs patched comparisons across 4 prompts, both penalty settings, greedy and
temperature 0.8with a fixed seed, all byte identical.tests/test-samplingpasses.Per the notes in
pr-set.jsonthe entry stays listed until the change lands upstream, since merging it into fork master alone would drop it from the mix.