Repository navigation
Add support for Inkling 2 Mini - #70
Merged
Merged
Conversation
Inkling 2 Mini (thinkingmachines/Inkling-2-Mini) is a looped Mixture of Experts model. llama.cpp reads it as the inkling2_loop architecture from b12600. - Move the HIP and Vulkan images from llama.cpp b11889 to b12600. b12600 still takes every llama-server flag and --spec-type value that Sibyl writes. The CUDA image stays at b11889, because llama.cpp publishes no full-cuda image later than b12464. - Count one KV cache for each pass through a looped layer (loop.start, loop.end, loop.count). - Count the attention mask that llama.cpp keeps for each head of a model with a relative-position bias. The cost grows with the micro-batch size, so the fit now takes the ubatch setting. - Read reasoning levels that a chat template keeps as the keys of a map, and follow an alias of an alias to reasoning_effort. - Leave imatrix files out of the download variants. Measured on the test host with one RX 7900 XTX and the IQ4_NL file: 1,448 tokens per second for the prompt and 29.9 for generation. The estimate per context token is within 0.2% of four measurements, which internal/models/meta_test.go holds. Co-Authored-By: Claude Fable 5.2 <[email protected]>
Quay deleted the pinned fedora-bootc:44 manifest, so the os-image build failed with "not found" on every pull request. Dependabot offered Fedora 45 as a major update, which does not merge by itself. While that pull request was open, Dependabot opened none for the digest of Fedora 44. Dependabot now leaves a new Fedora release alone, as it does for ROCm and Ubuntu. Co-Authored-By: Claude Fable 5.2 <[email protected]>
unsloth/Inkling-2-Mini-GGUF is the most downloaded GGUF repository of the model. Its files at the top use a layout that mainline llama.cpp cannot load. Its files for mainline llama.cpp are in Mainline_Support, with the extension .gguf_file. - The download picker takes a .gguf_file file under the plain name of the model, in place of the .gguf file of the same name, and saves it with the .gguf extension. - The HIP and Vulkan builds apply ggml-org/llama.cpp#32704, which llama.cpp did not merge yet. Without it, the later passes through the looped layers run the NVFP4 experts without their scales. containers/llama-swap/patches/README.md says when to remove it. On the test host, the UD-Q4_K_XL file answered chat and tool-call requests correctly on the patched build, at 30.0 tokens per second. Co-Authored-By: Claude Fable 5.2 <[email protected]>
ihavespoons
added a commit
that referenced
this pull request
Nov 21, 2026
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
Sibyl can now run Inkling 2 Mini (thinkingmachines/Inkling-2-Mini). The model is a looped Mixture of Experts model: its middle 12 layers run 3 times for each token. llama.cpp reads it as the
inkling2_looparchitecture from b12600 (ggml-org/llama.cpp#32694).Changes
common/arg.cppandcommon/speculative.cppof both releases: b12600 takes every llama-server flag and every--spec-typevalue that Sibyl writes.Metacounts one KV cache for each pass through a looped layer (loop.start,loop.end,loop.count). The released code counts 4 caches for this model, and llama.cpp keeps 8.Metacounts the attention mask that llama.cpp keeps for each head of a model with a relative-position bias (Meta.MaskHeads). The cost grows with the micro-batch size, soBytesPerToken,ContextBytesandFitInputnow take theubatchsetting.DetectReasoningreads levels that a chat template keeps as the keys of a map, and follows an alias of an alias. The form now offersnone,minimal,low,medium,high,xhighandmaxfor this model. The template refuses any other value with a Jinja exception.unsloth/Inkling-2-Mini-GGUFkeeps its files for mainline llama.cpp asMainline_Support/<name>.gguf_file.hf.Variantsoffers each of them under the plain name, in place of the.gguffile at the top, which declares theinkling2architecture with Unsloth's loop keys. The download saves it with the.ggufextension.containers/llama-swap/patches/. llama.cpp did not merge it yet. Without it, the second and third pass through the looped layers run the NVFP4 experts of the Unsloth files without their scales.git applyfails the build if the patch stops applying.os/Containerfilehas the currentfedora-bootc:44digest. Quay deleted the pinned one, and theos-imagejob failed withnot found.hf.Variantsleavesimatrixfiles out. The picker listedimatrix.ggufofggml-org/Inkling-2-Mini-GGUFas a model.docs/guides/models.mdhas a section for the model, anddocs/design/overview.mdrecords the measurements.Measurements
Host: the test host, two Radeon RX 7900 XTX, ROCm. Build: llama.cpp b12600 (
29b52d3) from thebuildstage ofContainerfile.hipwithGPU_TARGETS=gfx1100. File:Inkling-2-Mini-IQ4_NL.gguf(17.6 GB), which the System API of the installed release downloaded and verified.llama-bench)GPU 0 of the test host is on a PCIe 3.0 x1 link, which makes the split result worse than on most hosts.
Each value is the change in VRAM between two context sizes. The released estimate for this model is 24,576 bytes per token, so it chooses the native context of 1,048,576 tokens. A 65,536-token context at f16 did not load on one 24 GB GPU.
The Unsloth
UD-Q4_K_XLfile, on the same build plus the patch, answered391for 17 * 23 andCanberrafor the capital of Australia, returned a correctget_weathertool call, and gave 1,382 tokens per second for the prompt and 30.0 for generation inllama-bench. I did not run that file on a build without the patch.For the
ggml-orgfile,llama-serveranswered chat requests at 29.4 to 29.8 tokens per second, returned a correctget_weathertool call, and returned HTTP 500 forreasoning_effort: "bogus".Not in this change
ghcr.io/ggml-org/llama.cpp:full-cuda-*tag is b12464, which is older than b12600. An NVIDIA host cannot load the model until llama.cpp publishes a later CUDA image.mmprojfiles for any model, so Inkling 2 Mini reads text only.--spec-typevaluesdraft-dflash2anddraft-lilicorrof b12600.Verification
All three pass, and
golangci-lintreports0 issues. I did not run the arm64 image build oractionlinton the laptop. CI builds the images.🤖 Generated with Claude Code