Repository navigation
Count the attention masks of Inkling 2 Mini from a head count list - #76
Merged
Merged
Conversation
ggml-org/Inkling-2-Mini-GGUF gives attention.head_count as a list of 24 values, one for each layer. metaFrom read it as one number, got 0 heads, and left the attention mask term out of the memory estimate. The test of #70 used one number, so it did not show this. On the test host, the fit then chose a context of 118,784 tokens for one 24 GB GPU, at 49,152 bytes for each token. llama-server needs 133,978, and it exited when the model loaded. metaFrom now takes the largest value of the list, and the test header gives both head counts as lists, as the file does. Co-Authored-By: Claude Fable 5.2 <[email protected]>
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.
Summary
Inkling 2 Mini did not load on the test host after the update to
sha-d86a76d. The fit chose a context of 118,784 tokens for one 24 GB GPU, andllama-serverexited. This is a fault in #70.Cause
ggml-org/Inkling-2-Mini-GGUFstoresinkling2_loop.attention.head_countas a list of 24 values, one for each layer. I read the value type from the file on the host: type 9 (array) of type 5 (int32), 24 entries.metaFromread the key as one number and got 0.Meta.MaskHeadsthen stayed 0, so the estimate left out the attention masks: 49,152 bytes for each context token, where the host measured 133,978.The test of #70 gave the head count as one number, so it passed.
Changes
metaFromtakes the largest value whenattention.head_countis a list (largestininternal/models/meta.go).TestReadMetaLoopedLayersgiveshead_countandhead_count_kvas lists of 24, as the file does. The test fails without the fix:mask heads = 0.Verification
All three pass. I did not load the model with this change on the host. That needs the published image.
🤖 Generated with Claude Code