Every optimization measured on Inkling 2 Mini on one 24 GB RTX 3090 Ti: CUDA kernel fusions (92.6 tok/s), streaming GGUF re-quantization, 448k all-GPU and 786k offloaded context, sub-100 ms hot-swap, WHT-KV4 compression, a 3.12M-token warm pool, and multi-agent KV primitives.
An evaluation of the model behind an AI coding agent’s command-approval gate: DeepSeek 4.1 Flash, the model it used, against TypeSafe’s Jev, on safety, accuracy, latency and cost. Jev’s price counts input tokens only, because no output price is published.
Jev: a shell-command safety classifier safer than DeepSeek 4.1 Flash on these tests,at 58% of the price (input tokens only)
An auto-classifier stands between an AI coding agent and its shell: it lets safe commands run and stops dangerous ones, with a model judging whatever its rules can’t. I built one for Antigravity and OpenCode, and on my tests Jev let through none of the 675 dangerous commands, where DeepSeek 4.1 Flash let through 25, at 58% of DeepSeek’s price per 1,000 decisions. Jev’s price counts input tokens only: no output price is published, and Jev writes about 234 output tokens per call against DeepSeek’s 24.
Both test sets, 5 passes each. Cost is per 1,000 decisions, at each host’s list price.
Results
0 no false allowsn dangerous commands let through, summed over five passesfalse deny = a safe command the gate stopped (costs a retry, not a disaster)errors = model calls that failed in transport; the gate denies them, and they count as misses$ / 1k decisions = USD cost per 1,000 model decisions (all models priced in USD per million tokens)
Safety and cost
The gate's fixed rules settle the obvious commands for free. Only the rest reach a model, so only those are counted here.
False allows
main + blind tests, 5 passes each · lower is better · zero is the bar
Cost per 1,000 model decisions
USD at list price · measured tokens × published price
Where each model slips
Accuracy per category of the main test, over five passes. A red outline means that category contains at least one false allow.
Every miss
Each case a model got wrong in any pass, with the model's own stated reason from one of those passes. Nothing is summarised away.
How Jev is asked
Thresholds, re-scored from recorded answers
main test · 5 passes · Jev's model-decided cases only · each cell is false allows / false denies · outlined cell ships
Inkling 2 Mini on an RTX 3090 Ti: 169 tok/s, Loop-Aware ~Q6 Core, and 128K–1M MFlashKV v2
MiniMax-M4's sparse KV paging works even better on a looped NoPE transformer: four cross-pass leader indexes beat eight on both VRAM and KL, unmodified FlashAttention runs bit-exact on hot-swappable cartridges, and the entire stack stays inside one CUDA Graph alongside zero-MiB runtime steering.
By Zack Frank ·
Measured on one NVIDIA RTX 3090 Ti (24 GB). Every figure is verified against raw benchmark JSON traces in inkling-llama-hive. Builds on the original Inkling Hive report.
Inkling 2 Mini continues to shine! I took Eris's RWHT128 KV rotation technique (eriskii.net) and applied it directly to the model weights—squeezing a loop-aware ~Q6 Core (0.00394 KL) into 17.74 GiB. Then I married our 43 ms exact NoPE KV cartridges with MiniMax-M4's MFlashKV (upgraded to v2 with cross-pass leader sharing) to page 128K–1M contexts straight from host RAM—all inside one unbroken CUDA Graph alongside zero-MiB runtime steering. Finally, pairing DFlash2-Mix's parallel block-diffusion drafting with custom kernel fusions nearly doubled our previous decode speeds to 169 tok/s on a single RTX 3090 Ti.
Speed. On one 24 GB RTX 3090 Ti, p24-fuse with DFlash2-Mix decodes at 169.0 tok/s on code and 117.1 on prose, bit-exact.
Quantization.LoopQ6K-DownQ51-Core-RWHT128 (~Q6 Core) reaches a BF16 KL of 0.00394, −64.9% against shipped IQ4_NL, and scores 96/100 on GSM.
Long context. The MFlashKV v2 4-leader q8_0 index takes 29.1 MiB, 7.53× smaller, at KL 0.01781 and 61.3 steady t/s (67.1 steady with DFlash2-Mix).
Splicing. An exact NoPE KV cartridge splice with keep_tail=4 takes 42.8 ms, 44/44 bit-exact and 271–508× faster than prefill.
Figure 1. Verified decode progression on a single RTX 3090 Ti (24 GB)
Every bar is bound to its dated experiment log or raw JSON file, with ≥2.0 GiB of OS VRAM left free.
169.0 t/scode decode · bit-exact
0.00394 KL~Q6 Core · −64.9% vs IQ4_NL
29.1 MiBMFlashKV v2 · 7.53× smaller
42.8 msexact NoPE KV splice
All five points are 100% lossless (zero-tax certified). The MFlashKV v2 and DFlash2-Mix bars are drawn at the steady and top figures; the labels give the full ranges.
1. From 30.3 to 169.0 tok/s on a single 24 GB RTX 3090 Ti
Our December 1 report (the original Inkling Hive report) established multi-agent KV carving, WHT-KV4 compression (8.25 KiB/tok) and a 3.12M-token warm pool, starting from a 30.34 t/s unfused baseline and reaching 92.6 t/s after the first kernel fusions. Between December 2 and December 5, six stacked engine, quantization and long-context changes moved the same card to 169.0 t/s code and 117.1 t/s prose, 132–139.9 t/s at 131K–448K dense context and 61.3 t/s steady at 113K–128K offloaded context, while cutting quantization KL by −64.9%.
2. Loop-aware RWHT128 quantization
Inkling-2-Mini runs its 12 Core layers (L6–L17) three times per token while its 6 Prelude and 6 Coda layers run only once, so quantization noise inside the Core compounds across passes. Building on Hadamard-rotated quantization (QuIP#/QuaRot) and Eris's RWHT128 KV-cache rotation, we applied a Rademacher Walsh-Hadamard rotation offline to the weights themselves (paired with live activation rotation) before quantizing with imatrix-rwht128—spreading outlier channels across 128-wide blocks—and spent higher precision (Q6_K/Q5_1) strictly on the looped Core. Our 17.74 GiB~Q6 Core champion (LoopQ6K-DownQ51-Core-RWHT128) cuts BF16 KL by −64.9% against shipped IQ4_NL (and beats a larger uniform All24-Q5K by 15.3%), lifting Official GSM-100 from 94 to 96/100; its unrotated twin gives stock llama.cpp a drop-in −61.6% KL upgrade with zero binary patches.
Table 2.1. Loop-aware and RWHT128 quants against shipped IQ4_NL and uniform All24-Q5KKL and Top-1 are measured against the 48.64 GiB BF16 checkpoint (80 scored positions). Pre-quantized GGUFs and the DFlash2-Mix drafter are hosted at godspede/Inkling-2-Mini-Hive-GGUF.
3. DFlash2-Mix, p24-fuse Part 1 and zero-C++ LoopCD-Hidden
Three changes account for most of the speed in Figure 1. Each is described below with its gate.
3.1 DFlash2-Mix-Q4K-SelQ8 with --spec-draft-n-ubatch 16
DFlash2 (Inkling's official Apache-2.0 companion drafter) is a tiny 5-layer parallel block-diffusion speculative drafter: it reads Inkling's hidden states and drafts 5–7 future tokens in parallel in one forward pass, which Inkling verifies in a single lossless batch. Unlike DSpark (whose global attention grows linearly with context), all 5 layers of DFlash2 are Sliding-Window Attention (W = 2048)—giving it a constant O(1) draft KV cache (~12 MiB) all the way to 1M tokens. Quantizing the body to Q4_K while keeping the selector at Q8_0 (219.4 MiB weights) and capping n_ubatch=16 (25.0 MiB compute buffer) saves −767 MiB VRAM and delivers +17% to +32% faster lossless decode with 100% character-for-character greedy parity: 132 t/s @ 131K, 114 t/s steered, 139.9 t/s @ 448K.
3.2 p24-fuse Part 1, mmq-few Tensor Core unlock, and CUDA Graph health
Standard llama.cpp rejected Inkling's odd-width MoE matrices (2304 = 9×256 and 1152 = 9×128) from Tensor Core MMA; unlocking single-unit staging and Q5_1 half-tails in mmq-few plus extending FUSED_INKLING_CONVOLVE and dynamic wk/wv fusion to speculative batch sizes (T ≤ 8) passed bit-exact parity (0.0 diff across 399,360 values). Same-hold IQ4_NL code decode rose +7.98% (148.37 → 160.21 t/s), and a clean-CPU run reached 169.02 t/s code and 117.08 t/s prose with CUDA Graphs healthy (1 initial capture, then 49–124 uninterrupted hardware replays per prompt).
3.3 Zero-C++ LoopCD-Hidden (w = 0.15)
The looped Core's residual stream is extrapolated by w = 0.15 across passes. This takes zero C++ changes and 0 MiB of VRAM, and it raised DFlash2-Mix draft acceptance and throughput to 164.1 t/s (+4.7%). It passed the full zero-tax gate: 94/100 GSM (+1/−0) and 0 loops across 3,000-word prose stress tests.
Adapting MiniMax-M4's sparse KV paging to a looped NoPE model. Instead of holding an entire 128K–1M KV cache in VRAM, MFlashKV stores 64-token far pages in host RAM (or mounted .gkv2 cartridges with blake3 integrity checks), keeps a tiny page-summary index on the GPU, scores which ~128–256 pages matter for the current token, and gathers only those pages into a compact active VRAM slab. Inkling-2-Mini fits this architecture even better than standard transformers: it has only 8 global attention slots out of 48 passes, spaced 6 layers apart (a 2.5× wider prefetch window than MiniMax-M4), and clamps relative attention bias at relative_extent = 1024—meaning unmodified FlashAttention runs bit-exact on a contiguous [gathered far pages | 1,024-tok near tail] slab.
In-graph query capture (no CPU pause). In v1, peeking at each layer's query vector Q used a CPU callback (cb_eval), which broke CUDA Graph playback on every token and blocked mounted runtime steering (0 selections). Moving query capture inside the CUDA Graph itself (P2b) copies each layer's Q directly into a VRAM scratch slot without ever pausing the GPU—recording once on token 1 and replaying uninterrupted for the remaining 131/132 tokens (0 resets), lifting steady decode from 45.5 → 57.6 t/s and enabling steered mounted sessions (21/21 selections).
Speculative drafting over paged KV.DFlash2-Mix and MFlashKV v2 run together directly: when DFlash2-Mix drafts 4–5 future tokens in parallel, MFlashKV v2 runs a single union page selection across the drafted batch (96.9% warm hit rate, 0.97 ms apply time), lifting mounted 113K decode to 61.4–67.1 t/s and averaging 81.0 t/s across all five needle retrievals.
Every figure in Table 4.1 was checked directly against the raw JSON artifacts in results/mfkv2/ on prose_115k (1,754 far pages, WHT-global KV, Pool=512 + EMA 0.5 + Sticky +0.15, CUDA GPU scorer).
Table 4.1. MFlashKV progression from v1 to the integrated buildMeasured on prose_115k (1,754 far pages, WHT-global KV, Pool=512). Pinned mean KL gate is ≤0.0247.
Stage
Index VRAMformat & leaders
Mean KL≤0.0247 gate
Decode t/swhole / steady
Verification gate
v1 / P0
219.3 MiBf32 · 8 leaders
0.0217baseline
36.7 / 41.5cb_eval
Breaks CUDA Graphs; steered mounted blocked (0 sel.)
Why four leaders beat eight on KL (0.017808 against 0.021686). Because Inkling loops the same Core three times, Pass-2's global retrieval layer (L11p2) locks the attention basin for Pass-3 and the Coda. Sharing four cross-pass leader indexers cuts index VRAM 7.53× (219.25 → 29.12 MiB) and improves attention consistency across passes—a looped-architecture gain that non-looped transformers cannot exploit.
Keeping WHT-Q4_0 Keys and the q8_0 K-index 100% untouched (replacing 4-scale Keys with 1-scale LM4 dropped worst-head needle cosine by −0.0925), we compress only far-page Values to uniform 3-bit blocks with a single FP16 scale (scale = 0.88 × absmax_128 / 3.5, 50 B per 128-dim head vector vs. 72 B Q4_0—zero LUT, zero sqrt). Inside the CUDA gather kernel, each 3-bit code q expands bit-exact into a Q4_0 slab entry (d = scale/2, nibble 2q+1), leaving FlashAttention untouched. On the live 113,320-token mount, --far-v u3 cut far-V bytes by −30.6%, total far K+V page store and pool VRAM by −15.3% (1,034.6 → 876.5 MB host, 302.0 → 255.9 MB VRAM), and page-fault DMA time (fillUs) by −33.3% (426.2 → 284.5 µs) while keeping 5/5 needles (8/8 slabs) at only +0.0020 nats KL (0.01847 → 0.02045).
Zero-RoPE cartridge swap floor (#28 / #31). All 8 global-attention layers in Inkling-2-Mini are NoPE, so middle-context edits and cartridge swaps need no position re-rotation. Dropping kMinFastSpliceTail from 64 to keep_tail = 4, which matches ShortConv's 4-token state, held 44/44 bit-exact greedy parity against full cold prefill. The splice takes 42.8–51.7 ms from DRAM (~100 ms from NVMe), which is 271–508× faster than re-prefill.
In-graph steering (p1-ingraph). Zero-MiB runtime activation implants run directly inside the CUDA Graph at 95–98% of unsteered speed, with zero graph resets and zero VRAM growth.
6. Audit notes: what failed, what was parked, and the P4b bug
6.1 P4b to P4c: the DFlash2 + MFlashKV root-cause fix
Initial P4b runs measured 30–36 t/s, slower than the 48.4 t/s nodraft run. Auditing p4_speed_p4b_r16.json showed that MFlashKV selection cost only 25.2 ms in total (0.35%). The cause was -otd selector_.*=CPU (engine_p4_speed_p4b_r16.log:3049–3053), which pushed 102 MiB of 262k-vocab selector weights onto the CPU and inflated profMs.draft to 31.9 ms/rnd.
Removing that flag and setting n_max=4 on the same unmodified MFlashKV v2 binary collapsed draft/rnd by 6.3× (31.9 → 5.07 ms) and proc/rnd by −37% (36.8 → 23.14 ms). Mounted 113KDFlash2 + MFlashKV v2 then ran at 61.41 t/s whole / 67.10 t/s steady plain (+15.6% over the same-hold 53.11/59.70 nodraft) and 61.64–62.71 t/s steered mounted. The result is live-verified.
6.2 Parked and killed items
The accounting is deliberately plain: three ideas did not survive their gates.
Table 6.1. Items parked or killed
Item
Outcome
Why
P3b heterogeneous K_s (patch 0012)
Parked
Failed the dense-prose G-KL gate (0.0434; doubled 0.0290 > 0.0247), because L23, L17p3 and L11p3 all carry >53% far mass on prose.