Skip to content
One AI API Key
Blog

Inkling 2 Mini local setup: llama.cpp commands and the block_count bug that breaks it

A working Inkling 2 Mini llama.cpp setup, plus the blk.24 tensor and block_count bug that stops most first builds. All five gotchas, fixed step by step.

One AI API Key TeamPublished 9 min read
On this page

Inkling 2 Mini is one of the most interesting local models released in 2026 — 26.4B total parameters, Apache 2.0, and a looped architecture that reuses its middle layers three times per token. It is also, as of launch week, one of the more annoying models to get running in llama.cpp, because of a single blocker that trips up almost every first build: a mismatch between how the loop is stored in the GGUF and how llama.cpp versions count blocks. This post is the full setup, front to back, with that bug fixed.

Before you start, confirm your hardware clears the bar. Mini needs 32GB+ to serve the full-precision checkpoint as-is (about 20GB in mixed NVFP4/MXFP8/BF16), but quantized GGUF builds run on much less — see the memory footprint and 16GB quant ladder to pick a quant for your card. If you would rather skip the build entirely, there are hosted paths covered at the end, and a free API guide that walks through the no-hardware option.

Step 1: Build llama.cpp with CUDA

Start from a current llama.cpp checkout. Configure a Release build with CUDA enabled:

Configure the build
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_CUDA=ON

Then build the CLI, server, and multimodal tools:

Build the targets
cmake --build build -j --target llama-cli llama-server llama-mtmd-cli

That produces llama-cli for one-shot runs, llama-server for an OpenAI-compatible local endpoint, and llama-mtmd-cli for vision (text+image) input. This mirrors the build sequence in the atomic.chat guide, which is the best independent walkthrough of the local path.

Step 2: Get a GGUF quant

The reference quant collection is AtomicChat / Inkling-2-Mini-GGUF. The quant you pick is a hardware decision, and it is the same decision whether you want the base model or the uncensored variant:

Hardware Recommended quant Approx context
8GB AD-IQ1_S short only
12GB AD-IQ2_M ~8K
16GB AD-IQ3_S ~8K
24GB (3090/4090) AD-Q5_K ~24K
32GB (5090) AD-Q6_K ~48K
48GB+ Q8_0 ~128K

The AD- prefix is Atomic Dynamic — experts are quantized to low bit-width while attention and the loop stay at Q8_0, because the experts hold about 94% of the weights. On a 16GB card, AD-IQ3_S gives ~8K context at 94.2% fidelity; AD-Q4_K only fits with CPU expert offloading (--n-cpu-moe 8). The full ladder with fidelity numbers is in the quant ladder post.

Step 3: The blocker — blk.24 and block_count 24 vs 48

This is the part that stops most first builds, so let us be direct about it.

Inkling 2 Mini stores 24 layers, but the loop makes the middle 12 run three times, so the model applies 48 layer blocks per token. That creates an ambiguity in the GGUF: does the tensor count reflect the 24 stored layers or the 48 applications?

You will hit this as an error referencing blk.24.attn_q.weight. The tensor is being looked up at block index 24 — which does not exist if the loader only allocated 24 blocks, and does exist in some builds that merged the loop into 48 physical blocks. This is the crux of the bug:

  • block_count set to 24 (the stored layers): works correctly.
  • block_count set to 48 (the applications): breaks, because there are no tensors past block 23 in the standard GGUF.

This was tracked as PR #32695, which handled the 48-vs-24 block mapping (24 + loop). It is fixed in later llama.cpp.

The one-line fix for most people: make sure your llama.cpp is newer than the PR that fixed the loop block mapping, and do not manually override block_count to 48. The model metadata should keep inkling2_loop block semantics at 24 stored layers.

The version you need

  • AtomicChat 2.4.7 = build b12532 — too old. You need b12600 or newer.
  • The loop block mapping fix landed in PR #32695.
  • A later PR #32704 (Nov 21) in the Unsloth Mainline branch contains additional loop fixes — if you are on a build after #32704, several of these edge cases are already handled.

If you see blk.24 tensor errors on an older build, updating llama.cpp is almost always the correct fix — not hand-editing GGUF metadata.

Step 4: Start the server

With a current build, serving is straightforward. Point -hf at the AtomicChat repo and a quant tag, enable the chat template with --jinja, keep temperature at 1.0:

Serve Inkling 2 Mini
./build/bin/llama-server \
-hf AtomicChat/Inkling-2-Mini-GGUF:AD-Q4_K \
--alias inkling-2-mini \
--jinja --temp 1.0 \
-ngl 99 -c 8192 \
--host 127.0.0.1 --port 8080

What each flag does:

  • -hf AtomicChat/...:AD-Q4_K — pulls the quant from Hugging Face. Swap the tag for your hardware.
  • --jinja — required to load the chat template. Without it, prompts render wrong.
  • --temp 1.0 — the model is tuned for temperature 1.0; lower values degrade output.
  • -ngl 99 — offload all layers to GPU.
  • -c 8192 — context window. Lower this if you hit out-of-memory (see gotcha 4).

The endpoint is OpenAI-compatible, so you can point any standard client at http://127.0.0.1:8080. For throughput expectations, see the local speed measurements.

Step 5: Vision (text + image in)

Mini accepts image input. To enable it, load the multimodal projector (mmproj) alongside the main weights. The vision projector is small — about 0.35GB for mmproj-Inkling-2-Mini-Q8_0.gguf:

Serve with vision
./build/bin/llama-server \
-hf AtomicChat/Inkling-2-Mini-GGUF:AD-Q4_K \
--mmproj mmproj-Inkling-2-Mini-Q8_0.gguf \
--alias inkling-2-mini \
--jinja --temp 1.0 -ngl 99 -c 8192 \
--host 127.0.0.1 --port 8080

You can also use llama-mtmd-cli for single-shot image+text prompts without running a server. What vision actually does well and badly is covered in the multimodal and vision post.

The five gotchas

These are the issues that account for nearly all failed Inkling 2 Mini setups.

1. The blk.24 / block_count bug. Covered above — this is the #1 blocker. Use a build after PR #32695 (ideally after #32704, Nov 21). Keep block_count at 24; do not force 48. If you see blk.24.attn_q.weight errors, update llama.cpp.

2. Thinking cannot be fully turned off. You can lower reasoning_effort to none or minimal, but the looped architecture will still emit some reasoning behavior. Do not expect a fully silent thinking mode.

3. Cap max_tokens. Because the model likes to reason, uncapped generation can run very long and burn context. Set an explicit max_tokens on requests, especially on smaller-context quants.

4. OOM — control context with -c and -ub. Out of memory is almost always a context-size problem, not a weights problem. Drop -c, and set -ub 256 to halve the compute-buffer memory. Context memory overhead grows steeply at long lengths — a full 1M context needs on the order of 138GB server-side, so choose a realistic -c. The numbers per context length are in the memory footprint post.

5. Build version. AtomicChat 2.4.7 (b12532) is too old. You need b12600+. If things misbehave and you are below that, update before debugging anything else.

Choosing context and quant together

The two settings that interact most are context size (-c) and quant tier. A bigger quant leaves less room for context, and vice versa. As a planning guide:

  • 8GB: AD-IQ1_S, short context only, 79.5% fidelity — experimentation, not production.
  • 12GB: AD-IQ2_M at ~8K context, 85.7% fidelity.
  • 16GB: AD-IQ3_S at ~8K, 94.2% fidelity; AD-Q4_K only with --n-cpu-moe 8.
  • 24GB: AD-Q5_K at ~24K — the sweet spot for a single 3090/4090.
  • 32GB: AD-Q6_K at ~48K, within 0.1 point of Q8_0.
  • 48GB+: Q8_0 at ~128K.

Every additional gigabyte of memory buys roughly +7.5K tokens of context, and halving -ub 256 frees buffer memory for context. The full per-context-length overhead table — from about 0.5GB at 8K up to roughly 138GB for a 1M server — is in the memory footprint post, and the fidelity-versus-size tradeoffs are in the quant ladder.

Cloud and one-command alternatives

If you do not have a suitable GPU, you have three alternatives that avoid the local build entirely. First, rent by the hour — Mini runs well on Vast.ai and RunPod, with step-by-step guides in the Vast.ai setup and RunPod setup posts. Second, use a notebook environment like Kaggle for short experiments — see the Kaggle setup. Third, run it through Ollama, which wraps the whole flow into a single ollama run inkling-2-mini — covered in the Ollama setup, with Apple Silicon specifics in the Mac Mini setup.

For the financial side of that choice — when a rented or owned GPU beats paying per token — the local-vs-API economics and 3090 monthly cost posts do the math.

A working end-to-end check

Once the server is up, confirm it responds and reports the right context:

Smoke test
curl http://127.0.0.1:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
  "model": "inkling-2-mini",
  "messages": [{"role":"user","content":"Say hi in five words."}],
  "max_tokens": 50,
  "temperature": 1.0
}'

If that returns cleanly, your loop is loading correctly and the blk.24 bug is not biting you.

Prefer a one-command path?

If you would rather not manage cmake and GGUF tags manually, Mini is also available through Ollama as inkling-2-mini (with MLX builds for Apple Silicon) — see the Ollama setup. For Mac-specific hardware guidance, the Mac Mini setup post maps memory tiers to context windows. On Windows/Linux with a spare GPU, the self-hosted path above is the most direct.

For a sense of what local performance to expect, kingy.ai measured Mini at 19.2 tok/s on an M4 Pro 24GB (UD-Q4_K_M, 16.6GB) — top of six models tested — versus 12.1 tok/s for Qwen3.8-27B 4-bit on the same hardware, with a hosted strict score of 36/36. Those numbers and more are in the local speed and vs Qwen3.8-27B writeups.

The bottom line

Getting Inkling 2 Mini running locally is a five-step job, and four of the steps are ordinary. The fifth — the blk.24 tensor and block_count 24-vs-48 bug — is the one that costs people hours, and the fix is simply running a llama.cpp build that includes the loop block-mapping fix (PR #32695, and later #32704), keeping block_count at 24. Build with CUDA, pick a quant for your VRAM, enable --jinja at --temp 1.0, cap max_tokens, and drop -c/-ub 256 if you hit OOM. Do that and the rest is a normal OpenAI-compatible local endpoint.

If you would rather skip the build entirely, you can reach hosted Inkling 2 Mini through oneapiapikey without touching a single CMake flag.

Create your free API key Browse available models Estimate your costs
More in Blog

Try it

One API key for Claude, GPT, Grok, DeepSeek, Kimi, Qwen, GLM, MiniMax, Step, Crow, Dots, Beam, Nemotron, Jailbreak, MiMo, Gemini, Muse and Mistral.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.