Repository navigation
Conversation
…pt between picks The greedy argmax takes the first maximum in vector steps and keeps the scalar scan for a row holding a NaN, so it picks the same id; a sampled pick reuses its float64 logits and its ids instead of allocating both every row.
This branch has not been deployed
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.
On Metal, DeepSeek-V4.1 picks a row's token on the host (
metal/target.zig,choose). A greedy pick scanned all 129,280 logits one at a time. A sampled pick allocated a float64 copy of the logits and an id list, about 2 MB, on every row before calling the lane core'ssampling.choose. A drafted round picks one row per window row, so this adds up.sampling.chooseon the same values, so the draw is unchanged.On an M5 Ultra (512 GB), release weights, with #2973, #2983 and the FP8 rows change underneath, on the five prose prompts of
tools/bench_prompts.jsonat 512 tokens, one run each:Every reply's text equals main's (10 of 10).
zig build test-dsv41-metal -Dcpu=apple_m1passes on an M5 Max, and lean reports no new problems.