Repository navigation
pr-set : repin #385 and #386 for the Inkling 2 compute buffer reserve, and #251, #378, #396, #401 for review fixes - #422
Merged
Conversation
…covers the dense relative bias
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
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.
Repins #385 and #386 to their fix for the Inkling 2 compute buffer growing past the size reserved at load, and repins #251, #378, #386, #396 and #401 for their review fixes.
ggml_castinstead of a copy into a graph leaf; the graph reserved at load also covers the dense cases one sequence still takessrc[6]; Inkling mmproj loads withoutv.patch_embd.weight; test-flash-attn-bias fails on non-finite output; banded attention does not delegate to MMA when flash attention is compiled out (#386 carries the same four fixes)All are fast-forwards of the pinned commits. Each fix is described on its own PR. The cause and the full tables are in the two PR descriptions.
Why
The graph reserved at load took the banded path, while several runtime cases still build the dense relative bias (several sequences in a unified cache, ubatches of 32 tokens or less, the SWA layers once the SWA cache wraps). The dense bias was also copied into a graph leaf, which the allocator keeps for the whole graph, so #385's chunking did not bound memory. The buffer then grew at runtime, up to an OOM in the middle of a generation.
CUDA0 compute buffer, reserved at load / largest at runtime, MiB (B200, Inkling-2-Mini UD-IQ1_S):
-kvu-kvu-kvuOne slot at f16 reserves a little more at load: +56 / +223 MiB at 32768 and +175 / +643 MiB at 131072 (
-ub 512/-ub 2048).Output is unchanged (PPL strings equal to the current pins at
-c 512and-c 4096, mean KLD 0, single and multi-sequence). Runtime graphs have the same node count as before; the extra reserve nodes exist only in the graph built at load.Checks
Not covered: ROCm, Vulkan, Metal and Windows (the change is in the model graph, not a backend), and timing beyond a llama-bench sanity check (pp512 and tg128 within noise).