Repository navigation
Conversation
Check masked Inf and NaN separately against binary64, including visible IEEE classes, sparse padding and wrapped windows. Retain the 45 measured inherited failures as known #1009 findings and catch both planted GPU controls. Register the suite in the Metal contract and provide a source-only focused runner. Production kernels and dispatch remain unchanged.
…e the default install
Retain the original finite attention libraries and select a separate correction on the GPU for newly written non-finite values hidden from earlier rows. Restore visible IEEE contributions and cover both cache layouts and probability modes.
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.
Part of #1009. Stacked on #2308 (the Metal masked non-finite census): the first commit here past #2308's head is "nemotron: isolate exceptional prompt values from causal…". Review the last 7 commits. This lands after #2308.
The bug: Nemotron's prompt attention on Metal could let a non-finite value (Inf or NaN) in a masked key's V reach the output. The probability there is zero, but in the tensor P×V product, 0 × Inf is NaN. #2308's census lists Nemotron's prompt cases as known findings, and this fixes them the way #2106 fixed the others.
The fix:
attention_nax.metal,paged.zig,frags.zigand the Metal compile options are byte-identical to main. Single-row decode (L == 1) is untouched.Checks (Apple M5 Ultra):
Decode is level across all eight sweep cells. Greedy chat goes from 246.15 to 246.95 tok/s at one stream, and from 241.55 to 242.15 tok/s aggregate at four. Gaps under 3% aren't claimed as speedups.
Lean is unchanged,
zig fmt --checkpasses, and every touched file is at 600 lines or under.