Repository navigation
Conversation
… step reads kappa as the FP32 it is
… ranks the kernel writes
…s in a bounded heap, not a full sort - gpu_rule.sample and gpu_full.plan sorted every scaled logit of the row to read at most 1,024 of them; on a 201,058-token vocabulary the sort is 15 ms of a draw that takes 0.11 ms without it. - rule.topCands keeps the first n entries of better's total (key, id) order in a heap with an early reject and sorts those n, so the prefix, the row maximum and every draw are the full sort's bit for bit; the row-order normalizer is summed only when top_k is off, and a top_k above 1,024 still sorts the row for its kth candidate. - gpu_top_test.zig compares the prefix, the maximum, the normalizer, the plan and the draws with a full-sort reference on 12 kinds of row (ties, signed zeros, NaN, infinities, extremes, ramps), 4 temperatures and 9 top_k, top_p and min_p rules.
Owner
Author
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.
CI for a landing train: #4447 #4744 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.