Skip to content

Count the attention masks of Inkling 2 Mini from a head count list - #76

Merged
ihavespoons merged 1 commit into
mainfrom
inkling-mask-heads
Nov 21, 2026
Merged

ihavespoons merged 1 commit into
mainfrom
inkling-mask-heads

Conversation

@ihavespoons

Copy link
Copy Markdown
Collaborator

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, and llama-server exited. This is a fault in #70.

Cause

ggml-org/Inkling-2-Mini-GGUF stores inkling2_loop.attention.head_count as 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. metaFrom read the key as one number and got 0. Meta.MaskHeads then 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

  • metaFrom takes the largest value when attention.head_count is a list (largest in internal/models/meta.go).
  • The header of TestReadMetaLoopedLayers gives head_count and head_count_kv as lists of 24, as the file does. The test fails without the fix: mask heads = 0.

Verification

go vet ./... && go test -race ./... && golangci-lint run ./...

All three pass. I did not load the model with this change on the host. That needs the published image.

🤖 Generated with Claude Code

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]>
@ihavespoons
ihavespoons merged commit 5217e7a into main Nov 21, 2026
15 checks passed
@ihavespoons
ihavespoons deleted the inkling-mask-heads branch November 21, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant