Inkling-2-Mini 26.4B looped MoE at 64k on llama.cpp17.6 GB of IQ4_NL on 12 GB
A 17.6 GB looped MoE on a 12 GB card: the experts of the loop core (layers 6-17, read three times per token) on the GPU, the rest in RAM, on stock llama.cpp master at ub 1024. 32.9 tok/s decode and 568 tok/s prefill at 8k (17.5 and 39 with every expert in RAM).
- Decode · coding answer, empty context (round-2 build: 29.0)
- 32.9tok/sstock 29
- Prefill · 8k prompt (round-2 build: 144.1)
- 568tok/sstock 144.1
- Context
- 64k tokens
- VRAM peak
- 11,587MiB
TUNED STOCK FLAGS
Run it
INK_NO_GPU_RUN=1 ./serve.sh
| Model | thinkingmachines/Inkling-2-Mini on Hugging Face |
|---|---|
| Weights | GGUF IQ4_NL, 17.6 GB from ggml-org/Inkling-2-Mini-GGUFInkling-2-Mini-IQ4_NL.gguf at db61c5b4Options: Unsloth's Mainline_Support 2-bit and 3-bit files (unsloth/Inkling-2-Mini-GGUF @ 45fd0876) and our NVFP4 repack. |
| Engine | llama.cpp master f6d944f6d (stock, no patches) · CUDA 12.9 none for the default; INK_BUILD=r2inkfix runs the round-2 build, master 225a5345b + inkling-2-mini/patches/0001 and 0002 (F16 relative-bias mask), which the quant options and the 128k profile were measured on |
| Placement | VRAM: all dense weights and the experts of loop-core layers 6-17 (6.4 GiB). RAM: the experts of layers 0-5 and 18-23, mmap'd. |
| Hardware | NVIDIA GeForce RTX 3060 12 GB · 62 GB RAM · Intel Core i5-12500 · NVMe SSD sm_86. The desktop holds 0.95 GB of the card. RAM read bandwidth 57.1 GB/s at 6 threads. |
| API | OpenAI-compatible on port 8085 |
| Key flags | -ngl 99 --fit off -ot 'blk\.([0-5]|1[89]|2[0-3])\.ffn_.*_exps=CPU' -c 65536 -np 1 -t 6 -b 2048 -ub 1024 -fa on -ctk q8_0 -ctv q8_0 --jinja --reasoning-format deepseek |
- Older master (up to 225a5345b) gives NaN prompts when a loop-core layer's experts are in RAM with op offload on, and cannot run 64k with IQ4_NL without the two patches. Both are fixed in f6d944f6d.
- Image input at 64k needs ub 512 (serve.sh sets it with INK_MMPROJ); ub 1024 with the projector runs out of memory on the first image.
- 128k needs the 6-15 layout at ub 64 without op offload; measured on the round-2 build, which INK_PROFILE=128k selects.
- A layout that loads within about 0.4 GB of the card's limit fails on its first request.
- The 2-bit files pass needles and the coding eval; only KLD shows how far they are from the full model.
- The DFlash2 drafter option takes 0.65 GB more VRAM and fits at 64k only with --spec-draft-n-ubatch 16 and ub 128.
- Decode after 32k on the default was measured at ub 128 on the same build; the ub 1024 runs of it fell on a busy host and are void.
Measured results
| Metric | Conditions | Measured | Stock | Ceiling | Source line |
|---|---|---|---|---|---|
| Decode | coding answer, empty context (round-2 build: 29.0) | 32.9 tok/s | 29 | RESULTS.md:392 | |
| after 32k of context (round-2 build: 23.6) | 29 tok/s | 23.6 | RESULTS.md:393 | ||
| Prefill | 8k prompt (round-2 build: 144.1) | 568 tok/s | 144.1 | RESULTS.md:395 | |
| 32k prompt, measured on a busy host (round-2 build: 122.9) | 470-481 tok/s | RESULTS.md:396 | |||
| Needles | at 32k and at 62k | 3/3, 3/3 found | RESULTS.md:397 | ||
| VRAM peak | after a 62k prompt, whole card | 11,587 MiB | RESULTS.md:401 | ||
| Quality | KL divergence vs Q8_0, wikitext-2 (NVFP4 repack: 0.0029) | 0.0087 KLD | RESULTS.md:399 | ||
| Decode | option: UD-IQ2_XXS, whole model on the GPU (KLD 10.7x IQ4_NL) [round-2 build] | 41.4 tok/s | RESULTS.md:25 | ||
| Prefill | option: UD-IQ2_XXS, 8k prompt [round-2 build] | 295 tok/s | RESULTS.md:25 | ||
| Decode | option: 128k profile, empty / after 124k [round-2 build] | 26.4 / 14.6 tok/s | README.md:42 | ||
| option: DFlash2 drafter (INK_SPEC=dflash2, ub 128), coding answer; same build without it | 40.8 tok/s | 33 | RESULTS.md:351 | ||
| option: DFlash2 drafter, coding answer after 32k; same build without it | 33.4 tok/s | 29 | RESULTS.md:352 | ||
| option: DFlash2 drafter, prose answer; same build without it | 35.1 tok/s | 33 | RESULTS.md:353 | ||
| option: DFlash2 drafter, coding eval at temperature 0 (median, 8/8 passed); same build without it | 47.5 tok/s | 32.9 | RESULTS.md:354 | ||
| Needles | option: DFlash2 drafter, at 32k and at 62k | 3/3, 3/3 found | RESULTS.md:356 | ||
| VRAM peak | option: DFlash2 drafter, after a 62k prompt | 11.8 GB | RESULTS.md:357 | ||
| Prefill | option: INK_LOAD_MODE=none, 8k prompt (decode 32.7) | 651.6 tok/s | 568.9 | RESULTS.md:410 |
Reproductions
None yet. If you ran this on your own 3060, report your numbers and they appear here with your hardware.
Findings from this recipe
A layout that loads within 0.4 GB of the card's limit dies on its first request
Loading without an error does not show that a configuration works.
Automatic --fit placement loses 40-63% against the hand-written expert regex
llama.cpp's automatic placement does not find the fast Inkling-2-Mini layout on its own.
Byte-count ceilings overstate what an all-GPU layout can reach
A decode ceiling computed as bytes read per token divided by memory bandwidth can be far above what the GPU delivers when a token makes many layer applications.
The desktop session holds about 0.95 GB of the card and that decides several fits
A 12 GB card that also drives the desktop is an 11 GB card.
128k context on Inkling fits only with core layers 6-15 on the GPU and ub 64
On the shipped build, the only layout that runs a 128k window on this card keeps the experts of core layers 6–15 on the GPU, layers 16–17 and the rest in RAM, with `--no-op-offload` and `-ub 64`.
With spare VRAM at 32k, the MoE cache adds 10-12% and the DSpark drafter a median 14-20%
Both levers need VRAM that the 64k default does not have, so both were measured at 32k, as the median of 6 capped coding answers with controls in the same GPU session.
Looped layers with experts in RAM give NaN prompts when op offload is on
On llama.cpp master, any batch of 32 or more tokens that runs a loop-core layer whose experts sit in RAM comes out NaN while op offload is on, which is the default.
Unmerged llama.cpp PR 32740 gives 2.5x prefill on Inkling at 64k on this card
PR #32740, which stores the attention bias compactly, is the largest gain left for the default Inkling quant on a 12 GB card.
Unsloth's smaller Inkling quants are faster, and only KLD shows what they cost
The UD files in the root of unsloth/Inkling-2-Mini-GGUF do not load on llama.cpp master.
Running Inkling's loop fewer than 3 times drops accuracy to near chance for little speed
Cutting the number of loop passes is not a usable speed lever on Inkling-2-Mini.
On Inkling the compute buffer, not the weights, decides what fits in 12 GB
Two things in llama.cpp's compute buffer decide which Inkling-2-Mini layouts load on a 12 GB card, and neither is the model file.
On a looped MoE, put the loop core's experts on the GPU before anything else
Inkling-2-Mini runs layers 6–17 three times per token, so the experts of those 12 layers are read three times while the other 12 layers' experts are read once.
Loop passes 2 and 3 dropped per-expert scales and broke NVFP4 GGUFs
On llama.cpp builds before commit 690b87d88, the generic per-expert `.scale` pass ran after the loop aliasing, so passes 2 and 3 of Inkling's loop core lost the scales of NVFP4 experts.
Repacking Inkling's own NVFP4 experts into a GGUF is about 3x closer to Q8_0 than IQ4_NL
The Inkling-2-Mini checkpoint ships its experts already in 4-bit NVFP4.
Inkling's speed-up comes from flags alone and the patches only make 64k fit
The tuned Inkling-2-Mini flags give the same speed on unpatched llama.cpp master as on the patched build.
On an i5-12500 RAM read bandwidth peaks at 6 threads and so does decode
On this CPU, RAM read bandwidth stops growing at 6 threads, and expert-in-RAM decode follows it.
Thanks
- Thinking Machines The model behind the loop-core placement recipe; our NVFP4 repack copies the checkpoint's own 4-bit experts.
- ggml-org Flint-Q4_K_M.gguf and Inkling-2-Mini-IQ4_NL.gguf are the files the two recipes serve; the Q8_0 files are the KLD references.
- llama.cpp (ggml-org and contributors) The engine for Flint, the 3D coder and Inkling-2-Mini, and the base of the Kintsugi fork.
- Unsloth The Mainline_Support files are the max-speed options of the Inkling recipe (41.4 tok/s whole-on-GPU); UD-Q3_K_XL was the smaller-expert test on Flint.
- pcuenca #32694 is why the model runs on llama.cpp at all; #32752 is one of two open PRs we measured that make 64k fit without our patches.
- danielhanchen Made NVFP4 GGUFs work on stock master, so our round-1 loop-scale patch was dropped.
- mtclinton The upstream record of the op-offload NaN our placement matrix measures.
- pwilkin #32740 measured here at 2.5x prefill at 8k, 2.9x at 62k and +20% decode at 62k; #32218 is the drafter support behind our DSpark test.
- Izento With --fit-target 0 it is the only automatic placement that matched our hand-written one.
- Oxsilaris06 Part of the DSpark build we tested at 32k.
- apolinario Scored the loop-pass experiment (3 passes 40.13, 2 passes 4.95, 1 pass 2.59).
- multimodalart The reference index our loop-pass scores are placed against.
- 0xSero / Sybil Solutions The tuning method behind the Flint and Inkling recipes; its q8_0 KV gotcha is one we confirmed on Flint.
- Hugging Face Every model, quant and drafter in these recipes is fetched from the Hub at a pinned revision and checked against the API's sha256; the base model's MTP tensors were fetched with HTTP range requests.
- NVIDIA Every recipe runs on CUDA on this card; cuBLAS SGEMV is our VRAM bandwidth probe (342 GB/s), nvidia-smi dmon is the telemetry, and Inkling's experts ship in NVFP4.
- inco.ai The opt-in drafter of the Inkling-2-Mini recipe (INK_SPEC=dflash2), converted to a Q8_0 GGUF here: 40.8 tok/s against 33.0 on a coding answer at 64k.
- z-lab Measured against MTP on the 3D coder: fastest while writing code (163 tok/s), not used because acceptance falls to 4-7% while reasoning.
Full write-up
Serving thinkingmachines/Inkling-2-Mini on the RTX 3060 12 GB with llama.cpp. It is a 26.4B MoE (128 experts, 8 active) with image input. Its layers 6–17 form a loop core that runs three times per token.
The 17.6 GB GGUF does not fit in 12 GB, so experts have to live in RAM. This recipe is about which ones: - every core-layer expert is read three times per token; - so the 6.4 GiB of core experts go on the GPU, and the rest stay in RAM.
Numbers and quality are in RESULTS.md. The experiment log is PLAN.md, the ceilings are in THEORY.md, and the raw data is in runs/.
Result
| Single user, 64k context | Stock master, experts in RAM | This recipe |
|---|---|---|
| Decode, coding answer | 17.5 tok/s | 32.9 tok/s (1.88×) |
| Decode at 32k context | 29.0 tok/s | |
| Prefill, 8k prompt | 39 tok/s | 568 tok/s (14.6×) |
| Prefill, 32k prompt | 470–481 tok/s (busy host) | |
| Needles at 32k / 62k | 3/3, 3/3 | |
| KL divergence vs Q8_0 (wikitext) | 0.0085 | 0.0087 |
Measured on stock llama.cpp master f6d944f6d at ub 1024, 2026-11-30 ("Round 4" at the end of this file and of RESULTS.md). The round-2 build (225a5345b + two patches: 29.0 tok/s, 144 / 123 tok/s prefill) is INK_BUILD=r2inkfix. Other quants, 128k and the faster options are in the next table.
Two things in older master mattered for this model; both are fixed in f6d944f6d (2026-11-30):
- Prompts came out NaN (up to 225a5345b) when a loop-core layer's experts were in RAM and op offload was on, for any batch of 32 tokens or more, including
-ot exps=CPUand image prompts ("????"). On f6d944f6d every row oftools/nanprobe.shis finite. See RESULTS.md, "The op-offload NaN" and "Round 4". - 64k did not run on a 12 GB card with IQ4_NL on 225a5345b without the two patches in
patches/. On f6d944f6d the compact-bias PR #32740 is merged, and 64k runs at ub 1024 with no patches.
Which config
Pick by what you need. All rows are one user, measured on this card with the desktop holding 0.95 GB of it. Decode is a capped coding answer, prefill a cold prompt, KLD is against Q8_0 on wikitext (lower is closer to the full model).
| You want | Run | Decode, empty / after 62k | Prefill, 8k / 62k prompt | Needles | KLD |
|---|---|---|---|---|---|
| The default: 64k, best balance | ./serve.sh |
32.9 / 29.0 after 32k | 568 / 470–481 (32k prompt) | 3/3 at 32k and 62k | 0.0087 |
| Faster decode, same output: DFlash2 drafter | INK_SPEC=dflash2 ./serve.sh |
40.8 / 33.4 after 32k (chat 35.1) | 151 / 146 (32k prompt) | 3/3 at 32k and 62k | 0.0085 |
| Max speed | INK_QUANT=iq2xxs ./serve.sh |
41.4 / 26.1 | 295 / 160 | 3/3 at 32k and 62k | 0.091 |
| Speed, less quality lost | INK_QUANT=iq3xxs ./serve.sh |
31.0 / 21.6 | 205 / 129 | 3/3 at 32k and 62k | 0.028 |
| 2-bit, a little closer than iq2xxs | INK_QUANT=q2kxl ./serve.sh |
39.9 / 25.6 | 255 / 147 | 3/3 at 32k and 62k | 0.072 |
| Best quality | INK_QUANT=nvfp4 ./serve.sh |
27.4 / 19.3 | 126 / 98 | 3/3 at 32k and 62k | 0.0029 |
| 128k context | INK_PROFILE=128k ./serve.sh |
26.4 / 14.6 after 124k | 85 / 56 (124k prompt) | 3/3 at 124k | 0.0085 |
| A little more decode at 32k | INK_CONTEXT=32768 INK_MOE_CACHE_MIB=768 ./serve.sh |
31.9 / 25.8 after 30k | 153 / 132 (30k prompt) | 3/3 at 30k | 0.0085 |
| Fast prefill on 225a5345b + #32740 (superseded: #32740 is merged, and the default row has it) | INK_BIN=<master + #32740>/bin INK_UBATCH=512 ./serve.sh |
29.6 / 24.2 | 361 / 297 | 3/3 at 32k and 62k | 0.0085 |
All eight coding tasks pass on the seven rows that were run through them: the first six and the #32740 row.
-
The drafter row runs on the same build as the default (stock master f6d944f6d), at ub 128. That build gives 33.0 tok/s on the same flags without it, so the drafter's own share is 33.0 → 40.8 on a coding answer (+24%), 29.0 → 33.4 after 32k (+15%) and 33.0 → 35.1 on prose (+6%). See "DFlash2 drafter" below.
-
Core layers 6–17 on the GPU (the default) is the layout for speed, up to 64k. Use the 6–15 layout (
INK_PROFILE=128k) only when you need more than 64k: it gives up two core layers and op offload. - The two 2-bit files are the only ones that fit on the card whole. They are the fastest and clearly the furthest from the full model (KLD 0.091 and 0.072 against 0.0085). The needle and coding gates do not show that difference; KLD does.
- The #32740 row is the round-2 measurement of that PR on 225a5345b (
$SCRATCH/llama.cpp/pr32740-3afe9c3c8/bin). The PR has since merged; f6d944f6d includes it.
The 128k boundary on a 12 GB card
IQ4_NL, q8_0 KV, --no-op-offload, with 0.95 GB of the card held by the desktop. "Runs" means a real request with a prompt of more than 100k tokens completed and all 3 needles were found. Details and the load-time buffers are in RESULTS.md.
| Core layers with experts on the GPU | ubatch | Shipped build | master + #32752 | master + #32740 |
|---|---|---|---|---|
6–15 (INK_PROFILE=128k) |
64 | runs (124k prompt, 3/3) | loads; not run | loads; not run |
| 6–15 | 128 | does not load | loads, fails on the first request | loads; not run |
| 6–15 | 192 | does not load | does not load | loads; not run |
| 6–15 | 256 | does not load | does not load | runs (104k and 124k prompts, 3/3 each) |
| 6–16 | 64 | loads, fails on the first request | loads; not run | loads; not run |
| 6–16 | 128 | does not load | does not load | runs (104k prompt, 3/3) |
| 6–17 (the 64k default layout) | 128 | not tried (6–15 already does not load) | not tried | loads, fails on the first request |
- With op offload on, nothing loads at 128k on any build, and that placement gives NaN output anyway.
- A layout that only just loads is not safe: the first request needs more memory than the load.
- Community-reported, same card (build and settings unknown): 6–15 at ub 128 runs 128k at 20 tok/s, 6–16 fails at ub 128, ub 192 works and ub 256 fails. We reproduced the speed (20.0 tok/s after 104k tokens, on #32740) and the 6–16 failure on three of four builds. We did not reproduce ub 128 or ub 192 working on the shipped build. The pattern fits master with #32752 on a card with no desktop on it; that is an inference from buffer sizes, not something we could test.
Use it
# 1. weights (pinned): ggml-org/Inkling-2-Mini-GGUF @ db61c5b4 -> $MODELS/inkling-2-mini/ # Inkling-2-Mini-IQ4_NL.gguf, mmproj-Inkling-2-Mini-Q8_0.gguf (optional), Inkling-2-Mini-Q8_0.gguf (KLD reference) # 2. engine: stock llama.cpp master f6d944f6d, CUDA build for sm_86 (INK_BUILD=r2inkfix: 225a5345b + patches/0001, 0002) git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp && git checkout f6d944f6d # (round-2 build: git checkout 225a5345b && git am /path/to/3060-recipes/inkling-2-mini/patches/000[12]-*.patch) cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 && cmake --build build -j --target llama-server # (this box: $SCRATCH/llama.cpp/master-f6d944f6d; the round-2 build is $SCRATCH/llama.cpp/r2inkfix-19c41d2ff) # 3. serve (through gpu_run, OpenAI-compatible on 127.0.0.1:8085) ./serve.sh
Which commit and which patches (2026-11-22; since 2026-11-30 the default is stock master f6d944f6d, see "Round 4" at the end). The recipe is measured on llama.cpp master 225a5345b (build 12627).
- patches/0001 and 0002 (F16 relative-bias mask) are needed for 64k with IQ4_NL, and for nothing else. At 32k, and for every speed number, stock master is enough.
- The loop-scale patch from round 1 is not needed since 690b87d88 (upstream #32704). NVFP4 GGUFs work on stock master from that commit.
- patches/0003 is only for the loop-pass experiment in eval/.
- Open upstream PRs #32740 and #32752 each make 64k fit without our patches. When one merges, the answer becomes "none". RESULTS.md has both measured.
- The patches for the round-1 pin 29b52d398 are in patches/old-29b52d398/.
Without gpu_run (any box with one 12 GB card), either INK_NO_GPU_RUN=1 ./serve.sh or plain llama-server:
llama-server -m Inkling-2-Mini-IQ4_NL.gguf --alias inkling-2-mini -ngl 99 --fit off \ -ot 'blk\.([0-5]|1[89]|2[0-3])\.ffn_.*_exps=CPU' \ -c 65536 -np 1 -t 6 -b 2048 -ub 1024 -fa on -ctk q8_0 -ctv q8_0 \ --jinja --reasoning-format deepseek --temp 1.0 --host 127.0.0.1 --port 8085
-t 6 is the number of performance cores here. This line is for master f6d944f6d or later; on 225a5345b use -ub 128 and the two patches for 64k, or -c 32768.
The defaults in serve.sh are:
- IQ4_NL, with the experts of layers 0–5 and 18–23 in RAM (
-ot 'blk\.([0-5]|1[89]|2[0-3])\.ffn_.*_exps=CPU') and everything else on the GPU; - q8_0 KV,
-ub 1024 -b 2048(ub 512 withINK_MMPROJ, ub 128 withINK_SPEC=dflash2orINK_BUILD=r2inkfix), 64k context, one slot,-fa on, 6 threads, on stock master f6d944f6d; GPU_RUN_MEM=44G, because the RAM experts are mmap'd and gpu_run's memory cap counts page cache.
Overrides:
INK_QUANT=nvfp4: our repack with the checkpoint's own NVFP4 experts. KLD is ~3× lower, and it runs 5.5% slower (27.4 tok/s).INK_QUANT=iq3xxs,q2kxl,iq2xxs: Unsloth's dynamic 3-bit and 2-bit files. They are the mainline-layout files from theMainline_Support/folder of unsloth/Inkling-2-Mini-GGUF @ 45fd0876, renamed from.gguf_fileto.ggufunder$MODELS/inkling-2-mini/unsloth/Mainline_Support/. The files in that repo's root do not load. Each quant sets its own layout:iq3xxskeeps layers 3–19 on the GPU, the 2-bit files put everything on the GPU, andq2kxluses ub 64. Numbers are in the table above.INK_MOE_CACHE_MIB=768withINK_CONTEXT=32768: keeps the hottest RAM experts in VRAM, +10% decode. There is no room for it at 64k.INK_MMPROJ=$MODELS/inkling-2-mini/mmproj-Inkling-2-Mini-Q8_0.gguf: image input. At 64kserve.shthen uses ub 512 (ub 1024 with the projector runs out of memory on the first image; "Round 4").INK_CONTEXT,INK_KV,INK_UBATCH,INK_PLACEMENT=cpu(the baseline; add--no-op-offload),wide(layers 3–19 on the GPU) orgpu(no experts in RAM),INK_OT,INK_PORT.INK_SPEC=dflash2: speculative decoding with inco.ai's DFlash2 drafter (below).INK_DRAFT_N(default 2),INK_DRAFT(GGUF path) andINK_DRAFT_UB(default 16) override.INK_NO_GPU_RUN=1: start llama-server directly, without the shared GPU queue.INK_PROFILE=128k: 128k context. Core layers 16–17 move to RAM, with ub 64 and no op offload. Needles are 3/3 at 124k; decode is 26.4 tok/s empty and 14.6 at 124k (RESULTS.md, "The 128k boundary").
Reasoning depth is a chat-template argument: "chat_template_kwargs": {"reasoning_effort": "low"}. The values are none, minimal, low, medium, high (the default), xhigh and max. Cap max_tokens: at high effort the model can reason for a long time.
DFlash2 drafter (opt-in)
incoai/Inkling-2-Mini-DFlash2 (@ 4f9088ea) is a 0.5B block-diffusion drafter: it reads four of the target's hidden states and proposes a block of tokens, which the target then verifies in one batch. Verification keeps the target's output; the drafter only changes the speed.
- It needs llama.cpp master from 55d482814 (#33073) on. The round-2 build has the DFlash2 code but its Inkling graph does not hand the drafter its features.
INK_SPEC=dflash2runs on stock master f6d944f6d (the default build since round 4) at ub 128, and refusesINK_BUILD=r2inkfix. - Two draft tokens, not seven. Acceptance falls fast with draft length (prose: 51% at 2, 27% at 5), and every extra verified token makes the target read more of the experts that live in RAM. n = 3, 4 and 5 are slower than no drafter on prose.
- It costs 0.65 GB of VRAM (11.8 GB on the card after a 62k prompt, desktop included), and only fits at 64k with the drafter's ubatch at 16 (
--spec-draft-n-ubatch 16). The Q4_K_M drafter saves 40 MiB more and accepts a little less. - The uncensored AtomicChat file (
../inkling-2-mini-uncensored/) takes the same drafter at 48k: 42.4 tok/s against 32.4. - Prefill is unchanged, needles are 3/3 at 32k and 62k, and the coding eval passes 8/8. At temperature 0 (the coding eval) the gain is larger: a median 47.5 tok/s against 32.9, all 8 tasks in 88 s instead of 143.
Convert it yourself (the repo ships safetensors only); the converter needs the original Inkling checkpoint for the tokenizer and the shared embedding norm:
python -I llama.cpp/convert_hf_to_gguf.py Inkling-2-Mini-DFlash2/ \ --target-model-dir Inkling-2-Mini/ --outtype q8_0 \ --outfile Inkling-2-Mini-DFlash2-Q8_0.gguf
On top of the llama-server line above, the drafter adds:
--spec-draft-model Inkling-2-Mini-DFlash2-Q8_0.gguf --spec-type draft-dflash2 \ --spec-draft-n-max 2 --spec-draft-ngl 99 --spec-draft-n-ubatch 16 -bs
Building the NVFP4 GGUF
tools/repack_nvfp4.py TEMPLATE.gguf HF_DIR OUT.gguf [--verify Q8_0.gguf] [--layers 6-17]. It needs the original safetensors (19.5 GB, without the MTP files) and runs on the CPU in a few minutes.
It copies every tensor from the IQ4_NL GGUF. The NVFP4 experts of layers 0–19 are replaced with the checkpoint's bytes:
- the E2M1 nibbles and E4M3 sub-block scales, bit-for-bit;
- a per-expert F32 .scale, equal to amax / outer denominator;
- with the w13 rows de-interleaved into llama.cpp's gate/up order.
--verify dequantises the result and compares it with the Q8_0 GGUF; the worst tensor differs by 0.6% relative L2.
Tools
| Script | What it does |
|---|---|
tools/srvtest.py |
server speed and sanity: cold prefill, capped coding decode at a context depth, needles; appends to runs/ledger.jsonl |
tools/serverrun.sh |
start serve.sh with overrides, wait for health, run a test (INK_TEST), stop cleanly |
tools/bench.sh, summarize.py |
one llama-bench run through gpu_run with nvidia-smi dmon telemetry |
tools/bufprobe.sh |
load the server at several context/ubatch settings and record the KV and compute buffers |
tools/kld.sh |
KL divergence vs Q8_0 on wikitext-2 and CPython source |
tools/codeeval.py |
8 Python tasks run against asserts |
tools/smoke.py |
chat, arithmetic, code, and one generated image |
tools/repack_nvfp4.py |
the NVFP4 repack above |
tools/gguf_sizes.py |
per-tensor sizes of a GGUF |
tools/gguf_layers.py |
expert bytes and quant types per layer of a GGUF |
tools/nanprobe.sh |
the op-offload NaN matrix: llama-perplexity over placements, op offload on and off, ubatch 31 / 32 |
tools/gpu_batch.sh |
run a script of several tests inside one gpu_run session |
Credits
- llama.cpp, for the engine and the Inkling 2 Mini support (#32694); ggml-org, for the GGUFs and the imatrix.
- Unsloth, for the dynamic 2-bit and 3-bit GGUFs and the DSpark drafter GGUF.
- The authors of llama.cpp PRs #32704, #32740, #32752 and #32777 and of the analysis in issue #32710, which round 2 builds on and measures.
- Thinking Machines, for Inkling 2 Mini.
- inco.ai, for the Inkling-2-Mini DFlash2 drafter; the DFlash authors (z-lab); and the authors of llama.cpp #32218 and #33073, which let llama.cpp run it on Inkling.
- The tuning method comes from 0xSero's inference-optimisation-skill: ceilings first, one change at a time with controls, and output gated as well as speed.
- The flint recipe in this repo, for the experts-in-RAM tooling.
Round 4 (2026-11-30): stock master is the default build
serve.sh now runs stock llama.cpp master f6d944f6d (no patches) at ubatch 1024. Same layout, KV and context as before; only the build and the ubatch changed. RESULTS.md, "Round 4", has the gate.
| 64k, IQ4_NL | Round-2 build (225a5345b + patches), ub 128 | master f6d944f6d, ub 1024 |
|---|---|---|
| Decode, coding answer, empty / after 32k | 29.0 / 23.6 tok/s | 32.9 / 29.0 tok/s |
| Prefill, 8k / 32k prompt | 144.1 / 122.9 tok/s | 568 / 470–481 tok/s |
| Needles 32k / 62k, coding eval, KLD wiki | 3/3, 3/3, 8/8, 0.0085 | 3/3, 3/3, 8/8, 0.0087 |
- Build:
git checkout f6d944f6d, then the samecmakeline as above, withoutgit am(this box:$SCRATCH/llama.cpp/master-f6d944f6d). The compact-bias PR #32740 is merged there, so the attention mask no longer grows with ubatch and 64k fits without our patches. - The op-offload NaN is fixed on this build: a core layer's experts in RAM with op offload on now give finite output.
- Plain llama-server: the line under "Use it" (now
-ub 1024) needs this build or later. - Image input:
INK_MMPROJ=...now runs at 64k.serve.shdrops to ub 512 when it is set, because ub 1024 with the projector runs out of memory on the first image. INK_SPEC=dflash2is unchanged: same build, ub 128, 40.8 tok/s (ub 512 with the drafter fails on the first request).INK_LOAD_MODE=none: +15% prefill (652 against 568 tok/s at 8k), −0.6% decode, 4–5 s to start instead of 1.4 s. Opt-in.INK_BUILD=r2inkfixruns the round-2 build (225a5345b +patches/0001,0002) at ub 128.INK_QUANT=nvfp4|iq3xxs|q2kxl|iq2xxsandINK_PROFILE=128kwere measured on that build and still select it; the numbers in "Which config" other than the default row are from it.
recipe.json · Markdown · Folder with scripts and raw runs · Full results log