r/llamacpp • u/BhatSahab • 3h ago
Inkling 2 Mini at 256k context on a single 16 GB RX 9070 XT: 55–85 tok/s with a patched llama.cpp (ROCm), ~3× upstream on chat and ~10× on long prompts
I spent the last few days getting Thinking Machines' Inkling 2 Mini (26B total / ~5B active looped MoE, 1M context) running as fast as possible on one 16 GB AMD card. Sharing the numbers and what actually mattered, because this model behaves very differently from the usual MoEs.
Hardware: RX 9070 XT 16 GB (RDNA4, gfx1201), i9-14900K, 32 GB DDR5, PCIe 5.0, Arch + ROCm. Everything stays under ~15.2 GB of VRAM including the desktop (a full card froze my session, so every test ran under a VRAM watchdog).
Software: Unsloth's llama.cpp fork plus 26 patches (24 of my own: custom HIP kernels, scheduler and launcher changes; plus two open upstream PRs, #32215 DPP warp reductions and #30685 async input copies), DSpark speculative decoding + n-gram lookup drafting, q4_0 KV cache for both the model and the drafter.
Results (greedy, 768-token coding answer; "edit" = rewrite a file; prompt = 54k tokens)
| Quant | Context | Chat | Code edit | 54k prompt | Peak VRAM |
|---|---|---|---|---|---|
| Unsloth UD-Q4_K_M | 256k | 55–57 tok/s | 120 | ~1,020 tok/s | 15.2 GB |
| Unsloth UD-Q4_K_M | 128k | 62 | 136 | 1,094 | 15.2 GB |
| GSQ-RCO IQ4_XS (abenzerps) | 256k | 67 | 136–162 | ~1,350 | 15.1 GB |
| GSQ-RCO IQ4_XS | 128k | 85 | 171 | 1,459 | 15.0 GB |
| AtomicChat IQ3_XXS | 256k | 79–83 | 180–200 | ~1,355 | 15.1 GB |
| AtomicChat IQ3_XXS | 64k (all in VRAM) | ~90 | — | 1,689 | 14.8 GB |
Where I started: Unsloth's prebuilt at 16k context did 23 tok/s, and 10.8 tok/s with DSpark (the drafter overcommitted VRAM).
Same weights against upstream llama.cpp (built today, same flags and toolchain)
| GSQ IQ4_XS | upstream master | upstream + DSpark PR #32218 | patched |
|---|---|---|---|
| 128k chat | 29.1 | 35.6 | 84.9 |
| 128k code edit | 89.6 | 88.8 | 171 |
| 128k, 54k prompt | 210 tok/s | 212 | 1,459 |
| 256k chat | 19.4 | — | 67 |
| 256k, 54k prompt | 125 tok/s | — | ~1,350 |
Kernel-only (llama-bench, no drafting): decode +17%, prompt at 32k depth 3.8×. Upstream has to drop to ubatch 64 (128k) / 32 (256k) because its Inkling attention wants a 12.9 GB buffer at ub 512.
Quant quality (wikitext-2 KLD against UD-Q4_K_M logits)
GSQ-RCO IQ4_XS: KLD 0.015, same top token 95.1%. That's the best of the small quants: close to Q4_K_M and about 20% faster than it, so it's what I'd recommend for 16 GB.
AtomicChat IQ3_XXS: 0.024 / 93.9%
GSQ-RCO IQ3_XS: 0.051 / 91.0%. It hit ~100 tok/s with 256k fully in VRAM, but the quality loss was too much for me.
Things that didn't help
Vulkan (no banded attention kernels, 11–17 tok/s), F16 KV, an acceptance-driven adaptive draft length (its depth flips cost more than they save), overlapping the RAM-expert uploads with compute (needs ~0.8 GB of staging VRAM, which is worth more as expert cache), and a few upstream PRs that don't touch these quants.
Caveats
One machine.
Greedy benchmarks, with ±5–10% noise because the desktop shares the GPU.
Generation at temperature 1.0 is a few tok/s lower (DSpark acceptance drops).
DSpark for Inkling isn't in upstream master yet: PR #32218 works with Unsloth's new mainline-format drafter. Unsloth's old-format drafter only works with their fork.
I'm thinking about upstreaming the attention kernels if there's interest.